Bumping manifests a=b2g-bump
[gecko.git] / config / Makefile.in
blob9db1551a127a48aef620298a158d006897d84151
1 # -*- Makefile -*-
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 # IMPORTANT: Disable NSBUILDROOT for this directory only, otherwise we have
8 # a recursive rule for finding nsinstall and the Perl scripts.
9 ifdef NSBUILDROOT
10 override NSBUILDROOT :=
11 endif
13 ifdef GNU_CC
14 MODULE_OPTIMIZE_FLAGS = -O3
15 endif
17 include $(topsrcdir)/config/config.mk
19 # L10n jobs are doing make -C config manually before anything else,
20 # and need nsinstall to be built as a consequence.
21 export:: host
23 ifneq (WINNT,$(HOST_OS_ARCH))
24 ifdef COMPILE_ENVIRONMENT
25 # Ensure nsinstall is atomically created
26 nsinstall$(HOST_BIN_SUFFIX): $(HOST_PROGRAM)
27 cp $^ $@.tmp
28 mv $@.tmp $@
30 NSINSTALL_EXECUTABLES := nsinstall$(HOST_BIN_SUFFIX)
31 NSINSTALL_DEST := $(DIST)/bin
32 NSINSTALL_TARGET := host
33 INSTALL_TARGETS += NSINSTALL
34 endif
35 endif
37 ifndef JS_STANDALONE
38 HEADERS_FILES = \
39 $(DEPTH)/mozilla-config.h \
40 $(NULL)
41 HEADERS_DEST := $(DIST)/include
42 HEADERS_TARGET := export
43 INSTALL_TARGETS += HEADERS
44 endif
46 include $(topsrcdir)/config/rules.mk
48 HOST_CFLAGS += -DUNICODE -D_UNICODE
50 ifndef JS_STANDALONE
51 # Generate a new buildid every time we "export" in config... that's only
52 # supposed to be once per-build!
53 export::
54 ifdef MOZ_BUILD_DATE
55 printf '%s' $(MOZ_BUILD_DATE) > buildid
56 else
57 $(PYTHON) $(topsrcdir)/toolkit/xre/make-platformini.py --print-buildid > buildid
58 endif
59 endif
61 ifdef WRAP_SYSTEM_INCLUDES
62 export-preqs = \
63 $(call mkdir_deps,system_wrappers) \
64 $(NULL)
66 export:: $(export-preqs)
67 $(PYTHON) -m mozbuild.action.preprocessor $(DEFINES) $(ACDEFINES) \
68 -DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \
69 -DMOZ_TREE_PIXMAN=$(MOZ_TREE_PIXMAN) \
70 -DMOZ_NATIVE_HUNSPELL=$(MOZ_NATIVE_HUNSPELL) \
71 -DMOZ_NATIVE_BZ2=$(MOZ_NATIVE_BZ2) \
72 -DMOZ_NATIVE_ZLIB=$(MOZ_NATIVE_ZLIB) \
73 -DMOZ_NATIVE_PNG=$(MOZ_NATIVE_PNG) \
74 -DMOZ_NATIVE_JPEG=$(MOZ_NATIVE_JPEG) \
75 -DMOZ_NATIVE_LIBEVENT=$(MOZ_NATIVE_LIBEVENT) \
76 -DMOZ_NATIVE_LIBVPX=$(MOZ_NATIVE_LIBVPX) \
77 -DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
78 $(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
79 $(INSTALL) system_wrappers $(DIST)
81 GARBAGE_DIRS += system_wrappers
82 endif
84 ifdef WRAP_STL_INCLUDES
85 ifdef GNU_CXX
86 stl_compiler = gcc
87 else
88 ifdef _MSC_VER
89 stl_compiler = msvc
90 endif
91 endif
92 endif
94 ifdef stl_compiler
95 STL_WRAPPERS_SENTINEL = $(DIST)/stl_wrappers/sentinel
97 $(STL_WRAPPERS_SENTINEL): $(srcdir)/make-stl-wrappers.py $(srcdir)/$(stl_compiler)-stl-wrapper.template.h $(srcdir)/stl-headers $(GLOBAL_DEPS)
98 $(PYTHON) $(srcdir)/make-stl-wrappers.py stl_wrappers $(stl_compiler) $(srcdir)/$(stl_compiler)-stl-wrapper.template.h $(srcdir)/stl-headers
99 $(PYTHON) $(srcdir)/nsinstall.py -t stl_wrappers $(DIST)
100 touch $(STL_WRAPPERS_SENTINEL)
102 export:: $(STL_WRAPPERS_SENTINEL)
104 GARBAGE += $(STL_WRAPPERS_SENTINEL)
105 GARBAGE_DIRS += stl_wrappers
106 endif
108 GARBAGE += \
109 $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(FINAL_LINK_COMP_NAMES) buildid $(srcdir)/*.pyc *.pyc
111 FORCE:
113 ifndef JS_STANDALONE
114 check-preqs += check-jar-mn
115 endif
116 check-preqs += check-makefiles
118 check:: $(check-preqs)
120 check-jar-mn::
121 $(MAKE) -C tests/src-simple check-jar
122 $(MAKE) -C tests/src-simple check-flat
123 $(MAKE) -C tests/src-simple check-flat USE_EXTENSION_MANIFEST=1
124 ifneq (,$(filter-out WINNT,$(OS_ARCH)))
125 $(MAKE) -C tests/src-simple check-symlink
126 endif
128 check-makefiles:
129 $(MAKE) -C tests/makefiles/autodeps check