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. 30OUTDIR ?= out 31TESTJOBS ?= 32GYPFLAGS ?= 33TESTFLAGS ?= 34ANDROID_NDK_HOST_ARCH ?= 35ANDROID_V8 ?= /data/local/tmp/v8 36 37# Special build flags. Use them like this: "make library=shared" 38 39# library=shared || component=shared_library 40ifeq ($(library), shared) 41 GYPFLAGS += -Dcomponent=shared_library 42endif 43ifdef component 44 GYPFLAGS += -Dcomponent=$(component) 45endif 46# disassembler=on 47ifeq ($(disassembler), on) 48 GYPFLAGS += -Dv8_enable_disassembler=1 49endif 50# objectprint=on 51ifeq ($(objectprint), on) 52 GYPFLAGS += -Dv8_object_print=1 53endif 54# verifyheap=on 55ifeq ($(verifyheap), on) 56 GYPFLAGS += -Dv8_enable_verify_heap=1 57endif 58# tracemaps=on 59ifeq ($(tracemaps), on) 60 GYPFLAGS += -Dv8_trace_maps=1 61endif 62# backtrace=off 63ifeq ($(backtrace), off) 64 GYPFLAGS += -Dv8_enable_backtrace=0 65else 66 GYPFLAGS += -Dv8_enable_backtrace=1 67endif 68# verifypredictable=on 69ifeq ($(verifypredictable), on) 70 GYPFLAGS += -Dv8_enable_verify_predictable=1 71endif 72# snapshot=off 73ifeq ($(snapshot), off) 74 GYPFLAGS += -Dv8_use_snapshot='false' 75endif 76ifeq ($(snapshot), external) 77 GYPFLAGS += -Dv8_use_external_startup_data=1 78endif 79# extrachecks=on/off 80ifeq ($(extrachecks), on) 81 GYPFLAGS += -Ddcheck_always_on=1 -Dv8_enable_handle_zapping=1 82endif 83ifeq ($(extrachecks), off) 84 GYPFLAGS += -Ddcheck_always_on=0 -Dv8_enable_handle_zapping=0 85endif 86# slowdchecks=on/off 87ifeq ($(slowdchecks), on) 88 GYPFLAGS += -Dv8_enable_slow_dchecks=1 89endif 90ifeq ($(slowdchecks), off) 91 GYPFLAGS += -Dv8_enable_slow_dchecks=0 92endif 93# debugsymbols=on 94ifeq ($(debugsymbols), on) 95 GYPFLAGS += -Drelease_extra_cflags=-ggdb3 96endif 97# gdbjit=on/off 98ifeq ($(gdbjit), on) 99 GYPFLAGS += -Dv8_enable_gdbjit=1 100endif 101ifeq ($(gdbjit), off) 102 GYPFLAGS += -Dv8_enable_gdbjit=0 103endif 104# vtunejit=on 105ifeq ($(vtunejit), on) 106 GYPFLAGS += -Dv8_enable_vtunejit=1 107endif 108# unalignedaccess=on 109ifeq ($(unalignedaccess), on) 110 GYPFLAGS += -Dv8_can_use_unaligned_accesses=true 111endif 112# randomseed=12345, disable random seed via randomseed=0 113ifdef randomseed 114 GYPFLAGS += -Dv8_random_seed=$(randomseed) 115endif 116# soname_version=1.2.3 117ifdef soname_version 118 GYPFLAGS += -Dsoname_version=$(soname_version) 119endif 120# werror=no 121ifeq ($(werror), no) 122 GYPFLAGS += -Dwerror='' 123endif 124# strictaliasing=off (workaround for GCC-4.5) 125ifeq ($(strictaliasing), off) 126 GYPFLAGS += -Dv8_no_strict_aliasing=1 127endif 128# regexp=interpreted 129ifeq ($(regexp), interpreted) 130 GYPFLAGS += -Dv8_interpreted_regexp=1 131endif 132# i18nsupport=off 133ifeq ($(i18nsupport), off) 134 GYPFLAGS += -Dv8_enable_i18n_support=0 135 TESTFLAGS += --noi18n 136endif 137# deprecationwarnings=on 138ifeq ($(deprecationwarnings), on) 139 GYPFLAGS += -Dv8_deprecation_warnings=1 140endif 141# vectorstores=on 142ifeq ($(vectorstores), on) 143 GYPFLAGS += -Dv8_vector_stores=1 144endif 145# imminentdeprecationwarnings=on 146ifeq ($(imminentdeprecationwarnings), on) 147 GYPFLAGS += -Dv8_imminent_deprecation_warnings=1 148endif 149# asan=on 150ifeq ($(asan), on) 151 GYPFLAGS += -Dasan=1 -Dclang=1 152 TESTFLAGS += --asan 153 ifeq ($(lsan), on) 154 GYPFLAGS += -Dlsan=1 155 endif 156endif 157ifdef embedscript 158 GYPFLAGS += -Dembed_script=$(embedscript) 159endif 160ifdef warmupscript 161 GYPFLAGS += -Dwarmup_script=$(warmupscript) 162endif 163ifeq ($(goma), on) 164 GYPFLAGS += -Duse_goma=1 165endif 166# v8_os_page_size=0, when 0 or not specified use build OS page size 167ifdef v8_os_page_size 168 ifneq ($(v8_os_page_size), 0) 169 ifneq ($(snapshot), off) 170 GYPFLAGS += -Dv8_os_page_size=$(v8_os_page_size) 171 endif 172 endif 173endif 174# arm specific flags. 175# arm_version=<number | "default"> 176ifneq ($(strip $(arm_version)),) 177 GYPFLAGS += -Darm_version=$(arm_version) 178else 179# Deprecated (use arm_version instead): armv7=false/true 180ifeq ($(armv7), false) 181 GYPFLAGS += -Darm_version=6 182else 183ifeq ($(armv7), true) 184 GYPFLAGS += -Darm_version=7 185endif 186endif 187endif 188# hardfp=on/off. Deprecated, use armfloatabi 189ifeq ($(hardfp),on) 190 GYPFLAGS += -Darm_float_abi=hard 191else 192ifeq ($(hardfp),off) 193 GYPFLAGS += -Darm_float_abi=softfp 194endif 195endif 196# fpu: armfpu=xxx 197# xxx: vfp, vfpv3-d16, vfpv3, neon. 198ifeq ($(armfpu),) 199 GYPFLAGS += -Darm_fpu=default 200else 201 GYPFLAGS += -Darm_fpu=$(armfpu) 202endif 203# float abi: armfloatabi=softfp/hard 204ifeq ($(armfloatabi),) 205ifeq ($(hardfp),) 206 GYPFLAGS += -Darm_float_abi=default 207endif 208else 209 GYPFLAGS += -Darm_float_abi=$(armfloatabi) 210endif 211# armthumb=on/off 212ifeq ($(armthumb), off) 213 GYPFLAGS += -Darm_thumb=0 214else 215ifeq ($(armthumb), on) 216 GYPFLAGS += -Darm_thumb=1 217endif 218endif 219# arm_test_noprobe=on 220# With this flag set, by default v8 will only use features implied 221# by the compiler (no probe). This is done by modifying the default 222# values of enable_armv7, enable_vfp3, enable_32dregs and enable_neon. 223# Modifying these flags when launching v8 will enable the probing for 224# the specified values. 225ifeq ($(arm_test_noprobe), on) 226 GYPFLAGS += -Darm_test_noprobe=on 227endif 228# Do not omit the frame pointer, needed for profiling with perf 229ifeq ($(no_omit_framepointer), on) 230 GYPFLAGS += -Drelease_extra_cflags=-fno-omit-frame-pointer 231endif 232 233ifdef android_ndk_root 234 GYPFLAGS += -Dandroid_ndk_root=$(android_ndk_root) 235 export ANDROID_NDK_ROOT = $(android_ndk_root) 236endif 237 238# ----------------- available targets: -------------------- 239# - "grokdump": rebuilds heap constants lists used by grokdump 240# - any arch listed in ARCHES (see below) 241# - any mode listed in MODES 242# - every combination <arch>.<mode>, e.g. "ia32.release" 243# - "native": current host's architecture, release mode 244# - any of the above with .check appended, e.g. "ia32.release.check" 245# - "android": cross-compile for Android/ARM 246# - default (no target specified): build all DEFAULT_ARCHES and MODES 247# - "check": build all targets and run all tests 248# - "<arch>.clean" for any <arch> in ARCHES 249# - "clean": clean all ARCHES 250 251# ----------------- internal stuff ------------------------ 252 253# Architectures and modes to be compiled. Consider these to be internal 254# variables, don't override them (use the targets instead). 255ARCHES = ia32 x64 arm arm64 mips mipsel mips64 mips64el x87 ppc ppc64 s390 \ 256 s390x 257ARCHES32 = ia32 arm mips mipsel x87 ppc s390 258DEFAULT_ARCHES = ia32 x64 arm 259MODES = release debug optdebug 260DEFAULT_MODES = release debug 261ANDROID_ARCHES = android_ia32 android_x64 android_arm android_arm64 \ 262 android_mipsel android_x87 263 264# List of files that trigger Makefile regeneration: 265GYPFILES = third_party/icu/icu.gypi third_party/icu/icu.gyp \ 266 gypfiles/shim_headers.gypi gypfiles/features.gypi \ 267 gypfiles/standalone.gypi \ 268 gypfiles/toolchain.gypi gypfiles/all.gyp gypfiles/mac/asan.gyp \ 269 test/cctest/cctest.gyp test/fuzzer/fuzzer.gyp \ 270 test/unittests/unittests.gyp src/v8.gyp \ 271 tools/parser-shell.gyp testing/gmock.gyp testing/gtest.gyp \ 272 buildtools/third_party/libc++abi/libc++abi.gyp \ 273 buildtools/third_party/libc++/libc++.gyp samples/samples.gyp \ 274 src/third_party/vtune/v8vtune.gyp src/d8.gyp 275 276# If vtunejit=on, the v8vtune.gyp will be appended. 277ifeq ($(vtunejit), on) 278 GYPFILES += src/third_party/vtune/v8vtune.gyp 279endif 280# Generates all combinations of ARCHES and MODES, e.g. "ia32.release". 281BUILDS = $(foreach mode,$(MODES),$(addsuffix .$(mode),$(ARCHES))) 282ANDROID_BUILDS = $(foreach mode,$(MODES), \ 283 $(addsuffix .$(mode),$(ANDROID_ARCHES))) 284# Generates corresponding test targets, e.g. "ia32.release.check". 285CHECKS = $(addsuffix .check,$(BUILDS)) 286QUICKCHECKS = $(addsuffix .quickcheck,$(BUILDS)) 287ANDROID_CHECKS = $(addsuffix .check,$(ANDROID_BUILDS)) 288# File where previously used GYPFLAGS are stored. 289ENVFILE = $(OUTDIR)/environment 290 291.PHONY: all check clean builddeps dependencies $(ENVFILE).new native \ 292 qc quickcheck $(QUICKCHECKS) turbocheck \ 293 $(addsuffix .quickcheck,$(MODES)) $(addsuffix .quickcheck,$(ARCHES)) \ 294 $(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \ 295 $(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \ 296 $(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) 297 298# Target definitions. "all" is the default. 299all: $(DEFAULT_MODES) 300 301# Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile 302# having been created before. 303buildbot: 304 $(MAKE) -C "$(OUTDIR)" BUILDTYPE=$(BUILDTYPE) \ 305 builddir="$(abspath $(OUTDIR))/$(BUILDTYPE)" 306 307# Compile targets. MODES and ARCHES are convenience targets. 308.SECONDEXPANSION: 309$(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES)) 310 311$(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES)) 312 313# Defines how to build a particular target (e.g. ia32.release). 314$(BUILDS): $(OUTDIR)/Makefile.$$@ 315 @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \ 316 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ 317 python -c "print \ 318 raw_input().replace('opt', '').capitalize()") \ 319 builddir="$(shell pwd)/$(OUTDIR)/$@" 320 321native: $(OUTDIR)/Makefile.native 322 @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \ 323 BUILDTYPE=Release \ 324 builddir="$(shell pwd)/$(OUTDIR)/$@" 325 326$(ANDROID_ARCHES): $(addprefix $$@.,$(MODES)) 327 328$(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) Makefile.android 329 @$(MAKE) -f Makefile.android $@ \ 330 ARCH="$(basename $@)" \ 331 MODE="$(subst .,,$(suffix $@))" \ 332 OUTDIR="$(OUTDIR)" \ 333 GYPFLAGS="$(GYPFLAGS)" 334 335# Test targets. 336check: all 337 @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ 338 --arch=$(shell echo $(DEFAULT_ARCHES) | sed -e 's/ /,/g') \ 339 $(TESTFLAGS) 340 341$(addsuffix .check,$(MODES)): $$(basename $$@) 342 @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ 343 --mode=$(basename $@) $(TESTFLAGS) 344 345$(addsuffix .check,$(ARCHES)): $$(basename $$@) 346 @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ 347 --arch=$(basename $@) $(TESTFLAGS) 348 349$(CHECKS): $$(basename $$@) 350 @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ 351 --arch-and-mode=$(basename $@) $(TESTFLAGS) 352 353$(addsuffix .quickcheck,$(MODES)): $$(basename $$@) 354 @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ 355 --mode=$(basename $@) $(TESTFLAGS) --quickcheck 356 357$(addsuffix .quickcheck,$(ARCHES)): $$(basename $$@) 358 @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ 359 --arch=$(basename $@) $(TESTFLAGS) --quickcheck 360 361$(QUICKCHECKS): $$(basename $$@) 362 @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ 363 --arch-and-mode=$(basename $@) $(TESTFLAGS) --quickcheck 364 365$(addsuffix .sync, $(ANDROID_BUILDS)): $$(basename $$@) 366 @tools/android-sync.sh $(basename $@) $(OUTDIR) \ 367 $(shell pwd) $(ANDROID_V8) 368 369$(addsuffix .check, $(ANDROID_BUILDS)): $$(basename $$@).sync 370 @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ 371 --arch-and-mode=$(basename $@) \ 372 --timeout=600 \ 373 --command-prefix="tools/android-run.py" $(TESTFLAGS) 374 375$(addsuffix .check, $(ANDROID_ARCHES)): \ 376 $(addprefix $$(basename $$@).,$(MODES)).check 377 378native.check: native 379 @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR)/native \ 380 --arch-and-mode=. $(TESTFLAGS) 381 382SUPERFASTTESTMODES = ia32.release 383FASTTESTMODES = $(SUPERFASTTESTMODES),x64.release,ia32.optdebug,x64.optdebug,arm.optdebug,arm64.release 384FASTCOMPILEMODES = $(FASTTESTMODES),arm64.optdebug 385 386COMMA = , 387EMPTY = 388SPACE = $(EMPTY) $(EMPTY) 389quickcheck: $(subst $(COMMA),$(SPACE),$(FASTCOMPILEMODES)) 390 tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ 391 --arch-and-mode=$(SUPERFASTTESTMODES) $(TESTFLAGS) --quickcheck \ 392 --download-data mozilla webkit 393 tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ 394 --arch-and-mode=$(FASTTESTMODES) $(TESTFLAGS) --quickcheck 395qc: quickcheck 396 397turbocheck: $(subst $(COMMA),$(SPACE),$(FASTCOMPILEMODES)) 398 tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ 399 --arch-and-mode=$(SUPERFASTTESTMODES) $(TESTFLAGS) \ 400 --quickcheck --variants=turbofan --download-data mozilla webkit 401 tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ 402 --arch-and-mode=$(FASTTESTMODES) $(TESTFLAGS) \ 403 --quickcheck --variants=turbofan 404tc: turbocheck 405 406# Clean targets. You can clean each architecture individually, or everything. 407$(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES)): 408 rm -f $(OUTDIR)/Makefile.$(basename $@)* 409 rm -rf $(OUTDIR)/$(basename $@).release 410 rm -rf $(OUTDIR)/$(basename $@).debug 411 rm -rf $(OUTDIR)/$(basename $@).optdebug 412 find $(OUTDIR) -regex '.*\(host\|target\)\.$(basename $@).*\.mk' -delete 413 414native.clean: 415 rm -f $(OUTDIR)/Makefile.native 416 rm -rf $(OUTDIR)/native 417 find $(OUTDIR) -regex '.*\(host\|target\)\.native\.mk' -delete 418 419clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES)) native.clean gtags.clean tags.clean 420 421# GYP file generation targets. 422OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(BUILDS)) 423$(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE) 424 $(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \ 425 cut -f 2 -d " " | cut -f 1 -d "-" )) 426 $(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH))) 427 $(eval CXX_TARGET_ARCH:=$(subst x86_64,x64,$(CXX_TARGET_ARCH))) 428 $(eval CXX_TARGET_ARCH:=$(subst s390x,s390,$(CXX_TARGET_ARCH))) 429 $(eval CXX_TARGET_ARCH:=$(subst powerpc,ppc,$(CXX_TARGET_ARCH))) 430 $(eval CXX_TARGET_ARCH:=$(subst ppc64,ppc,$(CXX_TARGET_ARCH))) 431 $(eval CXX_TARGET_ARCH:=$(subst ppcle,ppc,$(CXX_TARGET_ARCH))) 432 $(eval V8_TARGET_ARCH:=$(subst .,,$(suffix $(basename $@)))) 433 PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/gypfiles:$(PYTHONPATH):$(shell pwd)/tools/gyp/pylib:$(PYTHONPATH)" \ 434 GYP_GENERATORS=make \ 435 tools/gyp/gyp --generator-output="$(OUTDIR)" gypfiles/all.gyp \ 436 -Igypfiles/standalone.gypi --depth=. \ 437 -Dv8_target_arch=$(V8_TARGET_ARCH) \ 438 $(if $(findstring $(CXX_TARGET_ARCH),$(V8_TARGET_ARCH)), \ 439 -Dtarget_arch=$(V8_TARGET_ARCH), \ 440 $(if $(shell echo $(ARCHES32) | grep $(V8_TARGET_ARCH)), \ 441 -Dtarget_arch=ia32,)) \ 442 $(if $(findstring optdebug,$@),-Dv8_optimized_debug=1,) \ 443 -S$(suffix $(basename $@))$(suffix $@) $(GYPFLAGS) 444 445$(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE) 446 PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/gypfiles:$(PYTHONPATH):$(shell pwd)/tools/gyp/pylib:$(PYTHONPATH)" \ 447 GYP_GENERATORS=make \ 448 tools/gyp/gyp --generator-output="$(OUTDIR)" gypfiles/all.gyp \ 449 -Igypfiles/standalone.gypi --depth=. -S.native $(GYPFLAGS) 450 451# Replaces the old with the new environment file if they're different, which 452# will trigger GYP to regenerate Makefiles. 453$(ENVFILE): $(ENVFILE).new 454 @if test -r $(ENVFILE) && cmp $(ENVFILE).new $(ENVFILE) > /dev/null; \ 455 then rm $(ENVFILE).new; \ 456 else mv $(ENVFILE).new $(ENVFILE); fi 457 458# Stores current GYPFLAGS in a file. 459$(ENVFILE).new: 460 $(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \ 461 cut -f 2 -d " " | cut -f 1 -d "-" )) 462 $(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH))) 463 $(eval CXX_TARGET_ARCH:=$(subst x86_64,x64,$(CXX_TARGET_ARCH))) 464 @mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS) -Dtarget_arch=$(CXX_TARGET_ARCH)" > $(ENVFILE).new; 465 466# Heap constants for grokdump. 467DUMP_FILE = tools/v8heapconst.py 468grokdump: ia32.release 469 @cat $(DUMP_FILE).tmpl > $(DUMP_FILE) 470 @$(OUTDIR)/ia32.release/d8 --dump-heap-constants >> $(DUMP_FILE) 471 472# Support for the GNU GLOBAL Source Code Tag System. 473gtags.files: $(GYPFILES) $(ENVFILE) 474 @find include src test -name '*.h' -o -name '*.cc' -o -name '*.c' > $@ 475 476# We need to manually set the stack limit here, to work around bugs in 477# gmake-3.81 and global-5.7.1 on recent 64-bit Linux systems. 478# Using $(wildcard ...) gracefully ignores non-existing files, so that stale 479# gtags.files after switching branches don't cause recipe failures. 480GPATH GRTAGS GSYMS GTAGS: gtags.files $(wildcard $(shell cat gtags.files 2> /dev/null)) 481 @bash -c 'ulimit -s 10240 && GTAGSFORCECPP=yes gtags -i -q -f $<' 482 483gtags.clean: 484 rm -f gtags.files GPATH GRTAGS GSYMS GTAGS 485 486tags: gtags.files $(wildcard $(shell cat gtags.files 2> /dev/null)) 487 @(ctags --version | grep 'Exuberant Ctags' >/dev/null) || \ 488 (echo "Please install Exuberant Ctags (check 'ctags --version')" >&2; false) 489 ctags --fields=+l -L $< 490 491tags.clean: 492 rm -r tags 493 494dependencies builddeps: 495 $(error Use 'gclient sync' instead) 496