Bug 504804 - Skip policy checks when virus scanning is disabled. r=sdwilsh.
[mozilla-central.git] / Makefile.in
blob8d0edeae47c8b9be6d24ff922ef6fe5ba5ce4601
2 # ***** BEGIN LICENSE BLOCK *****
3 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 # The contents of this file are subject to the Mozilla Public License Version
6 # 1.1 (the "License"); you may not use this file except in compliance with
7 # the License. You may obtain a copy of the License at
8 # http://www.mozilla.org/MPL/
10 # Software distributed under the License is distributed on an "AS IS" basis,
11 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 # for the specific language governing rights and limitations under the
13 # License.
15 # The Original Code is mozilla.org code.
17 # The Initial Developer of the Original Code is
18 # Netscape Communications Corporation.
19 # Portions created by the Initial Developer are Copyright (C) 1998
20 # the Initial Developer. All Rights Reserved.
22 # Contributor(s):
24 # Alternatively, the contents of this file may be used under the terms of
25 # either the GNU General Public License Version 2 or later (the "GPL"), or
26 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 # in which case the provisions of the GPL or the LGPL are applicable instead
28 # of those above. If you wish to allow use of your version of this file only
29 # under the terms of either the GPL or the LGPL, and not to allow others to
30 # use your version of this file under the terms of the MPL, indicate your
31 # decision by deleting the provisions above and replace them with the notice
32 # and other provisions required by the GPL or the LGPL. If you do not delete
33 # the provisions above, a recipient may use your version of this file under
34 # the terms of any one of the MPL, the GPL or the LGPL.
36 # ***** END LICENSE BLOCK *****
38 DEPTH = .
39 topsrcdir = @top_srcdir@
40 srcdir = @srcdir@
41 VPATH = @srcdir@
43 ifndef .PYMAKE
44 ifeq (,$(MAKE_VERSION))
45 $(error GNU Make is required)
46 endif
47 ifeq (,$(filter-out 3.78 3.79,$(MAKE_VERSION)))
48 $(error GNU Make 3.80 or higher is required)
49 endif
50 endif
52 include $(DEPTH)/config/autoconf.mk
54 default::
56 TIERS += base
59 # tier "base" - basic setup
61 tier_base_dirs = \
62 config \
63 build \
64 memory \
65 probes \
66 $(NULL)
68 ifdef COMPILE_ENVIRONMENT
69 include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
70 endif
72 TIERS += testharness
74 # test harnesses
75 ifdef ENABLE_TESTS
76 tier_testharness_dirs += testing/xpcshell
77 endif
79 include $(topsrcdir)/config/config.mk
81 GARBAGE_DIRS += dist _javagen _profile _tests staticlib
82 DIST_GARBAGE = config.cache config.log config.status config-defs.h \
83 dependencies.beos config/autoconf.mk \
84 unallmakefiles mozilla-config.h \
85 netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
86 $(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
88 default alldep all:: $(topsrcdir)/configure config.status
89 $(RM) -rf $(DIST)/sdk
90 $(RM) -rf $(DIST)/include
91 $(RM) -rf $(DIST)/private
92 $(RM) -rf $(DIST)/public
93 $(RM) -rf $(DIST)/bin/components
94 $(RM) -rf _tests
96 $(topsrcdir)/configure: $(topsrcdir)/configure.in
97 @echo "STOP! configure.in has changed, and your configure is out of date."
98 @echo "Please rerun autoconf and re-configure your build directory."
99 @echo "To ignore this message, touch 'configure' in the source directory,"
100 @echo "but your build might not succeed."
101 @exit 1
103 config.status: $(topsrcdir)/configure
104 @echo "STOP! configure has changed and needs to be run in this build directory."
105 @echo "Please rerun configure."
106 @echo "To ignore this message, touch 'config.status' in the build directory,"
107 @echo "but your build might not succeed."
108 @exit 1
110 # Build pseudo-external modules first when export is explicitly called
111 export::
112 $(RM) -rf $(DIST)/sdk
113 $(MAKE) -C config export
114 $(MAKE) tier_nspr
116 ifdef ENABLE_TESTS
117 # Additional makefile targets to call automated test suites
118 include $(topsrcdir)/testing/testsuite-targets.mk
119 else
120 # OS X Universal builds will want to call this, so stub it out
121 package-tests:
122 endif
124 include $(topsrcdir)/config/rules.mk
126 distclean::
127 cat unallmakefiles | $(XARGS) rm -f
128 rm -f unallmakefiles $(DIST_GARBAGE)
130 ifeq ($(OS_ARCH),WINNT)
131 # we want to copy PDB files on Windows
132 MAKE_SYM_STORE_ARGS := -c
133 ifdef PDBSTR_PATH
134 MAKE_SYM_STORE_ARGS += -i
135 endif
136 ifeq (,$(CYGWIN_WRAPPER))
137 # this doesn't work with Cygwin Python
138 MAKE_SYM_STORE_ARGS += --vcs-info
139 endif
140 DUMP_SYMS_BIN ?= $(topsrcdir)/toolkit/crashreporter/tools/win32/dump_syms.exe
141 # PDB files don't get moved to dist, so we need to scan the whole objdir
142 MAKE_SYM_STORE_PATH := .
143 endif
144 ifeq ($(OS_ARCH),Darwin)
145 # need to pass arch flags for universal builds
146 ifdef UNIVERSAL_BINARY
147 MAKE_SYM_STORE_ARGS := -c -a "ppc i386" --vcs-info
148 MAKE_SYM_STORE_PATH := $(DIST)/universal
149 else
150 MAKE_SYM_STORE_ARGS := -c -a $(OS_TEST) --vcs-info
151 MAKE_SYM_STORE_PATH := $(DIST)/bin
152 endif
153 DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
154 endif
155 ifeq (,$(filter-out Linux SunOS,$(OS_ARCH)))
156 MAKE_SYM_STORE_ARGS := -c --vcs-info
157 DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
158 MAKE_SYM_STORE_PATH := $(DIST)/bin
159 endif
161 SYM_STORE_SOURCE_DIRS := $(topsrcdir)
163 include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
165 ifdef MOZ_SYMBOLS_EXTRA_BUILDID
166 EXTRA_BUILDID := -$(MOZ_SYMBOLS_EXTRA_BUILDID)
167 endif
169 SYMBOL_INDEX_NAME = \
170 $(MOZ_APP_NAME)-$(MOZ_APP_VERSION)-$(OS_ARCH)-$(BUILDID)$(EXTRA_BUILDID)-symbols.txt
172 buildsymbols:
173 ifdef MOZ_CRASHREPORTER
174 echo building symbol store
175 $(RM) -rf $(DIST)/crashreporter-symbols
176 $(RM) -f "$(DIST)/$(SYMBOL_ARCHIVE_BASENAME).zip"
177 $(NSINSTALL) -D $(DIST)/crashreporter-symbols
178 $(PYTHON) $(topsrcdir)/toolkit/crashreporter/tools/symbolstore.py \
179 $(MAKE_SYM_STORE_ARGS) \
180 $(foreach dir,$(SYM_STORE_SOURCE_DIRS),-s $(dir)) \
181 $(DUMP_SYMS_BIN) \
182 $(DIST)/crashreporter-symbols \
183 $(MAKE_SYM_STORE_PATH) > \
184 $(DIST)/crashreporter-symbols/$(SYMBOL_INDEX_NAME)
185 echo packing symbols
186 $(NSINSTALL) -D $(DIST)/$(PKG_PATH)
187 cd $(DIST)/crashreporter-symbols && \
188 zip -r9D "../$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip" .
189 else
190 ifdef WINCE
191 ifdef SYMBOLSTORE_PATH
192 echo building symbol store with symstore.exe
193 $(RM) -rf $(DIST)/symbols
194 $(RM) -f "$(DIST)/$(SYMBOL_ARCHIVE_BASENAME).zip"
195 $(NSINSTALL) -D $(DIST)/symbols
196 $(SYMBOLSTORE_PATH) add -r -f "$(subst /,\,$(shell pwd -W))\*.PDB" \
197 -s $(DIST)/symbols/ -t "$(MOZ_PKG_APPNAME)" -v "$(MOZ_PKG_VERSION)"
198 echo packing symbols
199 $(NSINSTALL) -D $(DIST)/$(PKG_PATH)
200 cd $(DIST)/symbols && \
201 zip -r9D "../$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip" .
202 endif # SYMBOLSTORE_PATH
203 endif # WINCE
204 endif # MOZ_CRASHREPORTER
206 uploadsymbols:
207 ifdef MOZ_CRASHREPORTER
208 $(SHELL) $(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.sh "$(DIST)/$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip"
209 endif
211 # defined in package-name.mk
212 export MOZ_SOURCE_STAMP
214 #XXX: this is a hack, since we don't want to clobber for MSVC
215 # PGO support, but we can't do this test in client.mk
216 ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_)
217 # No point in clobbering if PGO has been explicitly disabled.
218 ifndef NO_PROFILE_GUIDED_OPTIMIZE
219 maybe_clobber_profiledbuild: clean
220 else
221 maybe_clobber_profiledbuild:
222 endif
223 else
224 maybe_clobber_profiledbuild:
225 endif
227 .PHONY: maybe_clobber_profiledbuild