This repository has been archived by the owner on May 29, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgnstand-fetch.sh
87 lines (71 loc) · 2.72 KB
/
gnstand-fetch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/sh
# gnstand-fetch.sh: magic to fetch bits needed to build GN
# Jashank Jeremy <[email protected]>
set -e
mkdir -p gn.stand || exit 1
cd gn.stand
if [ X$CR = 'X' ]
then
echo "\$CR unset, assuming you have depot_tools in your path."
echo "If download_from_google_storage fails, set \$CR to the directory containing depot_tools."
fi
cr_trunk=http://src.chromium.org/chrome/trunk
target_rev=289113
### Generate top-level build configuration files.
cat >.gn <<EOF
# Automatically generated by build-gn-stand.sh.
# Distantly based on cr://src/.gn
buildconfig = "//build/config/BUILDCONFIG.gn"
secondary_source = "//build/secondary/"
EOF
cat >BUILD.gn <<EOF
# Automatically generated by build-gn-stand.sh.
# Distantly based on cr://src/BUILD.gn
import("//build/config/ui.gni")
group("root") {
deps = [
"//tools/gn",
]
}
EOF
### Check out the necessary bits of Cr sources.
# base and friends
(svn co -r $target_rev --depth=immediates $cr_trunk/src/base && \
cd base && \
svn up -r $target_rev --set-depth=infinity allocator containers \
debug files i18n json memory message_loop metrics nix numerics \
posix power_monitor process profiler strings synchronization \
system_monitor task test threading time timer \
third_party/dmg_fp third_party/dynamic_annotations \
third_party/icu third_party/nspr third_party/superfasthash \
third_party/symbolize third_party/valgrind \
third_party/xdg_mime third_party/xdg_user_dirs )
# build and buildtools
svn co -r $target_rev --depth=infinity $cr_trunk/src/build
git clone https://chromium.googlesource.com/chromium/buildtools.git
# testing
(svn co -r $target_rev --depth=immediates $cr_trunk/src/testing && \
cd testing && \
svn co http://googletest.googlecode.com/svn/trunk gtest && \
svn co http://googlemock.googlecode.com/svn/trunk gmock )
# third_party
(svn co -r $target_rev --depth=immediates $cr_trunk/src/third_party && \
cd third_party && \
svn co -r $target_rev $cr_trunk/deps/third_party/icu52 icu && \
svn up -r $target_rev --set-depth=infinity libevent libxml modp_b64 zlib gsutil )
# tools
(svn co -r $target_rev --depth=empty $cr_trunk/src/tools && \
cd tools && \
svn up -r $target_rev --set-depth=infinity generate_library_loader gn)
python2 build/util/lastchange.py -o build/util/LASTCHANGE
DFGS=download_from_google_storage
if [ X$CR != 'X' ]
then
DFGS=$CR/depot_tools/download_from_google_storage
fi
$DFGS --no_resume --no_auth --bucket chromium-gn \
--platform=linux\* -s buildtools/linux64/gn.sha1
$DFGS --no_resume --no_auth --bucket chromium-gn \
--platform=darwin -s buildtools/mac/gn.sha1
$DFGS --no_resume --no_auth --bucket chromium-gn \
--platform=linux\* -s buildtools/linux32/gn.sha1