OLD | NEW |
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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 NACL_BUILDS = $(foreach mode,$(MODES), \ | 261 NACL_BUILDS = $(foreach mode,$(MODES), \ |
262 $(addsuffix .$(mode),$(NACL_ARCHES))) | 262 $(addsuffix .$(mode),$(NACL_ARCHES))) |
263 # Generates corresponding test targets, e.g. "ia32.release.check". | 263 # Generates corresponding test targets, e.g. "ia32.release.check". |
264 CHECKS = $(addsuffix .check,$(BUILDS)) | 264 CHECKS = $(addsuffix .check,$(BUILDS)) |
265 QUICKCHECKS = $(addsuffix .quickcheck,$(BUILDS)) | 265 QUICKCHECKS = $(addsuffix .quickcheck,$(BUILDS)) |
266 ANDROID_CHECKS = $(addsuffix .check,$(ANDROID_BUILDS)) | 266 ANDROID_CHECKS = $(addsuffix .check,$(ANDROID_BUILDS)) |
267 NACL_CHECKS = $(addsuffix .check,$(NACL_BUILDS)) | 267 NACL_CHECKS = $(addsuffix .check,$(NACL_BUILDS)) |
268 # File where previously used GYPFLAGS are stored. | 268 # File where previously used GYPFLAGS are stored. |
269 ENVFILE = $(OUTDIR)/environment | 269 ENVFILE = $(OUTDIR)/environment |
270 | 270 |
271 .PHONY: all check clean builddeps dependencies $(ENVFILE).new native \ | 271 .PHONY: all check clean builddeps dependencies $(ENVFILE).new native version \ |
272 qc quickcheck $(QUICKCHECKS) turbocheck \ | 272 qc quickcheck $(QUICKCHECKS) turbocheck \ |
273 $(addsuffix .quickcheck,$(MODES)) $(addsuffix .quickcheck,$(ARCHES)) \ | 273 $(addsuffix .quickcheck,$(MODES)) $(addsuffix .quickcheck,$(ARCHES)) \ |
274 $(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \ | 274 $(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \ |
275 $(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \ | 275 $(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \ |
276 $(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \ | 276 $(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \ |
277 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN \ | 277 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN \ |
278 $(NACL_ARCHES) $(NACL_BUILDS) $(NACL_CHECKS) \ | 278 $(NACL_ARCHES) $(NACL_BUILDS) $(NACL_CHECKS) \ |
279 must-set-NACL_SDK_ROOT | 279 must-set-NACL_SDK_ROOT |
280 | 280 |
281 # Target definitions. "all" is the default. | 281 # Target definitions. "all" is the default. |
282 all: $(DEFAULT_MODES) | 282 all: $(DEFAULT_MODES) |
283 | 283 |
| 284 # Target for generating the v8 version file from git tags. |
| 285 version: |
| 286 build/generate_version.py |
| 287 |
284 # Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile | 288 # Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile |
285 # having been created before. | 289 # having been created before. |
286 buildbot: | 290 buildbot: version |
287 $(MAKE) -C "$(OUTDIR)" BUILDTYPE=$(BUILDTYPE) \ | 291 $(MAKE) -C "$(OUTDIR)" BUILDTYPE=$(BUILDTYPE) \ |
288 builddir="$(abspath $(OUTDIR))/$(BUILDTYPE)" | 292 builddir="$(abspath $(OUTDIR))/$(BUILDTYPE)" |
289 | 293 |
290 # Compile targets. MODES and ARCHES are convenience targets. | 294 # Compile targets. MODES and ARCHES are convenience targets. |
291 .SECONDEXPANSION: | 295 .SECONDEXPANSION: |
292 $(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES)) | 296 $(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES)) |
293 | 297 |
294 $(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES)) | 298 $(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES)) |
295 | 299 |
296 # Defines how to build a particular target (e.g. ia32.release). | 300 # Defines how to build a particular target (e.g. ia32.release). |
297 $(BUILDS): $(OUTDIR)/Makefile.$$@ | 301 $(BUILDS): $(OUTDIR)/Makefile.$$@ version |
298 @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \ | 302 @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \ |
299 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ | 303 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ |
300 python -c "print \ | 304 python -c "print \ |
301 raw_input().replace('opt', '').capitalize()") \ | 305 raw_input().replace('opt', '').capitalize()") \ |
302 builddir="$(shell pwd)/$(OUTDIR)/$@" | 306 builddir="$(shell pwd)/$(OUTDIR)/$@" |
303 | 307 |
304 native: $(OUTDIR)/Makefile.native | 308 native: $(OUTDIR)/Makefile.native version |
305 @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \ | 309 @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \ |
306 BUILDTYPE=Release \ | 310 BUILDTYPE=Release \ |
307 builddir="$(shell pwd)/$(OUTDIR)/$@" | 311 builddir="$(shell pwd)/$(OUTDIR)/$@" |
308 | 312 |
309 $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES)) | 313 $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES)) |
310 | 314 |
311 $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \ | 315 $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \ |
312 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN Makefile.android | 316 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN Makefile.android \ |
| 317 version |
313 @$(MAKE) -f Makefile.android $@ \ | 318 @$(MAKE) -f Makefile.android $@ \ |
314 ARCH="$(basename $@)" \ | 319 ARCH="$(basename $@)" \ |
315 MODE="$(subst .,,$(suffix $@))" \ | 320 MODE="$(subst .,,$(suffix $@))" \ |
316 OUTDIR="$(OUTDIR)" \ | 321 OUTDIR="$(OUTDIR)" \ |
317 GYPFLAGS="$(GYPFLAGS)" | 322 GYPFLAGS="$(GYPFLAGS)" |
318 | 323 |
319 $(NACL_ARCHES): $(addprefix $$@.,$(MODES)) | 324 $(NACL_ARCHES): $(addprefix $$@.,$(MODES)) |
320 | 325 |
321 $(NACL_BUILDS): $(GYPFILES) $(ENVFILE) \ | 326 $(NACL_BUILDS): $(GYPFILES) $(ENVFILE) \ |
322 » » Makefile.nacl must-set-NACL_SDK_ROOT | 327 » » Makefile.nacl must-set-NACL_SDK_ROOT version |
323 @$(MAKE) -f Makefile.nacl $@ \ | 328 @$(MAKE) -f Makefile.nacl $@ \ |
324 ARCH="$(basename $@)" \ | 329 ARCH="$(basename $@)" \ |
325 MODE="$(subst .,,$(suffix $@))" \ | 330 MODE="$(subst .,,$(suffix $@))" \ |
326 OUTDIR="$(OUTDIR)" \ | 331 OUTDIR="$(OUTDIR)" \ |
327 GYPFLAGS="$(GYPFLAGS)" | 332 GYPFLAGS="$(GYPFLAGS)" |
328 | 333 |
329 # Test targets. | 334 # Test targets. |
330 check: all | 335 check: all |
331 @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ | 336 @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ |
332 --arch=$(shell echo $(DEFAULT_ARCHES) | sed -e 's/ /,/g') \ | 337 --arch=$(shell echo $(DEFAULT_ARCHES) | sed -e 's/ /,/g') \ |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 rm -rf $(OUTDIR)/$(basename $@).release | 417 rm -rf $(OUTDIR)/$(basename $@).release |
413 rm -rf $(OUTDIR)/$(basename $@).debug | 418 rm -rf $(OUTDIR)/$(basename $@).debug |
414 rm -rf $(OUTDIR)/$(basename $@).optdebug | 419 rm -rf $(OUTDIR)/$(basename $@).optdebug |
415 find $(OUTDIR) -regex '.*\(host\|target\)\.$(basename $@).*\.mk' -delete | 420 find $(OUTDIR) -regex '.*\(host\|target\)\.$(basename $@).*\.mk' -delete |
416 | 421 |
417 native.clean: | 422 native.clean: |
418 rm -f $(OUTDIR)/Makefile.native | 423 rm -f $(OUTDIR)/Makefile.native |
419 rm -rf $(OUTDIR)/native | 424 rm -rf $(OUTDIR)/native |
420 find $(OUTDIR) -regex '.*\(host\|target\)\.native\.mk' -delete | 425 find $(OUTDIR) -regex '.*\(host\|target\)\.native\.mk' -delete |
421 | 426 |
422 clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)) native.cl
ean gtags.clean | 427 version.clean: |
| 428 » rm -f src/version_gen.cc |
| 429 |
| 430 clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)) native.cl
ean gtags.clean version.clean |
423 | 431 |
424 # GYP file generation targets. | 432 # GYP file generation targets. |
425 OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(BUILDS)) | 433 OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(BUILDS)) |
426 $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE) | 434 $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE) |
427 $(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \ | 435 $(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \ |
428 cut -f 2 -d " " | cut -f 1 -d "-" )) | 436 cut -f 2 -d " " | cut -f 1 -d "-" )) |
429 $(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH))) | 437 $(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH))) |
430 $(eval CXX_TARGET_ARCH:=$(subst x86_64,x64,$(CXX_TARGET_ARCH))) | 438 $(eval CXX_TARGET_ARCH:=$(subst x86_64,x64,$(CXX_TARGET_ARCH))) |
431 $(eval V8_TARGET_ARCH:=$(subst .,,$(suffix $(basename $@)))) | 439 $(eval V8_TARGET_ARCH:=$(subst .,,$(suffix $(basename $@)))) |
432 PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:
$(PYTHONPATH):$(shell pwd)/build/gyp/pylib:$(PYTHONPATH)" \ | 440 PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:
$(PYTHONPATH):$(shell pwd)/build/gyp/pylib:$(PYTHONPATH)" \ |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 third_party/icu --revision 277999 ; \ | 521 third_party/icu --revision 277999 ; \ |
514 fi | 522 fi |
515 svn checkout --force https://googletest.googlecode.com/svn/trunk \ | 523 svn checkout --force https://googletest.googlecode.com/svn/trunk \ |
516 testing/gtest --revision 692 | 524 testing/gtest --revision 692 |
517 svn checkout --force https://googlemock.googlecode.com/svn/trunk \ | 525 svn checkout --force https://googlemock.googlecode.com/svn/trunk \ |
518 testing/gmock --revision 485 | 526 testing/gmock --revision 485 |
519 | 527 |
520 dependencies: builddeps | 528 dependencies: builddeps |
521 # The spec is a copy of the hooks in v8's DEPS file. | 529 # The spec is a copy of the hooks in v8's DEPS file. |
522 gclient sync -r fb782d4369d5ae04f17a2fceef7de5a63e50f07b --spec="solutio
ns = [{u'managed': False, u'name': u'buildtools', u'url': u'https://chromium.goo
glesource.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'pat
tern': u'.',u'action': [u'download_from_google_storage',u'--no_resume',u'--platf
orm=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''}
]" | 530 gclient sync -r fb782d4369d5ae04f17a2fceef7de5a63e50f07b --spec="solutio
ns = [{u'managed': False, u'name': u'buildtools', u'url': u'https://chromium.goo
glesource.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'pat
tern': u'.',u'action': [u'download_from_google_storage',u'--no_resume',u'--platf
orm=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''}
]" |
OLD | NEW |