Back out due to mochiserver breakage. (no_r=me)
[mozilla-central.git] / xulrunner / installer / Makefile.in
blobd04d19cacdb8824495f8b1a1e5002d9f3fca7cee
1 # ***** BEGIN LICENSE BLOCK *****
2 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 # http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
12 # License.
14 # The Original Code is the Mozilla Browser code.
16 # The Initial Developer of the Original Code is
17 # IBM Corporation.
18 # Portions created by the Initial Developer are Copyright (C) 2004
19 # the Initial Developer. All Rights Reserved.
21 # Contributor(s):
22 # Brian Ryner <bryner@brianryner.com>
23 # Benjamin Smedberg <bsmedberg@covad.net>
24 # Darin Fisher <darin@meer.net>
26 # Alternatively, the contents of this file may be used under the terms of
27 # either the GNU General Public License Version 2 or later (the "GPL"), or
28 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 # in which case the provisions of the GPL or the LGPL are applicable instead
30 # of those above. If you wish to allow use of your version of this file only
31 # under the terms of either the GPL or the LGPL, and not to allow others to
32 # use your version of this file under the terms of the MPL, indicate your
33 # decision by deleting the provisions above and replace them with the notice
34 # and other provisions required by the GPL or the LGPL. If you do not delete
35 # the provisions above, a recipient may use your version of this file under
36 # the terms of any one of the MPL, the GPL or the LGPL.
38 # ***** END LICENSE BLOCK *****
40 DEPTH = ../..
41 topsrcdir = @top_srcdir@
42 srcdir = @srcdir@
43 VPATH = @srcdir@
45 include $(DEPTH)/config/autoconf.mk
47 NO_PKG_FILES = \
48 xulrunner-config \
49 regchrome* \
50 regxpcom* \
51 $(NULL)
53 # If we're on mac, we want to make the .pkg first, in the mac/
54 # directory. Then packager.mk can put it into a DMG
56 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
57 DIRS += mac
58 _APPNAME = $(PKG_BASENAME).pkg
59 PKG_SKIP_STRIP = 1
60 MOZ_PKG_SPECIAL = pkg
61 PKG_DMG_SOURCE = $(STAGEPATH)xulrunner-pkg
62 endif
64 include $(topsrcdir)/config/rules.mk
66 INSTALL_SDK = 1
68 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
70 $(MOZILLA_VERSION).system.conf: $(topsrcdir)/config/milestone.txt Makefile
71 printf "[%s]\nGRE_PATH=%s\nxulrunner=true\nabi=%s" \
72 $(MOZILLA_VERSION) $(installdir) $(TARGET_XPCOM_ABI)> $@
74 ifndef SKIP_GRE_REGISTRATION
75 # to register xulrunner per-user, override this with $HOME/.gre.d
76 regdir = /etc/gre.d
78 install:: $(MOZILLA_VERSION).system.conf
79 $(NSINSTALL) -D $(DESTDIR)$(regdir)
80 $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(regdir)
81 endif
83 # Add pkg-config files to the install:: target
85 pkg_config_files = \
86 libxul.pc \
87 libxul-embedding.pc \
88 mozilla-js.pc \
89 mozilla-plugin.pc \
90 mozilla-gtkmozembed.pc \
91 mozilla-gtkmozembed-embedding.pc \
92 $(NULL)
94 ifdef MOZ_NATIVE_NSPR
95 NSPR_NAME=nspr
96 NSPR_VERSION=$(shell $(NSPR_CONFIG) --version)
97 else
98 pkg_config_files += mozilla-nspr.pc
99 NSPR_NAME=mozilla-nspr
100 FULL_NSPR_CFLAGS=-I\$${includedir}
101 FULL_NSPR_LIBS=$(subst $(prefix),\$${sdkdir},$(shell $(DEPTH)/nsprpub/config/nspr-config --libs))
102 NSPR_VERSION=$(shell $(DEPTH)/nsprpub/config/nspr-config --version)
103 endif
105 $(warning FULL_NSPR_CFLAGS=$(FULL_NSPR_CFLAGS))
107 ifndef MOZ_NATIVE_NSS
108 pkg_config_files += mozilla-nss.pc
109 endif
111 %.pc: $(srcdir)/%.pc.in $(GLOBAL_DEPS)
112 cat $< | sed \
113 -e "s|%prefix%|$(prefix)|" \
114 -e "s|%includedir%|$(includedir)|" \
115 -e "s|%idldir%|$(idldir)|" \
116 -e "s|%sdkdir%|$(sdkdir)|" \
117 -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \
118 -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
119 -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \
120 -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
121 -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \
122 -e "s|%NSPR_NAME%|$(NSPR_NAME)|" \
123 -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" > $@
124 chmod 644 $@
126 install:: $(pkg_config_files)
127 @echo pkg_config_file: $(pkg_config_files)
128 $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(libdir)/pkgconfig
130 GARBAGE += $(MOZILLA_VERSION).system.conf $(pkg_config_files)
132 GARBAGE += debian/changelog
134 DEBDESTDIR=debian/$(MOZ_BUILD_APP)
136 GRE_MILESTONE = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
137 GRE_BUILDID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
138 MOZ_DEB_TIMESTAMP = "$(shell date +"%a, %d %b %Y %T %z" )"
140 DEFINES += \
141 -DGRE_MILESTONE=$(GRE_MILESTONE) \
142 -DGRE_BUILDID=$(GRE_BUILDID) \
143 -DMOZ_DEB_TIMESTAMP=$(MOZ_DEB_TIMESTAMP) \
144 -DMOZ_APP_NAME=$(MOZ_APP_NAME) \
145 -Dinstalldir=$(installdir) \
146 $(NULL)
148 ifeq ($(OS_TARGET),Linux)
149 debian/changelog: $(srcdir)/debian/changelog.in $(LIBXUL_DIST)/bin/platform.ini
150 mkdir -p debian
151 $(PYTHON) $(topsrcdir)/config/Preprocessor.py \
152 $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ > $@
154 debian/xulrunner.links: $(srcdir)/debian/xulrunner.links.in
155 $(PYTHON) $(topsrcdir)/config/Preprocessor.py \
156 $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ > $@
158 debian/xulrunner.service: $(srcdir)/debian/xulrunner.service.in
159 $(PYTHON) $(topsrcdir)/config/Preprocessor.py \
160 $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ > $@
162 package:
163 $(MAKE) package -C $(DEPTH)
165 deb: package debian/changelog debian/xulrunner.service debian/xulrunner.links $(MOZILLA_VERSION).system.conf
166 $(NSINSTALL) $(topsrcdir)/$(MOZ_BUILD_APP)/installer/debian .
167 rm -fr $(DEBDESTDIR)
168 $(NSINSTALL) -D $(DEBDESTDIR)/$(installdir)
169 cp -pRL $(DEPTH)/dist/$(MOZ_BUILD_APP)/* $(DEBDESTDIR)/$(installdir)
170 $(NSINSTALL) -D $(DEBDESTDIR)/usr/share/dbus-1/services/
171 cp debian/$(MOZ_BUILD_APP).service $(DEBDESTDIR)/usr/share/dbus-1/services/org.mozilla.$(MOZ_BUILD_APP).service
172 $(NSINSTALL) -D $(DEBDESTDIR)$(regdir)
173 $(SYSINSTALL) $(MOZILLA_VERSION).system.conf $(DEBDESTDIR)$(regdir)/
174 rm $(DEBDESTDIR)/$(installdir)/xpidl
175 dh_shlibdeps; fakeroot dh_fixperms; fakeroot dh_installdeb; fakeroot dh_gencontrol; fakeroot dh_md5sums; dh_builddeb
176 endif
178 DEB_BUILD_ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH)
179 # package name comes from xulrunner/installer/debian/changelog.in
180 DEB_PKG_NAME = $(MOZ_PKG_APPNAME)_$(GRE_MILESTONE)-$(GRE_BUILDID)_$(DEB_BUILD_ARCH).deb
181 # relative to $(DIST)
182 UPLOAD_EXTRA_FILES += ../xulrunner/$(DEB_PKG_NAME)