2012-05-21 11:12:37 +00: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/.
|
2005-04-08 04:14:27 +00:00
|
|
|
|
2013-03-05 07:09:14 +00:00
|
|
|
STANDALONE_MAKEFILE := 1
|
|
|
|
|
2005-04-08 04:14:27 +00:00
|
|
|
NO_PKG_FILES = \
|
|
|
|
xulrunner-config \
|
|
|
|
regchrome* \
|
|
|
|
regxpcom* \
|
2012-04-13 17:27:24 +00:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
# We want xpcshell and run-mozilla in the SDK but not in the binary package.
|
|
|
|
ifndef STAGE_SDK
|
|
|
|
NO_PKG_FILES += \
|
2012-04-05 17:01:17 +00:00
|
|
|
xpcshell* \
|
|
|
|
run-mozilla* \
|
2005-04-08 04:14:27 +00:00
|
|
|
$(NULL)
|
2012-04-13 17:27:24 +00:00
|
|
|
endif
|
2005-04-08 04:14:27 +00:00
|
|
|
|
2012-03-23 17:57:23 +00:00
|
|
|
# If we're on mac, we don't want an end-user-facing DMG, we want a .tar.bz2
|
|
|
|
# which developers then use to package their application.
|
2006-08-18 20:34:56 +00:00
|
|
|
|
2009-09-19 02:59:53 +00:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
2012-03-23 17:57:23 +00:00
|
|
|
MOZ_PKG_FORMAT = BZ2
|
2012-04-05 17:01:17 +00:00
|
|
|
_APPNAME = XUL.framework
|
|
|
|
_BINPATH = /$(_APPNAME)/Versions/Current
|
2005-08-22 17:39:28 +00:00
|
|
|
endif
|
|
|
|
|
2005-04-08 04:14:27 +00:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2007-08-03 14:46:17 +00:00
|
|
|
INSTALL_SDK = 1
|
|
|
|
|
2012-03-12 17:39:35 +00:00
|
|
|
include $(topsrcdir)/toolkit/mozapps/installer/signing.mk
|
2005-04-08 04:14:27 +00:00
|
|
|
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
|
2006-10-24 19:13:52 +00:00
|
|
|
|
2007-08-03 14:46:17 +00:00
|
|
|
# Add pkg-config files to the install:: target
|
|
|
|
|
|
|
|
pkg_config_files = \
|
|
|
|
libxul.pc \
|
|
|
|
libxul-embedding.pc \
|
|
|
|
mozilla-js.pc \
|
|
|
|
mozilla-plugin.pc \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
ifdef MOZ_NATIVE_NSPR
|
|
|
|
NSPR_NAME=nspr
|
|
|
|
NSPR_VERSION=$(shell $(NSPR_CONFIG) --version)
|
|
|
|
else
|
|
|
|
pkg_config_files += mozilla-nspr.pc
|
|
|
|
NSPR_NAME=mozilla-nspr
|
2009-05-18 18:15:05 +00:00
|
|
|
FULL_NSPR_CFLAGS=-I\$${includedir}
|
2007-08-03 14:46:17 +00:00
|
|
|
FULL_NSPR_LIBS=$(subst $(prefix),\$${sdkdir},$(shell $(DEPTH)/nsprpub/config/nspr-config --libs))
|
|
|
|
NSPR_VERSION=$(shell $(DEPTH)/nsprpub/config/nspr-config --version)
|
|
|
|
endif
|
|
|
|
|
2013-03-30 09:31:17 +00:00
|
|
|
MOZ_XUL_LINK = -lxpcomglue_s -lxul -lmozalloc
|
2010-09-10 18:36:25 +00:00
|
|
|
ifdef JS_SHARED_LIBRARY
|
|
|
|
MOZ_JS_LINK = -lmozjs
|
|
|
|
else
|
|
|
|
MOZ_JS_LINK = $(MOZ_XUL_LINK)
|
|
|
|
endif
|
|
|
|
|
2007-08-03 14:46:17 +00:00
|
|
|
$(warning FULL_NSPR_CFLAGS=$(FULL_NSPR_CFLAGS))
|
|
|
|
|
|
|
|
ifndef MOZ_NATIVE_NSS
|
|
|
|
pkg_config_files += mozilla-nss.pc
|
|
|
|
endif
|
|
|
|
|
2008-11-28 02:26:44 +00:00
|
|
|
%.pc: $(srcdir)/%.pc.in $(GLOBAL_DEPS)
|
2007-08-03 14:46:17 +00:00
|
|
|
cat $< | sed \
|
|
|
|
-e "s|%prefix%|$(prefix)|" \
|
|
|
|
-e "s|%includedir%|$(includedir)|" \
|
|
|
|
-e "s|%idldir%|$(idldir)|" \
|
|
|
|
-e "s|%sdkdir%|$(sdkdir)|" \
|
|
|
|
-e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \
|
|
|
|
-e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
|
2008-10-21 03:25:16 +00:00
|
|
|
-e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \
|
2007-08-03 14:46:17 +00:00
|
|
|
-e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
|
|
|
|
-e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \
|
|
|
|
-e "s|%NSPR_NAME%|$(NSPR_NAME)|" \
|
2010-09-14 19:02:50 +00:00
|
|
|
-e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" \
|
2010-09-10 18:36:25 +00:00
|
|
|
-e "s|%MOZ_XUL_LINK%|$(MOZ_XUL_LINK)|" \
|
2010-09-14 19:02:50 +00:00
|
|
|
-e "s|%MOZ_JS_LINK%|$(MOZ_JS_LINK)|" > $@
|
2007-08-03 14:46:17 +00:00
|
|
|
chmod 644 $@
|
|
|
|
|
|
|
|
install:: $(pkg_config_files)
|
|
|
|
@echo pkg_config_file: $(pkg_config_files)
|
|
|
|
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(libdir)/pkgconfig
|
|
|
|
|
2011-07-15 08:15:28 +00:00
|
|
|
GARBAGE += $(pkg_config_files)
|
2008-06-17 09:44:21 +00:00
|
|
|
|
2008-08-05 14:54:42 +00:00
|
|
|
GARBAGE += debian/changelog
|
2008-06-17 09:44:21 +00:00
|
|
|
|
|
|
|
DEBDESTDIR=debian/$(MOZ_BUILD_APP)
|
|
|
|
|
2008-08-05 14:54:42 +00:00
|
|
|
GRE_BUILDID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
|
|
|
|
MOZ_DEB_TIMESTAMP = "$(shell date +"%a, %d %b %Y %T %z" )"
|
|
|
|
|
2008-10-13 17:17:39 +00:00
|
|
|
DEFINES += \
|
|
|
|
-DGRE_MILESTONE=$(GRE_MILESTONE) \
|
|
|
|
-DGRE_BUILDID=$(GRE_BUILDID) \
|
|
|
|
-DMOZ_DEB_TIMESTAMP=$(MOZ_DEB_TIMESTAMP) \
|
|
|
|
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
|
|
|
|
-Dinstalldir=$(installdir) \
|
|
|
|
$(NULL)
|
2008-06-17 09:44:21 +00:00
|
|
|
|
|
|
|
ifeq ($(OS_TARGET),Linux)
|
2008-08-28 04:49:11 +00:00
|
|
|
debian/changelog: $(srcdir)/debian/changelog.in $(LIBXUL_DIST)/bin/platform.ini
|
2013-11-09 01:35:44 +00:00
|
|
|
$(call py_action,preprocessor, \
|
|
|
|
$(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ -o $@)
|
2008-08-05 14:54:42 +00:00
|
|
|
|
2008-10-13 17:17:39 +00:00
|
|
|
debian/xulrunner.links: $(srcdir)/debian/xulrunner.links.in
|
2013-11-09 01:35:44 +00:00
|
|
|
$(call py_action,preprocessor, \
|
|
|
|
$(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ -o $@)
|
2008-10-13 17:17:39 +00:00
|
|
|
|
|
|
|
debian/xulrunner.service: $(srcdir)/debian/xulrunner.service.in
|
2013-11-09 01:35:44 +00:00
|
|
|
$(call py_action,preprocessor, \
|
|
|
|
$(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ -o $@)
|
2008-10-13 17:17:39 +00:00
|
|
|
|
2011-12-07 19:04:53 +00:00
|
|
|
debian/prerm: $(srcdir)/debian/prerm.in
|
2013-11-09 01:35:44 +00:00
|
|
|
$(call py_action,preprocessor, \
|
|
|
|
$(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ -o $@)
|
2011-12-07 19:04:53 +00:00
|
|
|
|
|
|
|
debian/postinst: $(srcdir)/debian/postinst.in
|
2013-11-09 01:35:44 +00:00
|
|
|
$(call py_action,preprocessor, \
|
|
|
|
$(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ -o $@)
|
2011-12-07 19:04:53 +00:00
|
|
|
|
2008-10-13 17:17:39 +00:00
|
|
|
package:
|
|
|
|
$(MAKE) package -C $(DEPTH)
|
|
|
|
|
2011-07-15 08:15:28 +00:00
|
|
|
deb: package debian/changelog debian/xulrunner.service debian/xulrunner.links
|
2008-06-17 09:44:21 +00:00
|
|
|
$(NSINSTALL) $(topsrcdir)/$(MOZ_BUILD_APP)/installer/debian .
|
2008-10-13 17:17:39 +00:00
|
|
|
rm -fr $(DEBDESTDIR)
|
2009-10-28 13:04:57 +00:00
|
|
|
$(NSINSTALL) -D $(DEBDESTDIR)/$(installdir)
|
2009-10-27 19:06:11 +00:00
|
|
|
cp -pRL $(DEPTH)/dist/$(MOZ_BUILD_APP)/* $(DEBDESTDIR)/$(installdir)
|
2008-06-17 09:44:21 +00:00
|
|
|
$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/dbus-1/services/
|
|
|
|
cp debian/$(MOZ_BUILD_APP).service $(DEBDESTDIR)/usr/share/dbus-1/services/org.mozilla.$(MOZ_BUILD_APP).service
|
2011-12-07 19:04:53 +00:00
|
|
|
dh_link; fakeroot dh_fixperms; fakeroot dh_installdeb; fakeroot dh_shlibdeps; fakeroot dh_gencontrol; fakeroot dh_md5sums; fakeroot dh_builddeb;
|
2008-06-17 09:44:21 +00:00
|
|
|
endif
|
|
|
|
|
2009-11-12 16:03:28 +00:00
|
|
|
DEB_BUILD_ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
|
|
|
# package name comes from xulrunner/installer/debian/changelog.in
|
|
|
|
DEB_PKG_NAME = $(MOZ_PKG_APPNAME)_$(GRE_MILESTONE)-$(GRE_BUILDID)_$(DEB_BUILD_ARCH).deb
|
|
|
|
# relative to $(DIST)
|
|
|
|
UPLOAD_EXTRA_FILES += ../xulrunner/$(DEB_PKG_NAME)
|