Changeset 140912 in webkit
- Timestamp:
- Jan 26, 2013 8:34:55 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r140804 r140912 1 2013-01-26 David Farler <dfarler@apple.com> 2 3 Allow building with arbitrary SDK and ARCHS with make + Xcode 4 https://bugs.webkit.org/show_bug.cgi?id=107863 5 6 Reviewed by David Kilzer. 7 8 * Makefile: 9 Removed references to legacy Xcode configurations. 10 * Makefile.shared: 11 Added default ARCHS + SDK settings and parameterized xcodebuild calls. 12 * Source/Makefile: 13 iOS does not build WebKit2. 14 1 15 2013-01-25 Jussi Kukkonen <jussi.kukkonen@intel.com> 2 16 -
trunk/Makefile
r103773 r140912 5 5 if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done 6 6 7 debug d development dev develop:7 debug d: 8 8 @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \ 9 9 if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done 10 10 11 release r deployment dep deploy:11 release r: 12 12 @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \ 13 13 if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done -
trunk/Makefile.shared
r106634 r140912 1 1 SCRIPTS_PATH ?= ../Tools/Scripts 2 XCODE_OPTIONS = `perl -I$(SCRIPTS_PATH) -Mwebkitdirs -e 'print XcodeOptionString()'` $(ARGS)3 2 3 SDK = / 4 5 ifneq (,$(findstring iphoneos,$(SDK))) 6 ARCHS = armv7 7 else ifneq (,$(findstring iphonesimulator,$(SDK))) 8 ARCHS = i386 9 else ifneq (,$(findstring macosx,$(SDK))) 10 ARCHS = x86_64 11 else 12 ARCHS = x86_64 13 endif 14 15 ARCH_FLAGS=$(addprefix --arch ,$(ARCHS)) 4 16 DEFAULT_VERBOSITY := $(shell defaults read org.webkit.BuildConfiguration BuildTranscriptVerbosity 2>/dev/null || echo "default") 5 17 VERBOSITY ?= $(DEFAULT_VERBOSITY) … … 15 27 endif 16 28 29 define xcode-options 30 $(shell perl -I$(SCRIPTS_PATH) -Mwebkitdirs -e 'print XcodeOptionString()' -- --sdk $(SDK) $1 $(ARCH_FLAGS) $(ARGS)) 31 endef 32 17 33 all: 18 ( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )34 xcodebuild $(OTHER_OPTIONS) $(call xcode-options,) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} 19 35 20 debug d development dev develop: force36 debug d: force 21 37 $(SCRIPTS_PATH)/set-webkit-configuration --debug 22 ( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )38 xcodebuild $(OTHER_OPTIONS) $(call xcode-options, --configuration Debug) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} 23 39 24 release r deployment dep deploy: force40 release r: force 25 41 $(SCRIPTS_PATH)/set-webkit-configuration --release 26 ( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )42 xcodebuild $(OTHER_OPTIONS) $(call xcode-options, --configuration Release) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} 27 43 28 44 clean: 29 ( xcodebuild $(OTHER_OPTIONS) -alltargets clean $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )45 xcodebuild $(OTHER_OPTIONS) -alltargets clean $(call xcode-options,) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} 30 46 31 47 force: ; -
trunk/Source/Makefile
r110038 r140912 1 1 MODULES = WTF JavaScriptCore ThirdParty/ANGLE WebCore WebKit WebKit2 2 3 IOS_DONT_BUILD = WebKit2 4 5 ifneq (,$(findstring iphoneos,$(SDK))) 6 MODULES = $(filter-out $(IOS_DONT_BUILD),$(MODULES)) 7 else ifneq (,$(findstring iphonesimulator,$(SDK))) 8 MODULES = $(subst $(IOS_DONT_BUILD),$(MODULES)) 9 endif 2 10 3 11 all: … … 5 13 if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done 6 14 7 debug d development dev develop:15 debug d: 8 16 @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \ 9 17 if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done 10 18 11 release r deployment dep deploy:19 release r: 12 20 @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \ 13 21 if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done -
trunk/Tools/ChangeLog
r140889 r140912 1 2013-01-26 David Farler <dfarler@apple.com> 2 3 Makefiles should work for arbitrary SDKs and architectures on Apple ports 4 https://bugs.webkit.org/show_bug.cgi?id=107863 5 6 Reviewed by David Kilzer. 7 8 * Makefile: 9 Added temporary filters for projects not yet building on iOS. 10 * DumpRenderTree/Makefile: 11 Building with iOS SDKs -> -target All-iOS 12 * Scripts/webkitdirs.pm: 13 (determineConfiguration): 14 Added --configuration switch detection. 15 (determineArchitecture): 16 Added --architecture and ARCH=(.*) switch detection. 17 (argumentsForConfiguration): 18 (determineXcodeSDK): 19 Look for --device, --simulator, and --sdk switches. 20 (xcodeSDK): 21 Added. 22 (XcodeOptions): 23 Determine Xcode SDK and generate -arch switches. 24 1 25 2013-01-25 Jochen Eisinger <jochen@chromium.org> 2 26 -
trunk/Tools/DumpRenderTree/Makefile
r24409 r140912 1 1 SCRIPTS_PATH = ../Scripts 2 3 ifneq (,$(findstring iphoneos,$(SDK))) 4 OTHER_OPTIONS += -target All-iOS 5 else ifneq (,$(findstring iphonesimulator,$(SDK))) 6 OTHER_OPTIONS += -target All-iOS 7 endif 8 2 9 include ../../Makefile.shared -
trunk/Tools/Makefile
r86287 r140912 1 1 MODULES = DumpRenderTree WebKitTestRunner MiniBrowser ../Source/ThirdParty/gtest/xcode TestWebKitAPI 2 3 IOS_DONT_BUILD = WebKitTestRunner MiniBrowser TestWebKitAPI 4 IPHONEOS_DONT_BUILD = DumpRenderTree 5 6 ifneq (,$(findstring iphoneos,$(SDK))) 7 MODULES = $(filter-out $(IOS_DONT_BUILD),$(MODULES)) 8 MODULES = $(filter-out $(IPHONEOS_DONT_BUILD),$(MODULES)) 9 else ifneq (,$(findstring iphonesimulator,$(SDK))) 10 MODULES = $(filter-out $(IOS_DONT_BUILD),$(MODULES)) 11 endif 2 12 3 13 all: … … 5 15 if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done 6 16 7 debug d development dev develop:17 debug d: 8 18 @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \ 9 19 if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done 10 20 11 release r deployment dep deploy:21 release r: 12 22 @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \ 13 23 if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done -
trunk/Tools/Scripts/webkitdirs.pm
r139961 r140912 81 81 my @baseProductDirOption; 82 82 my $configuration; 83 my $xcodeSDK; 84 my $xcodeSDKVersion; 83 85 my $configurationForVisualStudio; 84 86 my $configurationProductDir; … … 274 276 { 275 277 return if defined $configuration; 278 279 # Look for explicit setting first 280 for (my $i = 0; $i <= $#ARGV; $i++) { 281 my $opt = $ARGV[$i]; 282 if ($opt =~ /^--config(uration)$/) { 283 splice(@ARGV, $i, 1); 284 $configuration = splice(@ARGV, $i, 1); 285 return; 286 } 287 } 288 276 289 determineBaseProductDir(); 277 290 if (open CONFIGURATION, "$baseProductDir/Configuration") { … … 302 315 303 316 determineBaseProductDir(); 317 318 # Look for explicit setting first 319 my @explicitArchs; 320 for (my $i = 0; $i <= $#ARGV; $i++) { 321 my $opt = $ARGV[$i]; 322 323 if ($opt =~ /^--arch(itecture)?$/) { 324 splice(@ARGV, $i, 1); 325 push @explicitArchs, splice(@ARGV, $i--, 1); 326 } elsif ($opt =~ /^ARCHS=(.*)$/) { 327 push @explicitArchs, split(/\w/, $1); 328 splice(@ARGV, $i--, 1); 329 } 330 } 331 332 # Make explicit arch settings forgiving – remove duplicate settings 333 # and allow for specifying architectures with both --arch and appending 334 # Xcode-style ARCHS=(.*) 335 @explicitArchs = sort keys %{{ map { $_ => 1 } @explicitArchs }}; 336 337 if (scalar(@explicitArchs)) { 338 $architecture = join(' ', @explicitArchs) if @explicitArchs; 339 return; 340 } 304 341 305 342 if (isGtk()) { … … 384 421 push(@args, '--release') if $configuration eq "Release"; 385 422 push(@args, '--32-bit') if $architecture ne "x86_64"; 423 push(@args, '--sdk', $xcodeSDK) if defined $xcodeSDK; 386 424 push(@args, '--qt') if isQt(); 387 425 push(@args, '--gtk') if isGtk(); … … 397 435 } 398 436 437 sub determineXcodeSDK 438 { 439 return if defined $xcodeSDK; 440 for (my $i = 0; $i <= $#ARGV; $i++) { 441 my $opt = $ARGV[$i]; 442 if ($opt =~ /^--sdk$/i) { 443 splice(@ARGV, $i, 1); 444 $xcodeSDK = splice(@ARGV, $i, 1); 445 } elsif ($opt =~ /^--device$/i) { 446 splice(@ARGV, $i, 1); 447 $xcodeSDK = 'iphoneos.internal'; 448 } elsif ($opt =~ /^--sim(ulator)?/i) { 449 splice(@ARGV, $i, 1); 450 $xcodeSDK = 'iphonesimulator'; 451 } 452 } 453 $xcodeSDK ||= '/'; 454 455 chomp $xcodeSDK; 456 } 457 458 sub xcodeSDK 459 { 460 determineXcodeSDK(); 461 return $xcodeSDK; 462 } 463 399 464 sub determineConfigurationForVisualStudio 400 465 { … … 521 586 determineConfiguration(); 522 587 determineArchitecture(); 523 return (@baseProductDirOption, "-configuration", $configuration, "ARCHS=$architecture", argumentsForXcode()); 588 determineXcodeSDK(); 589 my @archFlags = map { ('-arch', $_) } split(/ /, $architecture); 590 return (@baseProductDirOption, "-configuration", $configuration, "-sdk", $xcodeSDK, @archFlags, argumentsForXcode()); 524 591 } 525 592
Note: See TracChangeset
for help on using the changeset viewer.