2012-05-21 15:12:37 +04:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2006-02-22 00:03:48 +03:00
|
|
|
|
|
|
|
# BE CAREFUL! This makefile handles a postflight_all rule for a
|
|
|
|
# multi-project build, so DON'T rely on anything that might differ between
|
|
|
|
# the two OBJDIRs.
|
|
|
|
|
|
|
|
ifndef OBJDIR
|
2010-06-15 20:31:38 +04:00
|
|
|
OBJDIR_ARCH_1 = $(MOZ_OBJDIR)/$(firstword $(MOZ_BUILD_PROJECTS))
|
|
|
|
OBJDIR_ARCH_2 = $(MOZ_OBJDIR)/$(word 2,$(MOZ_BUILD_PROJECTS))
|
|
|
|
DIST_ARCH_1 = $(OBJDIR_ARCH_1)/dist
|
|
|
|
DIST_ARCH_2 = $(OBJDIR_ARCH_2)/dist
|
|
|
|
DIST_UNI = $(DIST_ARCH_1)/universal
|
|
|
|
OBJDIR = $(OBJDIR_ARCH_1)
|
2006-02-22 00:03:48 +03:00
|
|
|
endif
|
|
|
|
|
2012-06-20 11:00:48 +04:00
|
|
|
topsrcdir = $(TOPSRCDIR)
|
2006-02-22 00:03:48 +03:00
|
|
|
include $(OBJDIR)/config/autoconf.mk
|
|
|
|
|
2012-12-06 20:06:38 +04:00
|
|
|
core_abspath = $(if $(filter /%,$(1)),$(1),$(CURDIR)/$(1))
|
|
|
|
|
2006-02-22 00:03:48 +03:00
|
|
|
DIST = $(OBJDIR)/dist
|
|
|
|
|
|
|
|
postflight_all:
|
2013-01-23 14:23:15 +04:00
|
|
|
ifdef ENABLE_TESTS
|
2006-02-22 00:03:48 +03:00
|
|
|
mkdir -p $(DIST_UNI)/$(MOZ_PKG_APPNAME)
|
2010-06-15 20:31:38 +04:00
|
|
|
rm -f $(DIST_ARCH_2)/universal
|
2012-12-06 20:06:38 +04:00
|
|
|
ln -s $(call core_abspath,$(DIST_UNI)) $(DIST_ARCH_2)/universal
|
2009-09-29 16:31:50 +04:00
|
|
|
# Now, repeat the process for the test package.
|
2010-10-01 04:10:19 +04:00
|
|
|
$(MAKE) -C $(OBJDIR_ARCH_1) UNIVERSAL_BINARY= CHROME_JAR= package-tests
|
|
|
|
$(MAKE) -C $(OBJDIR_ARCH_2) UNIVERSAL_BINARY= CHROME_JAR= package-tests
|
2009-10-01 08:21:51 +04:00
|
|
|
rm -rf $(DIST_UNI)/test-package-stage
|
2009-10-02 02:07:52 +04:00
|
|
|
# automation.py differs because it hardcodes a path to
|
|
|
|
# dist/bin. It doesn't matter which one we use.
|
2010-06-15 20:31:38 +04:00
|
|
|
if test -d $(DIST_ARCH_1)/test-package-stage -a \
|
|
|
|
-d $(DIST_ARCH_2)/test-package-stage; then \
|
|
|
|
cp $(DIST_ARCH_1)/test-package-stage/mochitest/automation.py \
|
|
|
|
$(DIST_ARCH_2)/test-package-stage/mochitest/; \
|
2012-09-20 17:06:50 +04:00
|
|
|
cp -RL $(DIST_ARCH_1)/test-package-stage/mochitest/extensions/specialpowers \
|
|
|
|
$(DIST_ARCH_2)/test-package-stage/mochitest/extensions/; \
|
2010-06-15 20:31:38 +04:00
|
|
|
cp $(DIST_ARCH_1)/test-package-stage/reftest/automation.py \
|
|
|
|
$(DIST_ARCH_2)/test-package-stage/reftest/; \
|
2012-09-20 17:06:50 +04:00
|
|
|
cp -RL $(DIST_ARCH_1)/test-package-stage/reftest/specialpowers \
|
|
|
|
$(DIST_ARCH_2)/test-package-stage/reftest/; \
|
2012-06-20 12:55:59 +04:00
|
|
|
$(TOPSRCDIR)/build/macosx/universal/unify \
|
2012-08-07 21:28:00 +04:00
|
|
|
--unify-with-sort "\.manifest$$" \
|
2009-11-05 17:04:49 +03:00
|
|
|
--unify-with-sort "all-test-dirs\.list$$" \
|
2010-06-15 20:31:38 +04:00
|
|
|
$(DIST_ARCH_1)/test-package-stage \
|
|
|
|
$(DIST_ARCH_2)/test-package-stage \
|
2009-09-29 16:31:50 +04:00
|
|
|
$(DIST_UNI)/test-package-stage; fi
|
2011-01-17 06:09:06 +03:00
|
|
|
endif
|