|
1 # -*- makefile -*- |
|
2 # vim:set ts=8 sw=8 sts=8 noet: |
|
3 |
|
4 # This Source Code Form is subject to the terms of the Mozilla Public |
|
5 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
7 |
|
8 USE_RCS_MK=1 |
|
9 include $(topsrcdir)/config/makefiles/makeutils.mk |
|
10 |
|
11 milestone_txt = $(topsrcdir)/config/milestone.txt |
|
12 |
|
13 include $(topsrcdir)/config/rules.mk |
|
14 |
|
15 CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS) |
|
16 |
|
17 ifdef MOZ_WIDGET_GTK |
|
18 CXXFLAGS += $(MOZ_PANGO_CFLAGS) |
|
19 endif |
|
20 |
|
21 # Should version be optional or required ? |
|
22 TOOLKIT_EM_VERSION=$(shell $(PERL) $(topsrcdir)/config/milestone.pl --topsrcdir=$(topsrcdir)) |
|
23 $(call warnIfEmpty,TOOLKIT_EM_VERSION) |
|
24 |
|
25 # Valid if null: {warn,error}IfEmpty |
|
26 DEFINES += -DTOOLKIT_EM_VERSION='"$(TOOLKIT_EM_VERSION)"' |
|
27 |
|
28 MOZ_SOURCE_STAMP ?= $(firstword $(shell hg -R $(topsrcdir) parent --template='{node|short}\n' 2>/dev/null)) |
|
29 ifdef MOZ_SOURCE_STAMP |
|
30 |
|
31 INIARGS = --sourcestamp=$(MOZ_SOURCE_STAMP) |
|
32 |
|
33 source_repo := $(call getSourceRepo) |
|
34 |
|
35 # extra sanity check for old versions of hg, no showconfig support |
|
36 ifneq (,$(filter http%,$(source_repo))) |
|
37 INIARGS += --sourcerepo=$(source_repo) |
|
38 endif |
|
39 |
|
40 endif # MOZ_SOURCE_STAMP |
|
41 |
|
42 GRE_BUILDID := $(strip $(firstword $(shell cat $(DEPTH)/config/buildid 2>/dev/null))) |
|
43 $(call errorIfEmpty,GRE_MILESTONE GRE_BUILDID) |
|
44 |
|
45 DEFINES += -DGRE_BUILDID=$(GRE_BUILDID) |
|
46 |
|
47 $(srcdir)/nsAppRunner.cpp: $(DEPTH)/config/buildid $(milestone_txt) |
|
48 |
|
49 platform.ini: FORCE |
|
50 $(PYTHON) $(srcdir)/make-platformini.py --buildid=$(GRE_BUILDID) $(INIARGS) $(milestone_txt) > $@ |
|
51 |
|
52 GARBAGE += platform.ini |
|
53 |
|
54 libs:: platform.ini |
|
55 $(INSTALL) $^ $(DIST)/bin |