fix signed overflow warning
[platform/upstream/v8.git] / Makefile
1 # Copyright 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are
4 # met:
5 #
6 #     * Redistributions of source code must retain the above copyright
7 #       notice, this list of conditions and the following disclaimer.
8 #     * Redistributions in binary form must reproduce the above
9 #       copyright notice, this list of conditions and the following
10 #       disclaimer in the documentation and/or other materials provided
11 #       with the distribution.
12 #     * Neither the name of Google Inc. nor the names of its
13 #       contributors may be used to endorse or promote products derived
14 #       from this software without specific prior written permission.
15 #
16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28
29 # Variable default definitions. Override them by exporting them in your shell.
30 CXX ?= g++
31 LINK ?= g++
32 OUTDIR ?= out
33 TESTJOBS ?=
34 GYPFLAGS ?=
35 TESTFLAGS ?=
36 ANDROID_NDK_ROOT ?=
37 ANDROID_NDK_HOST_ARCH ?=
38 ANDROID_TOOLCHAIN ?=
39 ANDROID_V8 ?= /data/local/tmp/v8
40 NACL_SDK_ROOT ?=
41
42 # Special build flags. Use them like this: "make library=shared"
43
44 # library=shared || component=shared_library
45 ifeq ($(library), shared)
46   GYPFLAGS += -Dcomponent=shared_library
47 endif
48 ifdef component
49   GYPFLAGS += -Dcomponent=$(component)
50 endif
51 # console=readline
52 ifdef console
53   GYPFLAGS += -Dconsole=$(console)
54 endif
55 # disassembler=on
56 ifeq ($(disassembler), on)
57   GYPFLAGS += -Dv8_enable_disassembler=1
58 endif
59 # objectprint=on
60 ifeq ($(objectprint), on)
61   GYPFLAGS += -Dv8_object_print=1
62 endif
63 # verifyheap=on
64 ifeq ($(verifyheap), on)
65   GYPFLAGS += -Dv8_enable_verify_heap=1
66 endif
67 # backtrace=off
68 ifeq ($(backtrace), off)
69   GYPFLAGS += -Dv8_enable_backtrace=0
70 else
71   GYPFLAGS += -Dv8_enable_backtrace=1
72 endif
73 # verifypredictable=on
74 ifeq ($(verifypredictable), on)
75   GYPFLAGS += -Dv8_enable_verify_predictable=1
76 endif
77 # snapshot=off
78 ifeq ($(snapshot), off)
79   GYPFLAGS += -Dv8_use_snapshot='false'
80 endif
81 # extrachecks=on/off
82 ifeq ($(extrachecks), on)
83   GYPFLAGS += -Dv8_enable_extra_checks=1 -Dv8_enable_handle_zapping=1
84 endif
85 ifeq ($(extrachecks), off)
86   GYPFLAGS += -Dv8_enable_extra_checks=0 -Dv8_enable_handle_zapping=0
87 endif
88 # gdbjit=on/off
89 ifeq ($(gdbjit), on)
90   GYPFLAGS += -Dv8_enable_gdbjit=1
91 endif
92 ifeq ($(gdbjit), off)
93   GYPFLAGS += -Dv8_enable_gdbjit=0
94 endif
95 # vtunejit=on
96 ifeq ($(vtunejit), on)
97   GYPFLAGS += -Dv8_enable_vtunejit=1
98 endif
99 # optdebug=on
100 ifeq ($(optdebug), on)
101   GYPFLAGS += -Dv8_optimized_debug=2
102 endif
103 # unalignedaccess=on
104 ifeq ($(unalignedaccess), on)
105   GYPFLAGS += -Dv8_can_use_unaligned_accesses=true
106 endif
107 # randomseed=12345, disable random seed via randomseed=0
108 ifdef randomseed
109   GYPFLAGS += -Dv8_random_seed=$(randomseed)
110 endif
111 # soname_version=1.2.3
112 ifdef soname_version
113   GYPFLAGS += -Dsoname_version=$(soname_version)
114 endif
115 # werror=no
116 ifeq ($(werror), no)
117   GYPFLAGS += -Dwerror=''
118 endif
119 # presubmit=no
120 ifeq ($(presubmit), no)
121   TESTFLAGS += --no-presubmit
122 endif
123 # strictaliasing=off (workaround for GCC-4.5)
124 ifeq ($(strictaliasing), off)
125   GYPFLAGS += -Dv8_no_strict_aliasing=1
126 endif
127 # regexp=interpreted
128 ifeq ($(regexp), interpreted)
129   GYPFLAGS += -Dv8_interpreted_regexp=1
130 endif
131 # i18nsupport=off
132 ifeq ($(i18nsupport), off)
133   GYPFLAGS += -Dv8_enable_i18n_support=0
134   TESTFLAGS += --noi18n
135 endif
136 # use_system_icu=on
137 ifeq ($(use_system_icu), on)
138   GYPFLAGS += -Duse_system_icu=1
139 endif
140 # deprecation_warnings=on
141 ifeq ($(deprecationwarnings), on)
142   GYPFLAGS += -Dv8_deprecation_warnings=1
143 endif
144 # asan=/path/to/clang++
145 ifneq ($(strip $(asan)),)
146   GYPFLAGS += -Dasan=1
147   export CC=$(dir $(asan))clang
148   export CXX=$(asan)
149   export CXX_host=$(asan)
150   export LINK=$(asan)
151   export ASAN_SYMBOLIZER_PATH=$(dir $(asan))llvm-symbolizer
152   TESTFLAGS += --asan
153   ifeq ($(lsan), on)
154     GYPFLAGS += -Dlsan=1
155   endif
156 endif
157
158 # arm specific flags.
159 # arm_version=<number | "default">
160 ifneq ($(strip $(arm_version)),)
161   GYPFLAGS += -Darm_version=$(arm_version)
162 else
163 # Deprecated (use arm_version instead): armv7=false/true
164 ifeq ($(armv7), false)
165   GYPFLAGS += -Darm_version=6
166 else
167 ifeq ($(armv7), true)
168   GYPFLAGS += -Darm_version=7
169 endif
170 endif
171 endif
172 # hardfp=on/off. Deprecated, use armfloatabi
173 ifeq ($(hardfp),on)
174   GYPFLAGS += -Darm_float_abi=hard
175 else
176 ifeq ($(hardfp),off)
177   GYPFLAGS += -Darm_float_abi=softfp
178 endif
179 endif
180 # fpu: armfpu=xxx
181 # xxx: vfp, vfpv3-d16, vfpv3, neon.
182 ifeq ($(armfpu),)
183   GYPFLAGS += -Darm_fpu=default
184 else
185   GYPFLAGS += -Darm_fpu=$(armfpu)
186 endif
187 # float abi: armfloatabi=softfp/hard
188 ifeq ($(armfloatabi),)
189 ifeq ($(hardfp),)
190   GYPFLAGS += -Darm_float_abi=default
191 endif
192 else
193   GYPFLAGS += -Darm_float_abi=$(armfloatabi)
194 endif
195 # armthumb=on/off
196 ifeq ($(armthumb), off)
197   GYPFLAGS += -Darm_thumb=0
198 else
199 ifeq ($(armthumb), on)
200   GYPFLAGS += -Darm_thumb=1
201 endif
202 endif
203 # arm_test_noprobe=on
204 # With this flag set, by default v8 will only use features implied
205 # by the compiler (no probe). This is done by modifying the default
206 # values of enable_armv7, enable_vfp3, enable_32dregs and enable_neon.
207 # Modifying these flags when launching v8 will enable the probing for
208 # the specified values.
209 ifeq ($(arm_test_noprobe), on)
210   GYPFLAGS += -Darm_test_noprobe=on
211 endif
212
213 # ----------------- available targets: --------------------
214 # - "builddeps": pulls in external dependencies for building
215 # - "dependencies": pulls in all external dependencies
216 # - "grokdump": rebuilds heap constants lists used by grokdump
217 # - any arch listed in ARCHES (see below)
218 # - any mode listed in MODES
219 # - every combination <arch>.<mode>, e.g. "ia32.release"
220 # - "native": current host's architecture, release mode
221 # - any of the above with .check appended, e.g. "ia32.release.check"
222 # - "android": cross-compile for Android/ARM
223 # - "nacl" : cross-compile for Native Client (ia32 and x64)
224 # - default (no target specified): build all DEFAULT_ARCHES and MODES
225 # - "check": build all targets and run all tests
226 # - "<arch>.clean" for any <arch> in ARCHES
227 # - "clean": clean all ARCHES
228
229 # ----------------- internal stuff ------------------------
230
231 # Architectures and modes to be compiled. Consider these to be internal
232 # variables, don't override them (use the targets instead).
233 ARCHES = ia32 x64 x32 arm arm64 mips mipsel mips64el x87
234 DEFAULT_ARCHES = ia32 x64 arm
235 MODES = release debug optdebug
236 DEFAULT_MODES = release debug
237 ANDROID_ARCHES = android_ia32 android_arm android_arm64 android_mipsel android_x87
238 NACL_ARCHES = nacl_ia32 nacl_x64
239
240 # List of files that trigger Makefile regeneration:
241 GYPFILES = build/all.gyp build/features.gypi build/standalone.gypi \
242            build/toolchain.gypi samples/samples.gyp src/d8.gyp \
243            test/cctest/cctest.gyp test/unittests/unittests.gyp tools/gyp/v8.gyp
244
245 # If vtunejit=on, the v8vtune.gyp will be appended.
246 ifeq ($(vtunejit), on)
247   GYPFILES += src/third_party/vtune/v8vtune.gyp
248 endif
249 # Generates all combinations of ARCHES and MODES, e.g. "ia32.release".
250 BUILDS = $(foreach mode,$(MODES),$(addsuffix .$(mode),$(ARCHES)))
251 ANDROID_BUILDS = $(foreach mode,$(MODES), \
252                    $(addsuffix .$(mode),$(ANDROID_ARCHES)))
253 NACL_BUILDS = $(foreach mode,$(MODES), \
254                    $(addsuffix .$(mode),$(NACL_ARCHES)))
255 # Generates corresponding test targets, e.g. "ia32.release.check".
256 CHECKS = $(addsuffix .check,$(BUILDS))
257 QUICKCHECKS = $(addsuffix .quickcheck,$(BUILDS))
258 ANDROID_CHECKS = $(addsuffix .check,$(ANDROID_BUILDS))
259 NACL_CHECKS = $(addsuffix .check,$(NACL_BUILDS))
260 # File where previously used GYPFLAGS are stored.
261 ENVFILE = $(OUTDIR)/environment
262
263 .PHONY: all check clean builddeps dependencies $(ENVFILE).new native \
264         qc quickcheck $(QUICKCHECKS) turbocheck \
265         $(addsuffix .quickcheck,$(MODES)) $(addsuffix .quickcheck,$(ARCHES)) \
266         $(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \
267         $(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \
268         $(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \
269         must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN \
270         $(NACL_ARCHES) $(NACL_BUILDS) $(NACL_CHECKS) \
271         must-set-NACL_SDK_ROOT
272
273 # Target definitions. "all" is the default.
274 all: $(DEFAULT_MODES)
275
276 # Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile
277 # having been created before.
278 buildbot:
279         $(MAKE) -C "$(OUTDIR)" BUILDTYPE=$(BUILDTYPE) \
280                 builddir="$(abspath $(OUTDIR))/$(BUILDTYPE)"
281
282 # Compile targets. MODES and ARCHES are convenience targets.
283 .SECONDEXPANSION:
284 $(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES))
285
286 $(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES))
287
288 # Defines how to build a particular target (e.g. ia32.release).
289 $(BUILDS): $(OUTDIR)/Makefile.$$@
290         @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \
291                  CXX="$(CXX)" LINK="$(LINK)" \
292                  BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
293                              python -c "print \
294                              raw_input().replace('opt', '').capitalize()") \
295                  builddir="$(shell pwd)/$(OUTDIR)/$@"
296
297 native: $(OUTDIR)/Makefile.native
298         @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \
299                  CXX="$(CXX)" LINK="$(LINK)" BUILDTYPE=Release \
300                  builddir="$(shell pwd)/$(OUTDIR)/$@"
301
302 $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES))
303
304 $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \
305                    must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN Makefile.android
306         @$(MAKE) -f Makefile.android $@ \
307                 ARCH="$(basename $@)" \
308                 MODE="$(subst .,,$(suffix $@))" \
309                 OUTDIR="$(OUTDIR)" \
310                 GYPFLAGS="$(GYPFLAGS)"
311
312 $(NACL_ARCHES): $(addprefix $$@.,$(MODES))
313
314 $(NACL_BUILDS): $(GYPFILES) $(ENVFILE) \
315                    Makefile.nacl must-set-NACL_SDK_ROOT
316         @$(MAKE) -f Makefile.nacl $@ \
317                 ARCH="$(basename $@)" \
318                 MODE="$(subst .,,$(suffix $@))" \
319                 OUTDIR="$(OUTDIR)" \
320                 GYPFLAGS="$(GYPFLAGS)"
321
322 # Test targets.
323 check: all
324         @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
325             --arch=$(shell echo $(DEFAULT_ARCHES) | sed -e 's/ /,/g') \
326             $(TESTFLAGS)
327
328 $(addsuffix .check,$(MODES)): $$(basename $$@)
329         @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
330             --mode=$(basename $@) $(TESTFLAGS)
331
332 $(addsuffix .check,$(ARCHES)): $$(basename $$@)
333         @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
334             --arch=$(basename $@) $(TESTFLAGS)
335
336 $(CHECKS): $$(basename $$@)
337         @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
338             --arch-and-mode=$(basename $@) $(TESTFLAGS)
339
340 $(addsuffix .quickcheck,$(MODES)): $$(basename $$@)
341         @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
342             --mode=$(basename $@) $(TESTFLAGS) --quickcheck
343
344 $(addsuffix .quickcheck,$(ARCHES)): $$(basename $$@)
345         @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
346             --arch=$(basename $@) $(TESTFLAGS) --quickcheck
347
348 $(QUICKCHECKS): $$(basename $$@)
349         @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
350             --arch-and-mode=$(basename $@) $(TESTFLAGS) --quickcheck
351
352 $(addsuffix .sync, $(ANDROID_BUILDS)): $$(basename $$@)
353         @tools/android-sync.sh $(basename $@) $(OUTDIR) \
354                                $(shell pwd) $(ANDROID_V8)
355
356 $(addsuffix .check, $(ANDROID_BUILDS)): $$(basename $$@).sync
357         @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
358              --arch-and-mode=$(basename $@) \
359              --timeout=600 \
360              --command-prefix="tools/android-run.py" $(TESTFLAGS)
361
362 $(addsuffix .check, $(ANDROID_ARCHES)): \
363                 $(addprefix $$(basename $$@).,$(MODES)).check
364
365 $(addsuffix .check, $(NACL_BUILDS)): $$(basename $$@)
366         @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
367              --arch-and-mode=$(basename $@) \
368              --timeout=600 --nopresubmit --noi18n \
369              --command-prefix="tools/nacl-run.py"
370
371 $(addsuffix .check, $(NACL_ARCHES)): \
372                 $(addprefix $$(basename $$@).,$(MODES)).check
373
374 native.check: native
375         @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR)/native \
376             --arch-and-mode=. $(TESTFLAGS)
377
378 SUPERFASTTESTMODES = ia32.release
379 FASTTESTMODES = $(SUPERFASTTESTMODES),x64.release,ia32.optdebug,x64.optdebug,arm.optdebug,arm64.release
380 FASTCOMPILEMODES = $(FASTTESTMODES),arm64.optdebug
381
382 COMMA = ,
383 EMPTY =
384 SPACE = $(EMPTY) $(EMPTY)
385 quickcheck: $(subst $(COMMA),$(SPACE),$(FASTCOMPILEMODES))
386         tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
387             --arch-and-mode=$(SUPERFASTTESTMODES) $(TESTFLAGS) --quickcheck \
388             --download-data mozilla webkit
389         tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
390             --arch-and-mode=$(FASTTESTMODES) $(TESTFLAGS) --quickcheck
391 qc: quickcheck
392
393 turbocheck: $(subst $(COMMA),$(SPACE),$(FASTCOMPILEMODES))
394         tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
395             --arch-and-mode=$(SUPERFASTTESTMODES) $(TESTFLAGS) \
396             --quickcheck --variants=turbofan --download-data mozilla webkit
397         tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
398             --arch-and-mode=$(FASTTESTMODES) $(TESTFLAGS) \
399             --quickcheck --variants=turbofan
400 tc: turbocheck
401
402 # Clean targets. You can clean each architecture individually, or everything.
403 $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)):
404         rm -f $(OUTDIR)/Makefile.$(basename $@)*
405         rm -rf $(OUTDIR)/$(basename $@).release
406         rm -rf $(OUTDIR)/$(basename $@).debug
407         rm -rf $(OUTDIR)/$(basename $@).optdebug
408         find $(OUTDIR) -regex '.*\(host\|target\)\.$(basename $@).*\.mk' -delete
409
410 native.clean:
411         rm -f $(OUTDIR)/Makefile.native
412         rm -rf $(OUTDIR)/native
413         find $(OUTDIR) -regex '.*\(host\|target\)\.native\.mk' -delete
414
415 clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)) native.clean gtags.clean
416
417 # GYP file generation targets.
418 OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(BUILDS))
419 $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE)
420         $(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \
421                 cut -f 2 -d " " | cut -f 1 -d "-" ))
422         $(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH)))
423         $(eval V8_TARGET_ARCH:=$(subst .,,$(suffix $(basename $@))))
424         PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH):$(shell pwd)/build/gyp/pylib:$(PYTHONPATH)" \
425         GYP_GENERATORS=make \
426         build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
427                       -Ibuild/standalone.gypi --depth=. \
428                       -Dv8_target_arch=$(V8_TARGET_ARCH) \
429                       $(if $(findstring $(CXX_TARGET_ARCH),$(V8_TARGET_ARCH)), \
430                       -Dtarget_arch=$(V8_TARGET_ARCH),) \
431                       $(if $(findstring optdebug,$@),-Dv8_optimized_debug=2,) \
432                       -S$(suffix $(basename $@))$(suffix $@) $(GYPFLAGS)
433
434 $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE)
435         PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH):$(shell pwd)/build/gyp/pylib:$(PYTHONPATH)" \
436         GYP_GENERATORS=make \
437         build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
438                       -Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS)
439
440 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN:
441 ifndef ANDROID_NDK_ROOT
442 ifndef ANDROID_TOOLCHAIN
443           $(error ANDROID_NDK_ROOT or ANDROID_TOOLCHAIN must be set))
444 endif
445 endif
446
447 # Note that NACL_SDK_ROOT must be set to point to an appropriate
448 # Native Client SDK before using this makefile. You can download
449 # an SDK here:
450 #   https://developers.google.com/native-client/sdk/download
451 # The path indicated by NACL_SDK_ROOT will typically end with
452 # a folder for a pepper version such as "pepper_25" that should
453 # have "tools" and "toolchain" subdirectories.
454 must-set-NACL_SDK_ROOT:
455 ifndef NACL_SDK_ROOT
456           $(error NACL_SDK_ROOT must be set)
457 endif
458
459 # Replaces the old with the new environment file if they're different, which
460 # will trigger GYP to regenerate Makefiles.
461 $(ENVFILE): $(ENVFILE).new
462         @if test -r $(ENVFILE) && cmp $(ENVFILE).new $(ENVFILE) > /dev/null; \
463             then rm $(ENVFILE).new; \
464             else mv $(ENVFILE).new $(ENVFILE); fi
465
466 # Stores current GYPFLAGS in a file.
467 $(ENVFILE).new:
468         @mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS)" > $(ENVFILE).new; \
469             echo "CXX=$(CXX)" >> $(ENVFILE).new
470
471 # Heap constants for grokdump.
472 DUMP_FILE = tools/v8heapconst.py
473 grokdump: ia32.release
474         @cat $(DUMP_FILE).tmpl > $(DUMP_FILE)
475         @$(OUTDIR)/ia32.release/d8 --dump-heap-constants >> $(DUMP_FILE)
476
477 # Support for the GNU GLOBAL Source Code Tag System.
478 gtags.files: $(GYPFILES) $(ENVFILE)
479         @find include src test -name '*.h' -o -name '*.cc' -o -name '*.c' > $@
480
481 # We need to manually set the stack limit here, to work around bugs in
482 # gmake-3.81 and global-5.7.1 on recent 64-bit Linux systems.
483 GPATH GRTAGS GSYMS GTAGS: gtags.files $(shell cat gtags.files 2> /dev/null)
484         @bash -c 'ulimit -s 10240 && GTAGSFORCECPP=yes gtags -i -q -f $<'
485
486 gtags.clean:
487         rm -f gtags.files GPATH GRTAGS GSYMS GTAGS
488
489 # Dependencies. "builddeps" are dependencies required solely for building,
490 # "dependencies" includes also dependencies required for development.
491 # Remember to keep these in sync with the DEPS file.
492 builddeps:
493         svn checkout --force http://gyp.googlecode.com/svn/trunk build/gyp \
494             --revision 1831
495         if svn info third_party/icu 2>&1 | grep -q icu46 ; then \
496           svn switch --force \
497               https://src.chromium.org/chrome/trunk/deps/third_party/icu52 \
498               third_party/icu --revision 277999 ; \
499         else \
500           svn checkout --force \
501               https://src.chromium.org/chrome/trunk/deps/third_party/icu52 \
502               third_party/icu --revision 277999 ; \
503         fi
504         svn checkout --force http://googletest.googlecode.com/svn/trunk \
505             testing/gtest --revision 692
506         svn checkout --force http://googlemock.googlecode.com/svn/trunk \
507             testing/gmock --revision 485
508
509 dependencies: builddeps
510         # The spec is a copy of the hooks in v8's DEPS file.
511         gclient sync -r fb782d4369d5ae04f17a2fceef7de5a63e50f07b --spec="solutions = [{u'managed': False, u'name': u'buildtools', u'url': u'https://chromium.googlesource.com/chromium/buildtools.git', u'custom_deps': {}, u'custom_hooks': [{u'name': u'clang_format_win',u'pattern': u'.',u'action': [u'download_from_google_storage',u'--no_resume',u'--platform=win32',u'--no_auth',u'--bucket',u'chromium-clang-format',u'-s',u'buildtools/win/clang-format.exe.sha1']},{u'name': u'clang_format_mac',u'pattern': u'.',u'action': [u'download_from_google_storage',u'--no_resume',u'--platform=darwin',u'--no_auth',u'--bucket',u'chromium-clang-format',u'-s',u'buildtools/mac/clang-format.sha1']},{u'name': u'clang_format_linux',u'pattern': u'.',u'action': [u'download_from_google_storage',u'--no_resume',u'--platform=linux*',u'--no_auth',u'--bucket',u'chromium-clang-format',u'-s',u'buildtools/linux64/clang-format.sha1']}],u'deps_file': u'.DEPS.git', u'safesync_url': u''}]"