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: # BE CAREFUL! This makefile handles a postflight_all rule for a michael@0: # multi-project build, so DON'T rely on anything that might differ between michael@0: # the two OBJDIRs. michael@0: michael@0: ifndef OBJDIR michael@0: OBJDIR_ARCH_1 = $(MOZ_OBJDIR)/$(firstword $(MOZ_BUILD_PROJECTS)) michael@0: OBJDIR_ARCH_2 = $(MOZ_OBJDIR)/$(word 2,$(MOZ_BUILD_PROJECTS)) michael@0: DIST_ARCH_1 = $(OBJDIR_ARCH_1)/dist michael@0: DIST_ARCH_2 = $(OBJDIR_ARCH_2)/dist michael@0: DIST_UNI = $(DIST_ARCH_1)/universal michael@0: OBJDIR = $(OBJDIR_ARCH_1) michael@0: endif michael@0: michael@0: topsrcdir = $(TOPSRCDIR) michael@0: DEPTH = $(OBJDIR) michael@0: include $(OBJDIR)/config/autoconf.mk michael@0: michael@0: DIST = $(OBJDIR)/dist michael@0: michael@0: postflight_all: michael@0: mkdir -p $(DIST_UNI)/$(MOZ_PKG_APPNAME) michael@0: rm -f $(DIST_ARCH_2)/universal michael@0: ln -s $(abspath $(DIST_UNI)) $(DIST_ARCH_2)/universal michael@0: # Stage a package for buildsymbols to be happy. Doing so in OBJDIR_ARCH_1 michael@0: # actually does a universal staging with both OBJDIR_ARCH_1 and OBJDIR_ARCH_2. michael@0: $(MAKE) -C $(OBJDIR_ARCH_1)/$(MOZ_BUILD_APP)/installer \ michael@0: PKG_SKIP_STRIP=1 stage-package michael@0: ifdef ENABLE_TESTS michael@0: # Now, repeat the process for the test package. michael@0: $(MAKE) -C $(OBJDIR_ARCH_1) UNIVERSAL_BINARY= CHROME_JAR= package-tests michael@0: $(MAKE) -C $(OBJDIR_ARCH_2) UNIVERSAL_BINARY= CHROME_JAR= package-tests michael@0: rm -rf $(DIST_UNI)/test-package-stage michael@0: # automation.py differs because it hardcodes a path to michael@0: # dist/bin. It doesn't matter which one we use. michael@0: if test -d $(DIST_ARCH_1)/test-package-stage -a \ michael@0: -d $(DIST_ARCH_2)/test-package-stage; then \ michael@0: cp $(DIST_ARCH_1)/test-package-stage/mochitest/automation.py \ michael@0: $(DIST_ARCH_2)/test-package-stage/mochitest/; \ michael@0: cp -RL $(DIST_ARCH_1)/test-package-stage/mochitest/extensions/specialpowers \ michael@0: $(DIST_ARCH_2)/test-package-stage/mochitest/extensions/; \ michael@0: cp $(DIST_ARCH_1)/test-package-stage/xpcshell/automation.py \ michael@0: $(DIST_ARCH_2)/test-package-stage/xpcshell/; \ michael@0: cp $(DIST_ARCH_1)/test-package-stage/reftest/automation.py \ michael@0: $(DIST_ARCH_2)/test-package-stage/reftest/; \ michael@0: cp -RL $(DIST_ARCH_1)/test-package-stage/reftest/specialpowers \ michael@0: $(DIST_ARCH_2)/test-package-stage/reftest/; \ michael@0: $(TOPSRCDIR)/build/macosx/universal/unify \ michael@0: --unify-with-sort "\.manifest$$" \ michael@0: --unify-with-sort "all-test-dirs\.list$$" \ michael@0: $(DIST_ARCH_1)/test-package-stage \ michael@0: $(DIST_ARCH_2)/test-package-stage \ michael@0: $(DIST_UNI)/test-package-stage; fi michael@0: endif