michael@0: # -*- makefile -*- michael@0: # vim:set ts=8 sw=8 sts=8 noet: michael@0: michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: USE_RCS_MK=1 michael@0: include $(topsrcdir)/config/makefiles/makeutils.mk michael@0: michael@0: milestone_txt = $(topsrcdir)/config/milestone.txt michael@0: michael@0: include $(topsrcdir)/config/rules.mk michael@0: michael@0: CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS) michael@0: michael@0: ifdef MOZ_WIDGET_GTK michael@0: CXXFLAGS += $(MOZ_PANGO_CFLAGS) michael@0: endif michael@0: michael@0: # Should version be optional or required ? michael@0: TOOLKIT_EM_VERSION=$(shell $(PERL) $(topsrcdir)/config/milestone.pl --topsrcdir=$(topsrcdir)) michael@0: $(call warnIfEmpty,TOOLKIT_EM_VERSION) michael@0: michael@0: # Valid if null: {warn,error}IfEmpty michael@0: DEFINES += -DTOOLKIT_EM_VERSION='"$(TOOLKIT_EM_VERSION)"' michael@0: michael@0: MOZ_SOURCE_STAMP ?= $(firstword $(shell hg -R $(topsrcdir) parent --template='{node|short}\n' 2>/dev/null)) michael@0: ifdef MOZ_SOURCE_STAMP michael@0: michael@0: INIARGS = --sourcestamp=$(MOZ_SOURCE_STAMP) michael@0: michael@0: source_repo := $(call getSourceRepo) michael@0: michael@0: # extra sanity check for old versions of hg, no showconfig support michael@0: ifneq (,$(filter http%,$(source_repo))) michael@0: INIARGS += --sourcerepo=$(source_repo) michael@0: endif michael@0: michael@0: endif # MOZ_SOURCE_STAMP michael@0: michael@0: GRE_BUILDID := $(strip $(firstword $(shell cat $(DEPTH)/config/buildid 2>/dev/null))) michael@0: $(call errorIfEmpty,GRE_MILESTONE GRE_BUILDID) michael@0: michael@0: DEFINES += -DGRE_BUILDID=$(GRE_BUILDID) michael@0: michael@0: $(srcdir)/nsAppRunner.cpp: $(DEPTH)/config/buildid $(milestone_txt) michael@0: michael@0: platform.ini: FORCE michael@0: $(PYTHON) $(srcdir)/make-platformini.py --buildid=$(GRE_BUILDID) $(INIARGS) $(milestone_txt) > $@ michael@0: michael@0: GARBAGE += platform.ini michael@0: michael@0: libs:: platform.ini michael@0: $(INSTALL) $^ $(DIST)/bin