Merge mozilla-central into tracemonkey.
[mozilla-central.git] / browser / installer / Makefile.in
blobfc79290912d48b99dd3924f5994d5c922a3558ac
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 <benjamin@smedbergs.us>
25 # Alternatively, the contents of this file may be used under the terms of
26 # either the GNU General Public License Version 2 or later (the "GPL"), or
27 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 # in which case the provisions of the GPL or the LGPL are applicable instead
29 # of those above. If you wish to allow use of your version of this file only
30 # under the terms of either the GPL or the LGPL, and not to allow others to
31 # use your version of this file under the terms of the MPL, indicate your
32 # decision by deleting the provisions above and replace them with the notice
33 # and other provisions required by the GPL or the LGPL. If you do not delete
34 # the provisions above, a recipient may use your version of this file under
35 # the terms of any one of the MPL, the GPL or the LGPL.
37 # ***** END LICENSE BLOCK *****
39 DEPTH = ../..
40 topsrcdir = @top_srcdir@
41 srcdir = @srcdir@
42 VPATH = @srcdir@
44 include $(DEPTH)/config/autoconf.mk
46 include $(topsrcdir)/config/rules.mk
48 MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
50 ifdef MOZ_ENABLE_LIBXUL
51 MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in
52 else
53 define message
54 You need to build with --enable-libxul (the default, unless you specify
55 --disable-libxul or --enable-shared or --enable-debug) to package a build.
56 endef
57 default libs installer::
58 $(error $(message))
59 endif
61 MOZ_NONLOCALIZED_PKG_LIST = \
62 xpcom \
63 browser \
64 $(NULL)
66 MOZ_LOCALIZED_PKG_LIST = $(AB_CD)
68 DEFINES += -DAB_CD=$(AB_CD) -DMOZ_APP_NAME=$(MOZ_APP_NAME) -DPREF_DIR=$(PREF_DIR)
69 ifdef MOZ_ENABLE_GNOME_COMPONENT
70 DEFINES += -DMOZ_ENABLE_GNOME_COMPONENT=1
71 endif
73 ifeq (gtk2, $(MOZ_WIDGET_TOOLKIT))
74 DEFINES += -DMOZ_GTK2=1
75 endif
77 ifdef NSS_DISABLE_DBM
78 DEFINES += -DNSS_DISABLE_DBM=1
79 endif
81 ifdef _MSC_VER
82 DEFINES += -D_MSC_VER=$(_MSC_VER)
83 endif
85 ifeq ($(MOZ_CHROME_FILE_FORMAT),jar)
86 DEFINES += -DJAREXT=.jar
87 else
88 DEFINES += -DJAREXT=
89 endif
91 # Don't ifdef MOZ_IPC this because mac ppc needs it too.
92 include $(topsrcdir)/ipc/app/defs.mk
93 DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)
95 ifdef MOZ_PKG_MANIFEST_P
96 MOZ_PKG_MANIFEST = package-manifest
98 $(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P)
99 $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $< > $@
101 GARBAGE += $(MOZ_PKG_MANIFEST)
102 endif
104 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
105 MOZ_PKG_MAC_DSSTORE=branding/dsstore
106 MOZ_PKG_MAC_BACKGROUND=branding/background.png
107 MOZ_PKG_MAC_ICON=branding/disk.icns
108 MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ "
109 endif
111 ifndef LIBXUL_SDK
112 INSTALL_SDK = 1
113 endif
115 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
117 ifeq (bundle, $(MOZ_FS_LAYOUT))
118 BINPATH = $(_BINPATH)
119 DEFINES += -DAPPNAME=$(_APPNAME)
120 else
121 # Every other platform just winds up in dist/bin
122 BINPATH = bin
123 endif
124 DEFINES += -DBINPATH=$(BINPATH)
126 libs::
127 $(MAKE) -C $(DEPTH)/browser/locales langpack
129 ifeq (WINNT,$(OS_ARCH))
130 PKGCOMP_FIND_OPTS =
131 else
132 PKGCOMP_FIND_OPTS = -L
133 endif
134 ifeq (Darwin, $(OS_ARCH))
135 FINDPATH = $(_APPNAME)/Contents/MacOS
136 else
137 FINDPATH=bin
138 endif
140 package-compare:: $(MOZ_PKG_MANIFEST)
141 ifdef MOZ_PKG_MANIFEST_P
142 cd $(DIST); find $(PKGCOMP_FIND_OPTS) $(FINDPATH) -type f | sort > bin-list.txt
143 grep "^$(BINPATH)" $(MOZ_PKG_MANIFEST) | sed -e 's/^\///' | sort > $(DIST)/pack-list.txt
144 -diff -u $(DIST)/pack-list.txt $(DIST)/bin-list.txt
145 rm -f $(DIST)/pack-list.txt $(DIST)/bin-list.txt
146 endif
148 installer:: removed-files
149 ifdef INSTALLER_DIR
150 $(MAKE) -C $(INSTALLER_DIR)
151 endif