2012-05-21 04:12:37 -07: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/.
2011-12-06 15:52:26 -08:00
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
i n c l u d e $( DEPTH ) / c o n f i g / a u t o c o n f . m k
i n c l u d e $( topsrcdir ) / c o n f i g / r u l e s . m k
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)
i f e q ( $( MOZ_CHROME_FILE_FORMAT ) , j a r )
JAREXT = .jar
e l s e
JAREXT =
e n d i f
DEFINES += -DJAREXT= $( JAREXT)
i n c l u d e $( topsrcdir ) / i p c / a p p / d e f s . m k
DEFINES += -DMOZ_CHILD_PROCESS_NAME= $( MOZ_CHILD_PROCESS_NAME)
i f d e f M O Z _ P K G _ M A N I F E S T _ P
MOZ_PKG_MANIFEST = package-manifest
e n d i f
MOZ_POST_STAGING_CMD = find chrome -type f -name *.properties -exec sed -i '/^\#/d' { } \;
i n c l u d e $( topsrcdir ) / t o o l k i t / m o z a p p s / i n s t a l l e r / p a c k a g e r . m k
i f e q ( b u n d l e , $( MOZ_FS_LAYOUT ) )
BINPATH = $( _BINPATH)
DEFINES += -DAPPNAME= $( _APPNAME)
e l s e
# Every other platform just winds up in dist/bin
BINPATH = bin
e n d i f
DEFINES += -DBINPATH= $( BINPATH)
i f d e f M O Z _ P K G _ M A N I F E S T _ P
$(MOZ_PKG_MANIFEST) : $( MOZ_PKG_MANIFEST_P ) FORCE
$( PYTHON) $( topsrcdir) /config/Preprocessor.py $( DEFINES) $( ACDEFINES) $< > $@
GARBAGE += $( MOZ_PKG_MANIFEST)
e n d i f
i f n e q ( , $( filter mac cocoa ,$ ( MOZ_WIDGET_TOOLKIT ) ) )
PACKAGE_XULRUNNER =
UNPACKAGE =
e l s e
PACKAGE_XULRUNNER = package-xulrunner
UNPACKAGE = $( LIBXUL_DIST) /xulrunner*$( PKG_SUFFIX)
e n d i f
i f d e f L I B X U L _ S D K
MOZ_GRE_PKG_DIR = $( MOZ_PKG_DIR) /xulrunner
e l s e
MOZ_GRE_PKG_DIR = $( MOZ_PKG_DIR)
e n d i f
package-xulrunner :
i f d e f L I B X U L _ S D K
i f n d e f S Y S T E M _ L I B X U L
@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)
e l s e
@echo "Using system xulrunner..."
e n d i f
e n d i f