Skip to content

Commit 2fb8c38

Browse files
committed
.:
Reviewed by Darin Adler. Add "64" and "64u" make rules to allow easy building of 64-bit versions. make 64: will build Intel-only 64-bit. make 64u: will build 4-way universal for PPC and Intel. * Makefile: * Makefile.shared: WebKitTools: Reviewed by Darin Adler. * Scripts/build-webkit: Add --universal and --64-bit flags to make building 64-bit architectures easy. Combine the two flags to build 4-way universal. * Makefile: Add "64" and "64u" make rules. Fix the universal rule to return non-zero when the build failes. Canonical link: https://commits.webkit.org/24308@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 5313ce3 commit 2fb8c38

6 files changed

Lines changed: 69 additions & 4 deletions

File tree

ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2008-02-26 Timothy Hatcher <timothy@apple.com>
2+
3+
Reviewed by Darin Adler.
4+
5+
Add "64" and "64u" make rules to allow easy building of 64-bit versions.
6+
7+
make 64: will build Intel-only 64-bit.
8+
make 64u: will build 4-way universal for PPC and Intel.
9+
10+
* Makefile:
11+
* Makefile.shared:
12+
113
2008-02-23 Jan Michael Alonzo <jmalonzo@unpluggable.com>
214

315
Rubber stamped by Darin.

Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,23 @@ all:
77
debug d development dev develop:
88
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
99
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
10-
10+
1111
release r deployment dep deploy:
1212
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
1313
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
14-
14+
1515
universal u:
1616
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
1717
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
1818

19-
clean:
19+
64:
2020
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
2121
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
2222

23+
64u:
24+
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
25+
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
26+
27+
clean:
28+
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
29+
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done

Makefile.shared

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ release r deployment dep deploy: force
1515
universal u: force
1616
( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) 'ARCHS=ppc i386' | grep -v setenv && exit $${PIPESTATUS[0]} )
1717

18+
64: force
19+
( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) 'ARCHS=i386 x86_64' | grep -v setenv && exit $${PIPESTATUS[0]} )
20+
21+
64u: force
22+
( xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) 'ARCHS=ppc ppc64 i386 x86_64' | grep -v setenv && exit $${PIPESTATUS[0]} )
23+
1824
clean:
1925
( xcodebuild $(OTHER_OPTIONS) -alltargets clean $(XCODE_OPTIONS) | grep -v setenv && exit $${PIPESTATUS[0]} )
2026

WebKitTools/ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2008-02-26 Timothy Hatcher <timothy@apple.com>
2+
3+
Reviewed by Darin Adler.
4+
5+
* Scripts/build-webkit: Add --universal and --64-bit flags to make building
6+
64-bit architectures easy. Combine the two flags to build 4-way universal.
7+
* Makefile: Add "64" and "64u" make rules. Fix the universal rule to return
8+
non-zero when the build failes.
9+
110
2008-02-26 Jessica Kahn <jess@apple.com>
211

312
Reviewed by Darin.

WebKitTools/Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,16 @@ release r deployment dep deploy:
1313
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
1414

1515
universal u:
16-
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; if [ $$? -ne 0 ]; then break; fi; done
16+
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
17+
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
18+
19+
64:
20+
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
21+
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
22+
23+
64u:
24+
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
25+
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
1726

1827
clean:
1928
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \

WebKitTools/Scripts/build-webkit

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,16 @@ my $coverageSupport = 0;
5656
my $videoSupport = isOSX() || isCygwin(); # Enable by default on OSX and Windows
5757
my $showHelp = 0;
5858
my $clean = 0;
59+
my $buildUniversal = 0;
60+
my $buildSixtyFourBit = 0;
5961

6062
my $programName = basename($0);
6163
my $usage = <<EOF;
6264
Usage: $programName [options] [options to pass to build system]
6365
--help Show this help message
66+
--clean Perform a clean build
67+
--universal Build 2-way universal (PPC and Intel 32-bit)
68+
--64-bit Build 64-bit, combine with --universal to build 4-way universal
6469
--[no-]cross-document-messaging Toggle cross-document messaging support (default: $crossDocumentMessagingSupport)
6570
--[no-]database Toggle Database Support (default: $databaseSupport)
6671
--[no-]icon-database Toggle Icon database support (default: $iconDatabaseSupport)
@@ -95,6 +100,8 @@ GetOptions('cross-document-messaging!' => \$crossDocumentMessagingSupport,
95100
'video!' => \$videoSupport,
96101
'coverage!' => \$coverageSupport,
97102
'help' => \$showHelp,
103+
'universal' => \$buildUniversal,
104+
'64-bit' => \$buildSixtyFourBit,
98105
'clean' => \$clean);
99106

100107
if ($showHelp) {
@@ -183,6 +190,21 @@ if ($clean && isOSX()) {
183190
push(@options, "clean");
184191
}
185192

193+
if ($buildSixtyFourBit && isOSX()) {
194+
my $cpuVendor = `sysctl -n machdep.cpu.vendor`;
195+
chomp $cpuVendor;
196+
197+
if ($buildUniversal) {
198+
push(@options, "ARCHS=ppc ppc64 i386 x86_64");
199+
} elsif ($cpuVendor eq "GenuineIntel") {
200+
push(@options, "ARCHS=i386 x86_64");
201+
} else {
202+
push(@options, "ARCHS=ppc ppc64");
203+
}
204+
} elsif ($buildUniversal && isOSX()) {
205+
push(@options, "ARCHS=ppc i386");
206+
}
207+
186208
# enable autotool options accordingly
187209
if ($ENV{WEBKITAUTOTOOLS}) {
188210
push @options, autotoolsFlag($crossDocumentMessagingSupport, "cross-document-messaging");

0 commit comments

Comments
 (0)