Bug 575870 - Enable the firefox button on xp themed, classic, and aero basic. r=dao...
[mozilla-central.git] / build / Makefile.in
blob878e15b9b0ede8206138850695bdd898fc6fabab
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 Communicator client code, released
16 # March 31, 1998.
18 # The Initial Developer of the Original Code is
19 # Netscape Communications Corporation.
20 # Portions created by the Initial Developer are Copyright (C) 1998
21 # the Initial Developer. All Rights Reserved.
23 # Contributor(s):
25 # Alternatively, the contents of this file may be used under the terms of
26 # either of the GNU General Public License Version 2 or later (the "GPL"),
27 # or 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 MODULE = build
48 ifeq (,$(filter WINCE WINNT OS2,$(OS_ARCH)))
49 DIRS = unix
50 endif
52 ifeq (WINNT,$(OS_ARCH))
53 DIRS = win32
54 endif
56 ifdef WINCE
57 # We need jemalloc built before the shunt
58 ifdef MOZ_MEMORY
59 DIRS += wince/tools \
60 $(DEPTH)/memory/jemalloc \
61 wince/shunt \
62 $(DEPTH)/memory/mozalloc \
63 $(NULL)
64 else
65 DIRS += wince/tools \
66 wince/shunt \
67 $(DEPTH)/memory/mozalloc \
68 $(NULL)
69 endif
70 endif
72 DIRS += pgo
74 ifeq (Android,$(OS_TARGET))
75 DIRS += mobile/sutagent/android
76 endif
78 include $(topsrcdir)/config/rules.mk
80 # we install to _leaktest/
81 TARGET_DEPTH = ..
82 include $(srcdir)/automation-build.mk
84 _LEAKTEST_DIR = $(DEPTH)/_leaktest
85 GARBAGE_DIRS += $(_LEAKTEST_DIR)
87 _LEAKTEST_FILES = \
88 automation.py \
89 automationutils.py \
90 leaktest.py \
91 bloatcycle.html \
92 $(topsrcdir)/build/pgo/server-locations.txt \
93 $(NULL)
95 leaktest.py: leaktest.py.in
96 $(PYTHON) $(topsrcdir)/config/Preprocessor.py $^ > $@
97 chmod +x $@
98 GARBAGE += leaktest.py
100 libs:: $(_LEAKTEST_FILES)
101 $(INSTALL) $^ $(_LEAKTEST_DIR)
103 ifdef ENABLE_TESTS
104 # Install bloaturls.txt file for tinderbox bloat test.
105 libs:: bloaturls.txt
106 $(INSTALL) $< $(DIST)/bin
108 # Install bloatcycle.html into dist/bin/res, for auto-cycling
109 # of bloaturls.txt. This is for browsers that can't do -f
110 # autocycling of URLs.
111 libs:: bloatcycle.html
112 $(INSTALL) $< $(DIST)/bin/res
114 libs:: $(topsrcdir)/tools/rb/fix_stack_using_bpsyms.py
115 $(INSTALL) $< $(DIST)/bin
117 ifeq ($(OS_ARCH),Darwin)
118 libs:: $(topsrcdir)/tools/rb/fix-macosx-stack.pl
119 $(INSTALL) $< $(DIST)/bin
120 libs:: $(topsrcdir)/tools/rb/fix_macosx_stack.py
121 $(INSTALL) $< $(DIST)/bin
123 # Basic unit tests for some stuff in the unify script
124 check::
125 # build ppc/i386 binaries, and unify them
126 rm -f unify-test-ppc unify-test-i386 unify-test-universal
127 $(HOST_CC) -arch ppc $(srcdir)/unify-test.c -o unify-test-ppc
128 $(HOST_CC) -arch i386 $(srcdir)/unify-test.c -o unify-test-i386
129 @if ! $(srcdir)/macosx/universal/unify ./unify-test-ppc ./unify-test-i386 \
130 ./unify-test-universal; then \
131 echo "TEST-UNEXPECTED-FAIL | build/ | unify failed to produce a universal binary!"; \
132 false; \
134 @if test ! -f ./unify-test-universal; then \
135 echo "TEST-UNEXPECTED-FAIL | build/ | unify failed to produce a universal binary!"; \
136 false; \
138 @if ! file -b ./unify-test-universal | head -n1 | grep -q "^Mach-O universal binary"; then \
139 echo "TEST-UNEXPECTED-FAIL | build/ | unify failed to produce a universal binary!"; \
140 false; \
141 else \
142 echo "TEST-PASS | build/ | unify produced a universal binary!"; \
144 # try building an x86-64 binary. if that succeeds, try unifying it
145 # with an i386 binary
146 rm -f unify-test-x86_64 unify-test-universal-64
147 -$(HOST_CC) -arch x86_64 $(srcdir)/unify-test.c -o unify-test-x86_64
148 @if test -f ./unify-test-x86_64; then \
149 if ! $(srcdir)/macosx/universal/unify ./unify-test-x86_64 ./unify-test-i386 \
150 ./unify-test-universal-64; then \
151 echo "TEST-UNEXPECTED-FAIL | build/ | unify failed to produce a universal binary with a 64-bit input!"; \
152 false; \
153 fi; \
154 if test ! -f ./unify-test-universal-64; then \
155 echo "TEST-UNEXPECTED-FAIL | build/ | unify failed to produce a universal binary with a 64-bit input!"; \
156 false; \
157 fi; \
158 if ! file -b ./unify-test-universal-64 | head -n1 | grep -q "^Mach-O universal binary"; then \
159 echo "TEST-UNEXPECTED-FAIL | build/ | unify failed to produce a universal binary with a 64-bit input!"; \
160 false; \
161 else \
162 echo "TEST-PASS | build/ | unify produced a universal binary with a 64-bit input!"; \
163 fi \
165 # try unifying two identical Java class files
166 rm -f unifytesta.class unifytestb.class unifytestc.class
167 cp $(srcdir)/unifytest.class ./unifytesta.class
168 cp $(srcdir)/unifytest.class ./unifytestb.class
169 @if ! $(srcdir)/macosx/universal/unify ./unifytesta.class ./unifytestb.class \
170 ./unifytestc.class; then \
171 echo "TEST-UNEXPECTED-FAIL | build/ | unify failed to unify a Java class file!"; \
172 false; \
174 @if test ! -f ./unifytestc.class; then \
175 echo "TEST-UNEXPECTED-FAIL | build/ | unify failed to unify a Java class file!"; \
176 false; \
178 @if ! diff -q ./unifytesta.class ./unifytestc.class; then \
179 echo "TEST-UNEXPECTED-FAIL | build/ | unify failed to unify a Java class file!"; \
180 false; \
181 else \
182 echo "TEST-PASS | build/ | unify unified a Java class file!"; \
184 # try unifying some files that differ only in line ordering
185 rm -rf unify-sort-test
186 mkdir unify-sort-test unify-sort-test/a unify-sort-test/b
187 printf "lmn\nabc\nxyz\n" > unify-sort-test/a/file.foo
188 printf "xyz\nlmn\nabc" > unify-sort-test/b/file.foo
189 printf "lmn\nabc\nxyz\n" > unify-sort-test/expected-result
190 @if ! $(srcdir)/macosx/universal/unify --unify-with-sort "\.foo$$" \
191 ./unify-sort-test/a ./unify-sort-test/b \
192 ./unify-sort-test/c; then \
193 echo "TEST-UNEXPECTED-FAIL | build/ | unify failed to unify files with differing line ordering!"; \
194 false; \
196 @if ! diff -q ./unify-sort-test/expected-result ./unify-sort-test/c/file.foo; then \
197 echo "TEST-UNEXPECTED-FAIL | build/ | unify failed to unify files with differing line ordering!"; \
198 false; \
199 else \
200 echo "TEST-PASS | build/ | unify unified files with differing line ordering!"; \
202 endif
204 ifeq ($(OS_ARCH),Linux)
205 libs:: $(topsrcdir)/tools/rb/fix-linux-stack.pl
206 $(INSTALL) $< $(DIST)/bin
207 endif
209 GARBAGE += $(srcdir)/automationutils.pyc
210 endif # ENABLE_TESTS