browser/app/Makefile.in

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:74216dbf3026
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
5 dist_dest = $(DIST)/$(MOZ_MACBUNDLE_NAME)
6
7 PREF_JS_EXPORTS = $(srcdir)/profile/firefox.js \
8 $(NULL)
9 PREF_JS_EXPORTS += $(srcdir)/profile/000-tor-browser.js
10
11
12 # hardcode en-US for the moment
13 AB_CD = en-US
14
15 DEFINES += \
16 -DAB_CD=$(AB_CD) \
17 -DFIREFOX_ICO='"$(DIST)/branding/firefox.ico"' \
18 -DDOCUMENT_ICO='"$(DIST)/branding/document.ico"' \
19 -DNEWWINDOW_ICO='"$(DIST)/branding/newwindow.ico"' \
20 -DNEWTAB_ICO='"$(DIST)/branding/newtab.ico"' \
21 -DPBMODE_ICO='"$(DIST)/branding/pbmode.ico"' \
22 $(NULL)
23
24 ifdef LIBXUL_SDK #{
25 PREF_JS_EXPORTS += $(srcdir)/profile/channel-prefs.js
26 endif #} LIBXUL_SDK
27
28 # Build a binary bootstrapping with XRE_main
29
30 LIBS += \
31 $(XPCOM_STANDALONE_GLUE_LDOPTS) \
32 $(NULL)
33
34 ifdef MOZ_LINKER
35 LIBS += $(MOZ_ZLIB_LIBS)
36 endif
37
38 ifdef HAVE_CLOCK_MONOTONIC
39 LIBS += $(REALTIME_LIBS)
40 endif
41
42 ifndef MOZ_WINCONSOLE
43 ifdef MOZ_DEBUG
44 MOZ_WINCONSOLE = 1
45 else
46 MOZ_WINCONSOLE = 0
47 endif
48 endif
49
50 # This switches $(INSTALL) to copy mode, like $(SYSINSTALL), so things that
51 # shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall.
52 NSDISTMODE = copy
53
54 include $(topsrcdir)/config/config.mk
55
56 ifeq ($(OS_ARCH),WINNT)
57 # Rebuild firefox.exe if the manifest changes - it's included by splash.rc.
58 # (this dependency should really be just for firefox.exe, not other targets)
59 # Note the manifest file exists in the tree, so we use the explicit filename
60 # here.
61 EXTRA_DEPS += firefox.exe.manifest
62 endif
63
64 PROGRAMS_DEST = $(DIST)/bin
65
66 include $(topsrcdir)/config/rules.mk
67
68 ifneq (,$(filter-out WINNT,$(OS_ARCH)))
69
70 ifdef COMPILE_ENVIRONMENT
71 libs::
72 cp -p $(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
73 endif
74
75 GARBAGE += $(addprefix $(FINAL_TARGET)/defaults/pref/, firefox.js)
76
77 endif
78
79 ifdef MOZ_WIDGET_GTK
80 libs::
81 $(INSTALL) $(IFLAGS1) $(DIST)/branding/mozicon128.png $(FINAL_TARGET)/icons
82 $(INSTALL) $(IFLAGS1) $(DIST)/branding/default16.png $(FINAL_TARGET)/chrome/icons/default
83 $(INSTALL) $(IFLAGS1) $(DIST)/branding/default32.png $(FINAL_TARGET)/chrome/icons/default
84 $(INSTALL) $(IFLAGS1) $(DIST)/branding/default48.png $(FINAL_TARGET)/chrome/icons/default
85 endif
86
87 libs:: $(srcdir)/profile/prefs.js
88 $(INSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile
89
90 ifndef LIBXUL_SDK
91 # channel-prefs.js is handled separate from other prefs due to bug 756325
92 libs:: $(srcdir)/profile/channel-prefs.js
93 $(NSINSTALL) -D $(DIST)/bin/defaults/pref
94 $(call py_action,preprocessor,$(PREF_PPFLAGS) $(ACDEFINES) $^ -o $(DIST)/bin/defaults/pref/channel-prefs.js)
95 endif
96
97 libs:: $(srcdir)/blocklist.xml
98 $(INSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
99
100 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
101
102 MAC_APP_NAME = $(MOZ_APP_DISPLAYNAME)
103
104 ifdef MOZ_DEBUG
105 MAC_APP_NAME := $(MAC_APP_NAME)Debug
106 endif
107
108 AB_CD = $(MOZ_UI_LOCALE)
109
110 AB := $(firstword $(subst -, ,$(AB_CD)))
111
112 clean clobber repackage::
113 $(RM) -r $(dist_dest)
114
115 ifdef LIBXUL_SDK
116 APPFILES = Resources
117 else
118 APPFILES = MacOS
119 endif
120
121 MAC_BUNDLE_VERSION = $(shell $(PYTHON) $(srcdir)/macversion.py --version=$(MOZ_APP_VERSION) --buildid=$(DEPTH)/config/buildid)
122
123 .PHONY: repackage
124 tools repackage:: $(PROGRAM)
125 $(MKDIR) -p $(dist_dest)/Contents/MacOS
126 $(MKDIR) -p $(dist_dest)/Contents/Resources/$(AB).lproj
127 rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents $(dist_dest) --exclude English.lproj
128 rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(dist_dest)/Contents/Resources/$(AB).lproj
129 sed -e 's/%APP_VERSION%/$(MOZ_APP_VERSION)/' -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' -e 's/%MOZ_MACBUNDLE_ID%/$(MOZ_MACBUNDLE_ID)/' -e 's/%MAC_BUNDLE_VERSION%/$(MAC_BUNDLE_VERSION)/' $(srcdir)/macbuild/Contents/Info.plist.in > $(dist_dest)/Contents/Info.plist
130 sed -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(dist_dest)/Contents/Resources/$(AB).lproj/InfoPlist.strings
131 rsync -a $(DIST)/bin/ $(dist_dest)/Contents/$(APPFILES)
132 $(RM) $(dist_dest)/Contents/MacOS/$(PROGRAM)
133 rsync -aL $(PROGRAM) $(dist_dest)/Contents/MacOS
134 cp -RL $(DIST)/branding/firefox.icns $(dist_dest)/Contents/Resources/firefox.icns
135 cp -RL $(DIST)/branding/document.icns $(dist_dest)/Contents/Resources/document.icns
136 printf APPLMOZB > $(dist_dest)/Contents/PkgInfo
137 endif
138
139 ifdef LIBXUL_SDK #{
140 ifndef SKIP_COPY_XULRUNNER #{
141 libs::
142 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) #{
143 rsync -a --copy-unsafe-links $(LIBXUL_DIST)/XUL.framework $(dist_dest)/Contents/Frameworks
144 else
145 $(NSINSTALL) -D $(DIST)/bin/xulrunner
146 (cd $(LIBXUL_SDK)/bin && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DIST)/bin/xulrunner && tar -xf -)
147 endif #} cocoa
148 endif #} SKIP_COPY_XULRUNNER
149 endif #} LIBXUL_SDK

mercurial