diff --git a/xulrunner/installer/Makefile.in b/xulrunner/installer/Makefile.in index d2acbe41b4f6..308f2c1601b8 100644 --- a/xulrunner/installer/Makefile.in +++ b/xulrunner/installer/Makefile.in @@ -67,3 +67,39 @@ endif include $(topsrcdir)/config/rules.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