1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/build/macosx/universal/flight.mk Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,57 @@ 1.4 +# This Source Code Form is subject to the terms of the Mozilla Public 1.5 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.7 + 1.8 +# BE CAREFUL! This makefile handles a postflight_all rule for a 1.9 +# multi-project build, so DON'T rely on anything that might differ between 1.10 +# the two OBJDIRs. 1.11 + 1.12 +ifndef OBJDIR 1.13 +OBJDIR_ARCH_1 = $(MOZ_OBJDIR)/$(firstword $(MOZ_BUILD_PROJECTS)) 1.14 +OBJDIR_ARCH_2 = $(MOZ_OBJDIR)/$(word 2,$(MOZ_BUILD_PROJECTS)) 1.15 +DIST_ARCH_1 = $(OBJDIR_ARCH_1)/dist 1.16 +DIST_ARCH_2 = $(OBJDIR_ARCH_2)/dist 1.17 +DIST_UNI = $(DIST_ARCH_1)/universal 1.18 +OBJDIR = $(OBJDIR_ARCH_1) 1.19 +endif 1.20 + 1.21 +topsrcdir = $(TOPSRCDIR) 1.22 +DEPTH = $(OBJDIR) 1.23 +include $(OBJDIR)/config/autoconf.mk 1.24 + 1.25 +DIST = $(OBJDIR)/dist 1.26 + 1.27 +postflight_all: 1.28 + mkdir -p $(DIST_UNI)/$(MOZ_PKG_APPNAME) 1.29 + rm -f $(DIST_ARCH_2)/universal 1.30 + ln -s $(abspath $(DIST_UNI)) $(DIST_ARCH_2)/universal 1.31 +# Stage a package for buildsymbols to be happy. Doing so in OBJDIR_ARCH_1 1.32 +# actually does a universal staging with both OBJDIR_ARCH_1 and OBJDIR_ARCH_2. 1.33 + $(MAKE) -C $(OBJDIR_ARCH_1)/$(MOZ_BUILD_APP)/installer \ 1.34 + PKG_SKIP_STRIP=1 stage-package 1.35 +ifdef ENABLE_TESTS 1.36 +# Now, repeat the process for the test package. 1.37 + $(MAKE) -C $(OBJDIR_ARCH_1) UNIVERSAL_BINARY= CHROME_JAR= package-tests 1.38 + $(MAKE) -C $(OBJDIR_ARCH_2) UNIVERSAL_BINARY= CHROME_JAR= package-tests 1.39 + rm -rf $(DIST_UNI)/test-package-stage 1.40 +# automation.py differs because it hardcodes a path to 1.41 +# dist/bin. It doesn't matter which one we use. 1.42 + if test -d $(DIST_ARCH_1)/test-package-stage -a \ 1.43 + -d $(DIST_ARCH_2)/test-package-stage; then \ 1.44 + cp $(DIST_ARCH_1)/test-package-stage/mochitest/automation.py \ 1.45 + $(DIST_ARCH_2)/test-package-stage/mochitest/; \ 1.46 + cp -RL $(DIST_ARCH_1)/test-package-stage/mochitest/extensions/specialpowers \ 1.47 + $(DIST_ARCH_2)/test-package-stage/mochitest/extensions/; \ 1.48 + cp $(DIST_ARCH_1)/test-package-stage/xpcshell/automation.py \ 1.49 + $(DIST_ARCH_2)/test-package-stage/xpcshell/; \ 1.50 + cp $(DIST_ARCH_1)/test-package-stage/reftest/automation.py \ 1.51 + $(DIST_ARCH_2)/test-package-stage/reftest/; \ 1.52 + cp -RL $(DIST_ARCH_1)/test-package-stage/reftest/specialpowers \ 1.53 + $(DIST_ARCH_2)/test-package-stage/reftest/; \ 1.54 + $(TOPSRCDIR)/build/macosx/universal/unify \ 1.55 + --unify-with-sort "\.manifest$$" \ 1.56 + --unify-with-sort "all-test-dirs\.list$$" \ 1.57 + $(DIST_ARCH_1)/test-package-stage \ 1.58 + $(DIST_ARCH_2)/test-package-stage \ 1.59 + $(DIST_UNI)/test-package-stage; fi 1.60 +endif