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

Side by Side Diff: Makefile

Issue 11418101: build: make python executable configurable
Patch Set: Created 8 years, 1 month 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 | « no previous file | build/common.gypi » ('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 12 matching lines...) Expand all
23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 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. 26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 28
29 # Variable default definitions. Override them by exporting them in your shell. 29 # Variable default definitions. Override them by exporting them in your shell.
30 CXX ?= g++ 30 CXX ?= g++
31 LINK ?= g++ 31 LINK ?= g++
32 OUTDIR ?= out 32 OUTDIR ?= out
33 PYTHON ?= python
33 TESTJOBS ?= 34 TESTJOBS ?=
34 GYPFLAGS ?= 35 GYPFLAGS ?=
35 TESTFLAGS ?= 36 TESTFLAGS ?=
36 ANDROID_NDK_ROOT ?= 37 ANDROID_NDK_ROOT ?=
37 ANDROID_TOOLCHAIN ?= 38 ANDROID_TOOLCHAIN ?=
38 ANDROID_V8 ?= /data/local/v8 39 ANDROID_V8 ?= /data/local/v8
39 40
40 # Special build flags. Use them like this: "make library=shared" 41 # Special build flags. Use them like this: "make library=shared"
41 42
42 # library=shared || component=shared_library 43 # library=shared || component=shared_library
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 endif 110 endif
110 # regexp=interpreted 111 # regexp=interpreted
111 ifeq ($(regexp), interpreted) 112 ifeq ($(regexp), interpreted)
112 GYPFLAGS += -Dv8_interpreted_regexp=1 113 GYPFLAGS += -Dv8_interpreted_regexp=1
113 endif 114 endif
114 # hardfp=on 115 # hardfp=on
115 ifeq ($(hardfp), on) 116 ifeq ($(hardfp), on)
116 GYPFLAGS += -Dv8_use_arm_eabi_hardfloat=true 117 GYPFLAGS += -Dv8_use_arm_eabi_hardfloat=true
117 endif 118 endif
118 119
120 GYPFLAGS += "-Dpython=$(PYTHON)"
121
119 # ----------------- available targets: -------------------- 122 # ----------------- available targets: --------------------
120 # - "dependencies": pulls in external dependencies (currently: GYP) 123 # - "dependencies": pulls in external dependencies (currently: GYP)
121 # - any arch listed in ARCHES (see below) 124 # - any arch listed in ARCHES (see below)
122 # - any mode listed in MODES 125 # - any mode listed in MODES
123 # - every combination <arch>.<mode>, e.g. "ia32.release" 126 # - every combination <arch>.<mode>, e.g. "ia32.release"
124 # - "native": current host's architecture, release mode 127 # - "native": current host's architecture, release mode
125 # - any of the above with .check appended, e.g. "ia32.release.check" 128 # - any of the above with .check appended, e.g. "ia32.release.check"
126 # - "android": cross-compile for Android/ARM 129 # - "android": cross-compile for Android/ARM
127 # - default (no target specified): build all DEFAULT_ARCHES and MODES 130 # - default (no target specified): build all DEFAULT_ARCHES and MODES
128 # - "check": build all targets and run all tests 131 # - "check": build all targets and run all tests
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 .SECONDEXPANSION: 179 .SECONDEXPANSION:
177 $(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES)) 180 $(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES))
178 181
179 $(ARCHES): $(addprefix $$@.,$(MODES)) 182 $(ARCHES): $(addprefix $$@.,$(MODES))
180 183
181 # Defines how to build a particular target (e.g. ia32.release). 184 # Defines how to build a particular target (e.g. ia32.release).
182 $(BUILDS): $(OUTDIR)/Makefile.$$(basename $$@) 185 $(BUILDS): $(OUTDIR)/Makefile.$$(basename $$@)
183 @$(MAKE) -C "$(OUTDIR)" -f Makefile.$(basename $@) \ 186 @$(MAKE) -C "$(OUTDIR)" -f Makefile.$(basename $@) \
184 CXX="$(CXX)" LINK="$(LINK)" \ 187 CXX="$(CXX)" LINK="$(LINK)" \
185 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ 188 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
186 » python -c "print raw_input().capitalize()") \ 189 » $(PYTHON) -c "print raw_input().capitalize()") \
187 builddir="$(shell pwd)/$(OUTDIR)/$@" 190 builddir="$(shell pwd)/$(OUTDIR)/$@"
188 191
189 native: $(OUTDIR)/Makefile.native 192 native: $(OUTDIR)/Makefile.native
190 @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \ 193 @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \
191 CXX="$(CXX)" LINK="$(LINK)" BUILDTYPE=Release \ 194 CXX="$(CXX)" LINK="$(LINK)" BUILDTYPE=Release \
192 builddir="$(shell pwd)/$(OUTDIR)/$@" 195 builddir="$(shell pwd)/$(OUTDIR)/$@"
193 196
194 $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES)) 197 $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES))
195 198
196 $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \ 199 $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 rm -f $(OUTDIR)/Makefile.native 250 rm -f $(OUTDIR)/Makefile.native
248 rm -rf $(OUTDIR)/native 251 rm -rf $(OUTDIR)/native
249 find $(OUTDIR) -regex '.*\(host\|target\).native\.mk' -delete 252 find $(OUTDIR) -regex '.*\(host\|target\).native\.mk' -delete
250 253
251 clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES)) native.clean 254 clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES)) native.clean
252 255
253 # GYP file generation targets. 256 # GYP file generation targets.
254 OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ARCHES)) 257 OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ARCHES))
255 $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE) 258 $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE)
256 GYP_GENERATORS=make \ 259 GYP_GENERATORS=make \
257 » build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ 260 » $(PYTHON) build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
258 -Ibuild/standalone.gypi --depth=. \ 261 -Ibuild/standalone.gypi --depth=. \
259 -Dv8_target_arch=$(subst .,,$(suffix $@)) \ 262 -Dv8_target_arch=$(subst .,,$(suffix $@)) \
260 -S.$(subst .,,$(suffix $@)) $(GYPFLAGS) 263 -S.$(subst .,,$(suffix $@)) $(GYPFLAGS)
261 264
262 $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE) 265 $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE)
263 GYP_GENERATORS=make \ 266 GYP_GENERATORS=make \
264 » build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ 267 » $(PYTHON) build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
265 -Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS) 268 -Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS)
266 269
267 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN: 270 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN:
268 ifndef ANDROID_NDK_ROOT 271 ifndef ANDROID_NDK_ROOT
269 ifndef ANDROID_TOOLCHAIN 272 ifndef ANDROID_TOOLCHAIN
270 $(error ANDROID_NDK_ROOT or ANDROID_TOOLCHAIN must be set)) 273 $(error ANDROID_NDK_ROOT or ANDROID_TOOLCHAIN must be set))
271 endif 274 endif
272 endif 275 endif
273 276
274 # Replaces the old with the new environment file if they're different, which 277 # Replaces the old with the new environment file if they're different, which
275 # will trigger GYP to regenerate Makefiles. 278 # will trigger GYP to regenerate Makefiles.
276 $(ENVFILE): $(ENVFILE).new 279 $(ENVFILE): $(ENVFILE).new
277 @if test -r $(ENVFILE) && cmp $(ENVFILE).new $(ENVFILE) >/dev/null; \ 280 @if test -r $(ENVFILE) && cmp $(ENVFILE).new $(ENVFILE) >/dev/null; \
278 then rm $(ENVFILE).new; \ 281 then rm $(ENVFILE).new; \
279 else mv $(ENVFILE).new $(ENVFILE); fi 282 else mv $(ENVFILE).new $(ENVFILE); fi
280 283
281 # Stores current GYPFLAGS in a file. 284 # Stores current GYPFLAGS in a file.
282 $(ENVFILE).new: 285 $(ENVFILE).new:
283 @mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS)" > $(ENVFILE).new; \ 286 @mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS)" > $(ENVFILE).new; \
284 echo "CXX=$(CXX)" >> $(ENVFILE).new 287 echo "CXX=$(CXX)" >> $(ENVFILE).new
285 288
286 # Dependencies. 289 # Dependencies.
287 # Remember to keep these in sync with the DEPS file. 290 # Remember to keep these in sync with the DEPS file.
288 dependencies: 291 dependencies:
289 svn checkout --force http://gyp.googlecode.com/svn/trunk build/gyp \ 292 svn checkout --force http://gyp.googlecode.com/svn/trunk build/gyp \
290 --revision 1501 293 --revision 1501
OLDNEW
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698