Bug 321471 - Automate SDK packaging. r=bsmedberg.

This commit is contained in:
pedemont%us.ibm.com 2006-10-24 19:13:52 +00:00
parent a281722e10
commit c9a84b4669

View File

@ -67,3 +67,39 @@ endif
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
#
# Package the SDK directory
#
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
SDK_APPNAME = $(MOZ_APP_NAME)
else
SDK_APPNAME = $(MOZ_PKG_APPNAME)
endif
SDK_BASENAME = $(SDK_APPNAME)-$(MOZ_PKG_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM)
SDK = $(SDK_BASENAME).sdk.$(PKG_SUFFIX)
ifeq ($(MOZ_PKG_FORMAT),TAR)
MAKE_SDK = $(CREATE_FINAL_TAR) - gecko-sdk > $(SDK)
else
ifeq ($(MOZ_PKG_FORMAT),TGZ)
MAKE_SDK = $(CREATE_FINAL_TAR) - gecko-sdk | gzip -vf9 > $(SDK)
else
ifeq ($(MOZ_PKG_FORMAT),BZ2)
MAKE_SDK = $(CREATE_FINAL_TAR) - gecko-sdk | bzip2 -vf > $(SDK)
else
# default to zip
MAKE_SDK = $(ZIP) -r9D $(SDK_BASENAME).sdk.zip gecko-sdk
endif
endif
endif
make-sdk:
@echo "Packaging SDK..."
@rm -rf $(DIST)/gecko-sdk
@mkdir $(DIST)/gecko-sdk
@cd $(DIST)/sdk && tar $(TAR_CREATE_FLAGS) - * | (cd ../gecko-sdk; tar -xf -)
cd $(DIST) && $(MAKE_SDK)
libs:: make-sdk