1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/Makefile.in Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,327 @@ 1.4 +# 1.5 +# This Source Code Form is subject to the terms of the Mozilla Public 1.6 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.8 + 1.9 +ifndef .PYMAKE 1.10 +ifeq (,$(MAKE_VERSION)) 1.11 +$(error GNU Make is required) 1.12 +endif 1.13 +make_min_ver := 3.81 1.14 +ifneq ($(make_min_ver),$(firstword $(sort $(make_min_ver) $(MAKE_VERSION)))) 1.15 +$(error GNU Make $(make_min_ver) or higher is required) 1.16 +endif 1.17 +endif 1.18 + 1.19 +export TOPLEVEL_BUILD := 1 1.20 + 1.21 +default:: 1.22 + 1.23 +ifdef MOZ_BUILD_APP 1.24 +include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk 1.25 +endif 1.26 + 1.27 +include $(topsrcdir)/config/config.mk 1.28 + 1.29 +GARBAGE_DIRS += dist _javagen _profile staticlib 1.30 +DIST_GARBAGE = config.cache config.log config.status* config-defs.h \ 1.31 + config/autoconf.mk \ 1.32 + mozilla-config.h \ 1.33 + netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \ 1.34 + .mozconfig.mk 1.35 + 1.36 +ifdef JS_STANDALONE 1.37 +configure_dir = $(topsrcdir)/js/src 1.38 +else 1.39 +configure_dir = $(topsrcdir) 1.40 +endif 1.41 + 1.42 +ifndef MOZ_PROFILE_USE 1.43 +# We need to explicitly put backend.RecursiveMakeBackend here 1.44 +# otherwise the rule in rules.mk doesn't run early enough. 1.45 +libs binaries export tools:: CLOBBER $(configure_dir)/configure config.status backend.RecursiveMakeBackend 1.46 +ifndef JS_STANDALONE 1.47 +ifndef LIBXUL_SDK 1.48 +libs binaries export tools:: $(topsrcdir)/js/src/configure js/src/config.status 1.49 +endif 1.50 +endif 1.51 +endif 1.52 + 1.53 +ifdef JS_STANDALONE 1.54 +.PHONY: CLOBBER 1.55 +CLOBBER: 1.56 +else 1.57 +CLOBBER: $(topsrcdir)/CLOBBER 1.58 + @echo 'STOP! The CLOBBER file has changed.' 1.59 + @echo 'Please run the build through a sanctioned build wrapper, such as' 1.60 + @echo '"mach build" or client.mk.' 1.61 + @exit 1 1.62 +endif 1.63 + 1.64 +$(topsrcdir)/configure: $(topsrcdir)/configure.in 1.65 +$(topsrcdir)/js/src/configure: $(topsrcdir)/js/src/configure.in 1.66 +$(topsrcdir)/configure $(topsrcdir)/js/src/configure: 1.67 + @echo 'STOP! $^ has changed, and your configure is out of date.' 1.68 + @echo 'Please rerun autoconf and re-configure your build directory.' 1.69 + @echo 'To ignore this message, touch "$@",' 1.70 + @echo 'but your build might not succeed.' 1.71 + @exit 1 1.72 + 1.73 +config.status: $(configure_dir)/configure 1.74 +js/src/config.status: $(topsrcdir)/js/src/configure 1.75 +config.status js/src/config.status: 1.76 + @echo 'STOP! $^ has changed and needs to be run again.' 1.77 + @echo 'Please rerun it.' 1.78 + @echo 'To ignore this message, touch "$(CURDIR)/$@",' 1.79 + @echo 'but your build might not succeed.' 1.80 + @exit 1 1.81 + 1.82 +# Regenerate the build backend if it is out of date. We only have this rule in 1.83 +# this main make file because having it in rules.mk and applied to partial tree 1.84 +# builds resulted in a world of hurt. Gory details are in bug 877308. 1.85 +# 1.86 +# The mach build driver will ensure the backend is up to date for partial tree 1.87 +# builds. This cleanly avoids most of the pain. 1.88 + 1.89 +backend.RecursiveMakeBackend: 1.90 + @echo 'Build configuration changed. Regenerating backend.' 1.91 + $(PYTHON) config.status 1.92 + 1.93 +Makefile: backend.RecursiveMakeBackend 1.94 + @$(TOUCH) $@ 1.95 + 1.96 +include backend.RecursiveMakeBackend.pp 1.97 + 1.98 +default:: backend.RecursiveMakeBackend 1.99 + 1.100 +install_manifests := bin idl include public private sdk 1.101 +install_manifest_depends = \ 1.102 + CLOBBER \ 1.103 + $(configure_dir)/configure \ 1.104 + config.status \ 1.105 + backend.RecursiveMakeBackend \ 1.106 + $(NULL) 1.107 + 1.108 +ifndef JS_STANDALONE 1.109 +ifndef LIBXUL_SDK 1.110 +install_manifest_depends += \ 1.111 + $(topsrcdir)/js/src/configure \ 1.112 + js/src/config.status \ 1.113 + $(NULL) 1.114 +endif 1.115 +endif 1.116 + 1.117 +.PHONY: install-manifests 1.118 +install-manifests: $(addprefix install-dist-,$(install_manifests)) 1.119 + 1.120 +# process_install_manifest needs to be invoked with --no-remove when building 1.121 +# js as standalone because automated builds are building nspr separately and 1.122 +# that would remove the resulting files. 1.123 +# Eventually, a standalone js build would just be able to build nspr itself, 1.124 +# removing the need for the former. 1.125 +ifdef JS_STANDALONE 1.126 +NO_REMOVE=1 1.127 +endif 1.128 + 1.129 +.PHONY: $(addprefix install-dist-,$(install_manifests)) 1.130 +$(addprefix install-dist-,$(install_manifests)): install-dist-%: $(install_manifest_depends) 1.131 + $(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )$(DIST)/$* _build_manifests/install/dist_$*) 1.132 + 1.133 +.PHONY: install-tests 1.134 +install-manifests: install-tests 1.135 +install-tests: $(install_manifest_depends) 1.136 + $(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )_tests _build_manifests/install/tests) 1.137 + 1.138 +include $(topsrcdir)/build/moz-automation.mk 1.139 + 1.140 +# _tests should be purged during cleaning. However, we don't want it purged 1.141 +# during PGO builds because it contains some auto-generated files. 1.142 +ifneq ($(filter-out maybe_clobber_profiledbuild,$(MAKECMDGOALS)),) 1.143 +GARBAGE_DIRS += _tests 1.144 +endif 1.145 + 1.146 +# Windows PGO builds don't perform a clean before the 2nd pass. So, we want 1.147 +# to preserve content for the 2nd pass on Windows. Everywhere else, we always 1.148 +# process the install manifests as part of export. 1.149 +ifdef MOZ_PROFILE_USE 1.150 +ifndef NO_PROFILE_GUIDED_OPTIMIZE 1.151 +ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_) 1.152 +export:: install-manifests 1.153 +binaries:: 1.154 + @$(MAKE) install-manifests NO_REMOVE=1 1.155 +endif 1.156 +endif 1.157 +else # !MOZ_PROFILE_USE (normal build) 1.158 +export:: install-manifests 1.159 +binaries:: 1.160 + @$(MAKE) install-manifests NO_REMOVE=1 1.161 +endif 1.162 + 1.163 +# For historical reasons that are unknown, $(DIST)/sdk is always blown away 1.164 +# with no regard for PGO passes. This decision could probably be revisited. 1.165 +export:: install-dist-sdk 1.166 + 1.167 +ifndef JS_STANDALONE 1.168 +ifdef ENABLE_TESTS 1.169 +# Additional makefile targets to call automated test suites 1.170 +include $(topsrcdir)/testing/testsuite-targets.mk 1.171 +endif 1.172 +endif 1.173 + 1.174 +default all:: 1.175 + $(call BUILDSTATUS,TIERS export $(if $(COMPILE_ENVIRONMENT),$(if $(MOZ_PSEUDO_DERECURSE),compile ))libs tools $(if $(MOZ_AUTOMATION),$(MOZ_AUTOMATION_TIERS))) 1.176 + 1.177 +include $(topsrcdir)/config/rules.mk 1.178 + 1.179 +distclean:: 1.180 + $(RM) $(DIST_GARBAGE) 1.181 + 1.182 +ifeq ($(OS_ARCH),WINNT) 1.183 +# we want to copy PDB files on Windows 1.184 +MAKE_SYM_STORE_ARGS := -c --vcs-info 1.185 +ifdef PDBSTR_PATH 1.186 +MAKE_SYM_STORE_ARGS += -i 1.187 +endif 1.188 +DUMP_SYMS_BIN ?= $(topsrcdir)/toolkit/crashreporter/tools/win32/dump_syms_vc$(_MSC_VER).exe 1.189 +# PDB files don't get moved to dist, so we need to scan the whole objdir 1.190 +MAKE_SYM_STORE_PATH := . 1.191 +endif 1.192 +ifeq ($(OS_ARCH),Darwin) 1.193 +# need to pass arch flags for universal builds 1.194 +ifdef UNIVERSAL_BINARY 1.195 +MAKE_SYM_STORE_ARGS := -c -a 'i386 x86_64' --vcs-info 1.196 +MAKE_SYM_STORE_PATH := $(DIST)/universal 1.197 +else 1.198 +MAKE_SYM_STORE_ARGS := -c -a $(OS_TEST) --vcs-info 1.199 +MAKE_SYM_STORE_PATH := $(DIST)/bin 1.200 +endif 1.201 +DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms 1.202 +endif 1.203 +ifeq (,$(filter-out Linux SunOS,$(OS_ARCH))) 1.204 +MAKE_SYM_STORE_ARGS := -c --vcs-info 1.205 +DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms 1.206 +MAKE_SYM_STORE_PATH := $(DIST)/bin 1.207 +endif 1.208 + 1.209 +SYM_STORE_SOURCE_DIRS := $(topsrcdir) 1.210 + 1.211 +ifndef JS_STANDALONE 1.212 +include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk 1.213 + 1.214 +ifdef MOZ_SYMBOLS_EXTRA_BUILDID 1.215 +EXTRA_BUILDID := -$(MOZ_SYMBOLS_EXTRA_BUILDID) 1.216 +endif 1.217 + 1.218 +SYMBOL_INDEX_NAME = \ 1.219 + $(MOZ_APP_NAME)-$(MOZ_APP_VERSION)-$(OS_TARGET)-$(BUILDID)-$(CPU_ARCH)$(EXTRA_BUILDID)-symbols.txt 1.220 + 1.221 +buildsymbols: 1.222 +ifdef MOZ_CRASHREPORTER 1.223 + echo building symbol store 1.224 + $(RM) -r $(DIST)/crashreporter-symbols 1.225 + $(RM) '$(DIST)/$(SYMBOL_ARCHIVE_BASENAME).zip' 1.226 + $(RM) '$(DIST)/$(SYMBOL_FULL_ARCHIVE_BASENAME).zip' 1.227 + $(NSINSTALL) -D $(DIST)/crashreporter-symbols 1.228 + OBJCOPY='$(OBJCOPY)' \ 1.229 + $(PYTHON) $(topsrcdir)/toolkit/crashreporter/tools/symbolstore.py \ 1.230 + $(MAKE_SYM_STORE_ARGS) \ 1.231 + $(foreach dir,$(SYM_STORE_SOURCE_DIRS),-s $(dir)) \ 1.232 + $(DUMP_SYMS_BIN) \ 1.233 + $(DIST)/crashreporter-symbols \ 1.234 + $(MAKE_SYM_STORE_PATH) | grep -iv test > \ 1.235 + $(DIST)/crashreporter-symbols/$(SYMBOL_INDEX_NAME) 1.236 + echo packing symbols 1.237 + $(NSINSTALL) -D $(DIST)/$(PKG_PATH) 1.238 + cd $(DIST)/crashreporter-symbols && \ 1.239 + zip -r9D '../$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip' . -x '*test*' -x '*Test*' 1.240 + cd $(DIST)/crashreporter-symbols && \ 1.241 + grep 'sym' $(SYMBOL_INDEX_NAME) > $(SYMBOL_INDEX_NAME).tmp && \ 1.242 + mv $(SYMBOL_INDEX_NAME).tmp $(SYMBOL_INDEX_NAME) 1.243 + cd $(DIST)/crashreporter-symbols && \ 1.244 + zip -r9D '../$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip' . -i '*.sym' -i '*.txt' -x '*test*' -x '*Test*' 1.245 +endif # MOZ_CRASHREPORTER 1.246 + 1.247 +uploadsymbols: 1.248 +ifdef MOZ_CRASHREPORTER 1.249 + $(SHELL) $(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.sh $(SYMBOL_INDEX_NAME) '$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip' 1.250 +endif 1.251 + 1.252 +# MOZ_SOURCE_STAMP is defined in package-name.mk with a deferred assignment. 1.253 +# exporting it makes make run its $(shell) command for each invoked submake, 1.254 +# so transform it to an immediate assignment. 1.255 +MOZ_SOURCE_STAMP := $(MOZ_SOURCE_STAMP) 1.256 +export MOZ_SOURCE_STAMP 1.257 +endif 1.258 + 1.259 +.PHONY: update-packaging 1.260 +update-packaging: 1.261 + $(MAKE) -C tools/update-packaging 1.262 + 1.263 +.PHONY: pretty-package 1.264 +pretty-package: 1.265 + unset MOZ_SIGN_CMD && $(MAKE) package MOZ_PKG_PRETTYNAMES=1 1.266 + 1.267 +.PHONY: pretty-package-tests 1.268 +pretty-package-tests: 1.269 + unset MOZ_SIGN_CMD && $(MAKE) package-tests MOZ_PKG_PRETTYNAMES=1 1.270 + 1.271 +.PHONY: pretty-l10n-check 1.272 +pretty-l10n-check: 1.273 + unset MOZ_SIGN_CMD && $(MAKE) l10n-check MOZ_PKG_PRETTYNAMES=1 1.274 + 1.275 +.PHONY: pretty-update-packaging 1.276 +pretty-update-packaging: 1.277 + unset MOZ_SIGN_CMD && $(MAKE) -C tools/update-packaging MOZ_PKG_PRETTYNAMES=1 1.278 + 1.279 +.PHONY: pretty-installer 1.280 +pretty-installer: 1.281 + unset MOZ_SIGN_CMD && $(MAKE) installer MOZ_PKG_PRETTYNAMES=1 1.282 + 1.283 +#XXX: this is a hack, since we don't want to clobber for MSVC 1.284 +# PGO support, but we can't do this test in client.mk 1.285 +ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_) 1.286 +# No point in clobbering if PGO has been explicitly disabled. 1.287 +ifndef NO_PROFILE_GUIDED_OPTIMIZE 1.288 +maybe_clobber_profiledbuild: clean 1.289 +else 1.290 +maybe_clobber_profiledbuild: 1.291 +endif 1.292 +else 1.293 +maybe_clobber_profiledbuild: 1.294 + $(RM) $(DIST)/bin/*.pgc 1.295 + find $(DIST)/$(MOZ_APP_NAME) -name '*.pgc' -exec mv {} $(DIST)/bin \; 1.296 +endif 1.297 + 1.298 +.PHONY: maybe_clobber_profiledbuild 1.299 + 1.300 +# Look for R_386_PC32 relocations in shared libs, these 1.301 +# break x86_64 builds and SELinux users. 1.302 +ifeq ($(OS_TARGET)_$(TARGET_XPCOM_ABI),Linux_x86-gcc3) 1.303 +check:: 1.304 + @relcount=`find $(DIST)/bin -name '*.so' | xargs objdump -R | grep R_386_PC32 | wc -l` && if test $$relcount -gt 0; then echo 'FAILED: R_386_PC32 relocations detected in a shared library. Did you use a system header without adding it to config/system-headers?'; exit 1; else echo 'PASSED'; fi 1.305 +endif 1.306 + 1.307 +ifdef JS_STANDALONE 1.308 +# Delegate js-specific rules to js 1.309 +check-%: 1.310 + $(MAKE) -C js/src $@ 1.311 + 1.312 +source-package install: 1.313 + $(MAKE) -C js/src $@ 1.314 + 1.315 +# Every export rule depends on config/export, but the rule for config/export 1.316 +# doesn't exist when building js non-standalone. 1.317 +.PHONY: config/export 1.318 +config/export: 1.319 + 1.320 +endif 1.321 + 1.322 +ifdef MOZ_PSEUDO_DERECURSE 1.323 +# Interdependencies for parallel export. 1.324 +js/xpconnect/src/export: dom/bindings/export xpcom/xpidl/export 1.325 +accessible/src/xpcom/export: xpcom/xpidl/export 1.326 +js/src/export: mfbt/export 1.327 +ifdef ENABLE_CLANG_PLUGIN 1.328 +js/src/export config/export: build/clang-plugin/export 1.329 +endif 1.330 +endif