gecko/b2g/installer/Makefile.in
2012-05-21 12:12:37 +01:00

93 lines
2.2 KiB
Makefile

# 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/.
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in
MOZ_NONLOCALIZED_PKG_LIST = \
xpcom \
browser \
b2g \
$(NULL)
MOZ_LOCALIZED_PKG_LIST = $(AB_CD)
DEFINES += \
-DAB_CD=$(AB_CD) \
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
-DPREF_DIR=$(PREF_DIR) \
$(NULL)
ifeq ($(MOZ_CHROME_FILE_FORMAT),jar)
JAREXT=.jar
else
JAREXT=
endif
DEFINES += -DJAREXT=$(JAREXT)
include $(topsrcdir)/ipc/app/defs.mk
DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)
ifdef MOZ_PKG_MANIFEST_P
MOZ_PKG_MANIFEST = package-manifest
endif
MOZ_POST_STAGING_CMD = find chrome -type f -name *.properties -exec sed -i '/^\#/d' {} \;
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
ifeq (bundle, $(MOZ_FS_LAYOUT))
BINPATH = $(_BINPATH)
DEFINES += -DAPPNAME=$(_APPNAME)
else
# Every other platform just winds up in dist/bin
BINPATH = bin
endif
DEFINES += -DBINPATH=$(BINPATH)
ifdef MOZ_PKG_MANIFEST_P
$(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) FORCE
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $< > $@
GARBAGE += $(MOZ_PKG_MANIFEST)
endif
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
PACKAGE_XULRUNNER =
UNPACKAGE =
else
PACKAGE_XULRUNNER = package-xulrunner
UNPACKAGE = $(LIBXUL_DIST)/xulrunner*$(PKG_SUFFIX)
endif
ifdef LIBXUL_SDK
MOZ_GRE_PKG_DIR=$(MOZ_PKG_DIR)/xulrunner
else
MOZ_GRE_PKG_DIR=$(MOZ_PKG_DIR)
endif
package-xulrunner:
ifdef LIBXUL_SDK
ifndef SYSTEM_LIBXUL
@echo "Packaging xulrunner..."
@rm -rf $(LIBXUL_DIST)/xulrunner*
@$(MAKE) -C $(LIBXUL_DIST)/.. package || echo "Perhaps you're trying to package a prebuilt SDK. See 'https://wiki.mozilla.org/B2G' for more information."
@cd $(DIST)/$(MOZ_PKG_DIR); $(UNMAKE_PACKAGE)
@echo "Removing unpackaged files... (the ones xulrunner/installer keeps)"
@cd $(DIST)/$(MOZ_PKG_DIR)/xulrunner; rm -rf $(NO_PKG_FILES)
else
@echo "Using system xulrunner..."
endif
endif