Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: Makefile

Issue 866263005: Remove version generation approach. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « DEPS ('k') | build/generate_version.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 NACL_BUILDS = $(foreach mode,$(MODES), \ 259 NACL_BUILDS = $(foreach mode,$(MODES), \
260 $(addsuffix .$(mode),$(NACL_ARCHES))) 260 $(addsuffix .$(mode),$(NACL_ARCHES)))
261 # Generates corresponding test targets, e.g. "ia32.release.check". 261 # Generates corresponding test targets, e.g. "ia32.release.check".
262 CHECKS = $(addsuffix .check,$(BUILDS)) 262 CHECKS = $(addsuffix .check,$(BUILDS))
263 QUICKCHECKS = $(addsuffix .quickcheck,$(BUILDS)) 263 QUICKCHECKS = $(addsuffix .quickcheck,$(BUILDS))
264 ANDROID_CHECKS = $(addsuffix .check,$(ANDROID_BUILDS)) 264 ANDROID_CHECKS = $(addsuffix .check,$(ANDROID_BUILDS))
265 NACL_CHECKS = $(addsuffix .check,$(NACL_BUILDS)) 265 NACL_CHECKS = $(addsuffix .check,$(NACL_BUILDS))
266 # File where previously used GYPFLAGS are stored. 266 # File where previously used GYPFLAGS are stored.
267 ENVFILE = $(OUTDIR)/environment 267 ENVFILE = $(OUTDIR)/environment
268 268
269 .PHONY: all check clean builddeps dependencies $(ENVFILE).new native version \ 269 .PHONY: all check clean builddeps dependencies $(ENVFILE).new native \
270 qc quickcheck $(QUICKCHECKS) turbocheck \ 270 qc quickcheck $(QUICKCHECKS) turbocheck \
271 $(addsuffix .quickcheck,$(MODES)) $(addsuffix .quickcheck,$(ARCHES)) \ 271 $(addsuffix .quickcheck,$(MODES)) $(addsuffix .quickcheck,$(ARCHES)) \
272 $(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \ 272 $(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \
273 $(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \ 273 $(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \
274 $(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \ 274 $(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \
275 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN \ 275 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN \
276 $(NACL_ARCHES) $(NACL_BUILDS) $(NACL_CHECKS) \ 276 $(NACL_ARCHES) $(NACL_BUILDS) $(NACL_CHECKS) \
277 must-set-NACL_SDK_ROOT 277 must-set-NACL_SDK_ROOT
278 278
279 # Target definitions. "all" is the default. 279 # Target definitions. "all" is the default.
280 all: $(DEFAULT_MODES) 280 all: $(DEFAULT_MODES)
281 281
282 # Target for generating the v8 version file from git tags.
283 version:
284 build/generate_version.py
285
286 # Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile 282 # Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile
287 # having been created before. 283 # having been created before.
288 buildbot: version 284 buildbot:
289 $(MAKE) -C "$(OUTDIR)" BUILDTYPE=$(BUILDTYPE) \ 285 $(MAKE) -C "$(OUTDIR)" BUILDTYPE=$(BUILDTYPE) \
290 builddir="$(abspath $(OUTDIR))/$(BUILDTYPE)" 286 builddir="$(abspath $(OUTDIR))/$(BUILDTYPE)"
291 287
292 # Compile targets. MODES and ARCHES are convenience targets. 288 # Compile targets. MODES and ARCHES are convenience targets.
293 .SECONDEXPANSION: 289 .SECONDEXPANSION:
294 $(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES)) 290 $(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES))
295 291
296 $(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES)) 292 $(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES))
297 293
298 # Defines how to build a particular target (e.g. ia32.release). 294 # Defines how to build a particular target (e.g. ia32.release).
299 $(BUILDS): $(OUTDIR)/Makefile.$$@ version 295 $(BUILDS): $(OUTDIR)/Makefile.$$@
300 @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \ 296 @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \
301 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ 297 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
302 python -c "print \ 298 python -c "print \
303 raw_input().replace('opt', '').capitalize()") \ 299 raw_input().replace('opt', '').capitalize()") \
304 builddir="$(shell pwd)/$(OUTDIR)/$@" 300 builddir="$(shell pwd)/$(OUTDIR)/$@"
305 301
306 native: $(OUTDIR)/Makefile.native version 302 native: $(OUTDIR)/Makefile.native
307 @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \ 303 @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \
308 BUILDTYPE=Release \ 304 BUILDTYPE=Release \
309 builddir="$(shell pwd)/$(OUTDIR)/$@" 305 builddir="$(shell pwd)/$(OUTDIR)/$@"
310 306
311 $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES)) 307 $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES))
312 308
313 $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \ 309 $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \
314 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN Makefile.android \ 310 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN Makefile.android
315 version
316 @$(MAKE) -f Makefile.android $@ \ 311 @$(MAKE) -f Makefile.android $@ \
317 ARCH="$(basename $@)" \ 312 ARCH="$(basename $@)" \
318 MODE="$(subst .,,$(suffix $@))" \ 313 MODE="$(subst .,,$(suffix $@))" \
319 OUTDIR="$(OUTDIR)" \ 314 OUTDIR="$(OUTDIR)" \
320 GYPFLAGS="$(GYPFLAGS)" 315 GYPFLAGS="$(GYPFLAGS)"
321 316
322 $(NACL_ARCHES): $(addprefix $$@.,$(MODES)) 317 $(NACL_ARCHES): $(addprefix $$@.,$(MODES))
323 318
324 $(NACL_BUILDS): $(GYPFILES) $(ENVFILE) \ 319 $(NACL_BUILDS): $(GYPFILES) $(ENVFILE) \
325 » » Makefile.nacl must-set-NACL_SDK_ROOT version 320 » » Makefile.nacl must-set-NACL_SDK_ROOT
326 @$(MAKE) -f Makefile.nacl $@ \ 321 @$(MAKE) -f Makefile.nacl $@ \
327 ARCH="$(basename $@)" \ 322 ARCH="$(basename $@)" \
328 MODE="$(subst .,,$(suffix $@))" \ 323 MODE="$(subst .,,$(suffix $@))" \
329 OUTDIR="$(OUTDIR)" \ 324 OUTDIR="$(OUTDIR)" \
330 GYPFLAGS="$(GYPFLAGS)" 325 GYPFLAGS="$(GYPFLAGS)"
331 326
332 # Test targets. 327 # Test targets.
333 check: all 328 check: all
334 @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ 329 @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
335 --arch=$(shell echo $(DEFAULT_ARCHES) | sed -e 's/ /,/g') \ 330 --arch=$(shell echo $(DEFAULT_ARCHES) | sed -e 's/ /,/g') \
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 rm -rf $(OUTDIR)/$(basename $@).release 410 rm -rf $(OUTDIR)/$(basename $@).release
416 rm -rf $(OUTDIR)/$(basename $@).debug 411 rm -rf $(OUTDIR)/$(basename $@).debug
417 rm -rf $(OUTDIR)/$(basename $@).optdebug 412 rm -rf $(OUTDIR)/$(basename $@).optdebug
418 find $(OUTDIR) -regex '.*\(host\|target\)\.$(basename $@).*\.mk' -delete 413 find $(OUTDIR) -regex '.*\(host\|target\)\.$(basename $@).*\.mk' -delete
419 414
420 native.clean: 415 native.clean:
421 rm -f $(OUTDIR)/Makefile.native 416 rm -f $(OUTDIR)/Makefile.native
422 rm -rf $(OUTDIR)/native 417 rm -rf $(OUTDIR)/native
423 find $(OUTDIR) -regex '.*\(host\|target\)\.native\.mk' -delete 418 find $(OUTDIR) -regex '.*\(host\|target\)\.native\.mk' -delete
424 419
425 version.clean: 420 clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)) native.cl ean gtags.clean
426 » rm -f src/version_gen.cc
427
428 clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)) native.cl ean gtags.clean version.clean
429 421
430 # GYP file generation targets. 422 # GYP file generation targets.
431 OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(BUILDS)) 423 OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(BUILDS))
432 $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE) 424 $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE)
433 $(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \ 425 $(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \
434 cut -f 2 -d " " | cut -f 1 -d "-" )) 426 cut -f 2 -d " " | cut -f 1 -d "-" ))
435 $(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH))) 427 $(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH)))
436 $(eval CXX_TARGET_ARCH:=$(subst x86_64,x64,$(CXX_TARGET_ARCH))) 428 $(eval CXX_TARGET_ARCH:=$(subst x86_64,x64,$(CXX_TARGET_ARCH)))
437 $(eval V8_TARGET_ARCH:=$(subst .,,$(suffix $(basename $@)))) 429 $(eval V8_TARGET_ARCH:=$(subst .,,$(suffix $(basename $@))))
438 PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build: $(PYTHONPATH):$(shell pwd)/build/gyp/pylib:$(PYTHONPATH)" \ 430 PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build: $(PYTHONPATH):$(shell pwd)/build/gyp/pylib:$(PYTHONPATH)" \
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 # We need to manually set the stack limit here, to work around bugs in 490 # We need to manually set the stack limit here, to work around bugs in
499 # gmake-3.81 and global-5.7.1 on recent 64-bit Linux systems. 491 # gmake-3.81 and global-5.7.1 on recent 64-bit Linux systems.
500 GPATH GRTAGS GSYMS GTAGS: gtags.files $(shell cat gtags.files 2> /dev/null) 492 GPATH GRTAGS GSYMS GTAGS: gtags.files $(shell cat gtags.files 2> /dev/null)
501 @bash -c 'ulimit -s 10240 && GTAGSFORCECPP=yes gtags -i -q -f $<' 493 @bash -c 'ulimit -s 10240 && GTAGSFORCECPP=yes gtags -i -q -f $<'
502 494
503 gtags.clean: 495 gtags.clean:
504 rm -f gtags.files GPATH GRTAGS GSYMS GTAGS 496 rm -f gtags.files GPATH GRTAGS GSYMS GTAGS
505 497
506 dependencies builddeps: 498 dependencies builddeps:
507 $(error Use 'gclient sync' instead) 499 $(error Use 'gclient sync' instead)
OLDNEW
« no previous file with comments | « DEPS ('k') | build/generate_version.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698