]>
Commit | Line | Data |
---|---|---|
fe547a32 | 1 | #!/bin/sh |
8f5f6775 | 2 | set -xe |
fe547a32 | 3 | |
0593259b ER |
4 | export LC_ALL=C |
5 | ||
fe547a32 | 6 | # import options |
cd09b941 ER |
7 | # remove everything unless it's remove has been disabled with "0" |
8 | # "v8=0" means "do not remove v8" | |
fe547a32 ER |
9 | eval "$@" |
10 | ||
05d9087c | 11 | # Strip tarball from some big directories not needed on the linux platform |
f888c710 | 12 | # https://code.google.com/p/chromium/wiki/LinuxPackaging |
99f39995 | 13 | # initial list from src/tools/export_tarball/export_tarball.py |
063abe65 | 14 | # also removed non-linux files: find -name win -o -name mac -o name android -o name windows |
9304218b | 15 | # find -type d -name 'android' -o -name 'chromeos' -o -name 'cros' |
07b01cb7 | 16 | # find -type d -name *doc* |
dda6f58c | 17 | # find -type d -name *example* |
894dee72 ER |
18 | # find -type d -name java |
19 | # find -type d -name tools | |
063abe65 | 20 | # find -type d -name samples |
05d9087c ER |
21 | # suffix with _ those that we can't remove (just yet) because of the gclient |
22 | # hooks (see build/all.gyp) or of some unneeded deps/includes | |
f888c710 | 23 | remove_nonessential_dirs() { |
0bb93ab2 ER |
24 | find -type f '(' \ |
25 | -name 'Android.mk' -o \ | |
26 | -name '*.vcproj' -o \ | |
27 | -name '*.sln' -o \ | |
28 | -name '*.mm' -o \ | |
29 | -name '*.m' \ | |
30 | ')' | xargs rm -vf | |
31 | ||
cfaeb929 ER |
32 | find -regextype posix-extended \ |
33 | -regex '.*_(win|cros|mac)_.*.xtb' \ | |
34 | -print -delete | |
35 | ||
f888c710 ER |
36 | local dir |
37 | for dir in \ | |
4a275e0e ER |
38 | v8/benchmarks \ |
39 | v8/src/arm \ | |
40 | v8/src/d8* \ | |
5048b37a | 41 | third_party/chromite \ |
18ffc809 | 42 | android_webview \ |
9304218b ER |
43 | ash/resources/default_100_percent/cros_ \ |
44 | ash/resources/default_200_percent/cros_ \ | |
dda6f58c | 45 | ash/shell/cocoa \ |
9304218b | 46 | ash/system/chromeos \ |
55dddbd9 | 47 | base/android \ |
9304218b | 48 | base/chromeos \ |
e31bf7c6 | 49 | base/ios \ |
3333a973 | 50 | breakpad/src/client/mac \ |
9304218b | 51 | breakpad/src/common/android \ |
3333a973 ER |
52 | breakpad/src/common/mac \ |
53 | breakpad/src/tools/mac \ | |
54 | build/mac \ | |
7879021e | 55 | build/win_ \ |
55dddbd9 ER |
56 | chrome/android \ |
57 | chrome/app/android \ | |
9304218b ER |
58 | chrome/app/resources/terms/chromeos \ |
59 | chrome/app/theme/default_100_percent/cros_ \ | |
7879021e | 60 | chrome/app/theme/default_100_percent/mac_ \ |
3333a973 | 61 | chrome/app/theme/default_100_percent/win \ |
9304218b | 62 | chrome/app/theme/default_200_percent/cros_ \ |
3333a973 ER |
63 | chrome/app/theme/default_200_percent/mac \ |
64 | chrome/app/theme/default_200_percent/win \ | |
65 | chrome/app/theme/touch_100_percent/win \ | |
66 | chrome/app/theme/touch_140_percent/win \ | |
67 | chrome/app/theme/touch_180_percent/win \ | |
55dddbd9 | 68 | chrome/browser/android \ |
9304218b | 69 | chrome/browser/chromeos/cros \ |
e31bf7c6 | 70 | chrome/browser/extensions/docs \ |
55dddbd9 | 71 | chrome/browser/history/android \ |
3333a973 | 72 | chrome/browser/mac \ |
18ffc809 | 73 | chrome/browser/resources/about_welcome_android \ |
9304218b | 74 | chrome/browser/resources/chromeos_ \ |
18ffc809 | 75 | chrome/browser/resources/ntp_android \ |
9304218b ER |
76 | chrome/browser/resources/options/chromeos_ \ |
77 | chrome/browser/resources/shared/css/chromeos \ | |
78 | chrome/browser/resources/shared/js/chromeos_ \ | |
9304218b | 79 | chrome/browser/ui/android \ |
dda6f58c | 80 | chrome/browser/ui/cocoa \ |
9304218b ER |
81 | chrome/browser/ui/webui/chromeos \ |
82 | chrome/browser/ui/webui/ntp/android \ | |
83 | chrome/browser/ui/webui/options/chromeos \ | |
54623fc8 | 84 | chrome/common/extensions/docs \ |
3333a973 ER |
85 | chrome/common/mac \ |
86 | chrome/installer/mac \ | |
87 | chrome/installer/mac/third_party/xz/config/mac \ | |
894dee72 | 88 | chrome/installer/tools \ |
dda6f58c | 89 | chrome/third_party/jstemplate/tutorial_examples \ |
f2f193c6 | 90 | third_party/jstemplate/tutorial_examples \ |
dda6f58c | 91 | chrome/third_party/mock4js/examples \ |
05d9087c | 92 | chrome/third_party/wtl/ \ |
9304218b | 93 | chrome/tools/build/chromeos \ |
3333a973 ER |
94 | chrome/tools/build/mac \ |
95 | chrome/tools/build/win \ | |
54623fc8 | 96 | chrome_frame \ |
3333a973 | 97 | cloud_print/virtual_driver/win \ |
55dddbd9 ER |
98 | content/app/android \ |
99 | content/browser/android \ | |
100 | content/common/android \ | |
894dee72 ER |
101 | content/components/navigation_interception/java \ |
102 | content/components/web_contents_delegate_android/java \ | |
55dddbd9 ER |
103 | content/public/android \ |
104 | content/public/browser/android \ | |
105 | content/renderer/android \ | |
106 | content/shell/android \ | |
3333a973 | 107 | content/shell/mac \ |
54623fc8 | 108 | data \ |
05d9087c ER |
109 | gears \ |
110 | google_update \ | |
e31bf7c6 | 111 | gpu/command_buffer/docs \ |
05d9087c | 112 | gpu/demos \ |
9304218b | 113 | media/audio/android \ |
e31bf7c6 | 114 | media/audio/ios \ |
3333a973 ER |
115 | media/audio/mac \ |
116 | media/audio/win \ | |
9304218b | 117 | media/base/android \ |
894dee72 | 118 | media/tools \ |
3333a973 ER |
119 | media/video/capture/mac \ |
120 | media/video/capture/win \ | |
9304218b | 121 | media/webm/chromeos \ |
063abe65 | 122 | mesa/MesaLib/src/mesa/drivers/windows \ |
3333a973 | 123 | native_client/build/mac \ |
e31bf7c6 | 124 | native_client/documentation \ |
3333a973 ER |
125 | native_client/src/shared/imc/win \ |
126 | native_client/src/shared/platform/win \ | |
894dee72 | 127 | native_client/src/tools \ |
3333a973 ER |
128 | native_client/src/trusted/debug_stub/win \ |
129 | native_client/src/trusted/desc/win \ | |
130 | native_client/src/trusted/nonnacl_util/win \ | |
131 | native_client/src/trusted/platform_qualify/win \ | |
894dee72 | 132 | native_client/tools \ |
18ffc809 | 133 | native_client/tools/trusted_cross_toolchains \ |
54623fc8 | 134 | native_client_sdk \ |
3333a973 | 135 | native_client_sdk/src/libraries/win \ |
9304218b | 136 | net/android \ |
894dee72 | 137 | net/tools/testserver \ |
063abe65 | 138 | npapi/npspy/windows \ |
05d9087c | 139 | o3d \ |
54623fc8 ER |
140 | o3d/documentation \ |
141 | o3d/samples \ | |
e31bf7c6 ER |
142 | ppapi/c/documentation \ |
143 | ppapi/cpp/documentation \ | |
894dee72 | 144 | ppapi/native_client/src/tools \ |
3333a973 | 145 | ppapi/native_client/src/trusted/plugin/win \ |
894dee72 | 146 | ppapi/native_client/tools \ |
3333a973 | 147 | remoting/host/installer/mac \ |
e15125f5 | 148 | remoting/host/installer/win \ |
3333a973 | 149 | remoting/host/mac \ |
e15125f5 | 150 | remoting/host/setup/win \ |
3333a973 | 151 | remoting/host/win \ |
dda6f58c | 152 | rlz/examples \ |
3333a973 ER |
153 | rlz/mac \ |
154 | rlz/win \ | |
894dee72 | 155 | sandbox/win/tools \ |
e31bf7c6 | 156 | sdch/ios \ |
3333a973 ER |
157 | sdch/mac \ |
158 | skia/config/win \ | |
894dee72 | 159 | sync/tools \ |
063abe65 ER |
160 | tcmalloc/chromium/src/windows \ |
161 | tcmalloc/vendor/src/windows \ | |
e31bf7c6 | 162 | third_party/WebKit/Source/JavaScriptCore/docs \ |
894dee72 | 163 | third_party/WebKit/Source/JavaScriptCore/tools \ |
55dddbd9 | 164 | third_party/WebKit/Source/Platform/chromium/public/android \ |
3333a973 ER |
165 | third_party/WebKit/Source/Platform/chromium/public/mac \ |
166 | third_party/WebKit/Source/Platform/chromium/public/win \ | |
063abe65 ER |
167 | third_party/WebKit/Source/ThirdParty/gtest/samples \ |
168 | third_party/WebKit/Source/ThirdParty/gyp/samples \ | |
169 | third_party/WebKit/Source/ThirdParty/gyp/samples/samples \ | |
894dee72 | 170 | third_party/WebKit/Source/ThirdParty/gyp/tools \ |
3333a973 | 171 | third_party/WebKit/Source/WTF/wtf/mac \ |
4a263112 | 172 | third_party/WebKit/Source/WTF/wtf/qt \ |
3333a973 ER |
173 | third_party/WebKit/Source/WTF/wtf/threads/win \ |
174 | third_party/WebKit/Source/WTF/wtf/win \ | |
175 | third_party/WebKit/Source/WebCore/WebCore.gyp/mac \ | |
176 | third_party/WebKit/Source/WebCore/accessibility/mac \ | |
4a263112 | 177 | third_party/WebKit/Source/WebCore/accessibility/qt \ |
3333a973 | 178 | third_party/WebKit/Source/WebCore/accessibility/win \ |
4a263112 | 179 | third_party/WebKit/Source/WebCore/bridge/qt \ |
55dddbd9 | 180 | third_party/WebKit/Source/WebCore/editing/android \ |
3333a973 | 181 | third_party/WebKit/Source/WebCore/editing/mac \ |
4a263112 | 182 | third_party/WebKit/Source/WebCore/editing/qt \ |
55dddbd9 | 183 | third_party/WebKit/Source/WebCore/history/android \ |
3333a973 | 184 | third_party/WebKit/Source/WebCore/history/mac \ |
4a263112 | 185 | third_party/WebKit/Source/WebCore/history/qt \ |
3333a973 ER |
186 | third_party/WebKit/Source/WebCore/loader/mac \ |
187 | third_party/WebKit/Source/WebCore/loader/win \ | |
55dddbd9 | 188 | third_party/WebKit/Source/WebCore/page/android \ |
3333a973 | 189 | third_party/WebKit/Source/WebCore/page/mac \ |
4a263112 | 190 | third_party/WebKit/Source/WebCore/page/qt \ |
3333a973 ER |
191 | third_party/WebKit/Source/WebCore/page/scrolling/mac \ |
192 | third_party/WebKit/Source/WebCore/page/win \ | |
55dddbd9 | 193 | third_party/WebKit/Source/WebCore/platform/android \ |
3333a973 | 194 | third_party/WebKit/Source/WebCore/platform/audio/mac \ |
4a263112 | 195 | third_party/WebKit/Source/WebCore/platform/audio/qt \ |
3333a973 | 196 | third_party/WebKit/Source/WebCore/platform/cf/win \ |
dda6f58c | 197 | third_party/WebKit/Source/WebCore/platform/cocoa \ |
3333a973 ER |
198 | third_party/WebKit/Source/WebCore/platform/graphics/ca/mac \ |
199 | third_party/WebKit/Source/WebCore/platform/graphics/ca/win \ | |
dda6f58c | 200 | third_party/WebKit/Source/WebCore/platform/graphics/cocoa \ |
3333a973 | 201 | third_party/WebKit/Source/WebCore/platform/graphics/gpu/mac \ |
4a263112 | 202 | third_party/WebKit/Source/WebCore/platform/graphics/gpu/qt \ |
3333a973 | 203 | third_party/WebKit/Source/WebCore/platform/graphics/mac \ |
4a263112 | 204 | third_party/WebKit/Source/WebCore/platform/graphics/qt \ |
3333a973 | 205 | third_party/WebKit/Source/WebCore/platform/graphics/surfaces/mac \ |
4a263112 | 206 | third_party/WebKit/Source/WebCore/platform/graphics/surfaces/qt \ |
e15125f5 | 207 | third_party/WebKit/Source/WebCore/platform/graphics/surfaces/win \ |
3333a973 | 208 | third_party/WebKit/Source/WebCore/platform/graphics/win \ |
e31bf7c6 | 209 | third_party/WebKit/Source/WebCore/platform/ios \ |
3333a973 | 210 | third_party/WebKit/Source/WebCore/platform/mac \ |
55dddbd9 | 211 | third_party/WebKit/Source/WebCore/platform/network/android \ |
3333a973 | 212 | third_party/WebKit/Source/WebCore/platform/network/mac \ |
4a263112 | 213 | third_party/WebKit/Source/WebCore/platform/network/qt \ |
3333a973 | 214 | third_party/WebKit/Source/WebCore/platform/network/win \ |
4a263112 | 215 | third_party/WebKit/Source/WebCore/platform/qt \ |
55dddbd9 | 216 | third_party/WebKit/Source/WebCore/platform/text/android \ |
3333a973 | 217 | third_party/WebKit/Source/WebCore/platform/text/mac \ |
4a263112 | 218 | third_party/WebKit/Source/WebCore/platform/text/qt \ |
3333a973 ER |
219 | third_party/WebKit/Source/WebCore/platform/text/win \ |
220 | third_party/WebKit/Source/WebCore/platform/win \ | |
221 | third_party/WebKit/Source/WebCore/platform/wx/wxcode/mac \ | |
222 | third_party/WebKit/Source/WebCore/platform/wx/wxcode/win \ | |
223 | third_party/WebKit/Source/WebCore/plugins/mac \ | |
4a263112 | 224 | third_party/WebKit/Source/WebCore/plugins/qt \ |
3333a973 | 225 | third_party/WebKit/Source/WebCore/plugins/win \ |
55dddbd9 | 226 | third_party/WebKit/Source/WebKit/chromium/public/android \ |
55dddbd9 | 227 | third_party/WebKit/Source/WebKit/chromium/public/platform/android \ |
3333a973 ER |
228 | third_party/WebKit/Source/WebKit/chromium/public/platform/mac \ |
229 | third_party/WebKit/Source/WebKit/chromium/public/platform/win \ | |
230 | third_party/WebKit/Source/WebKit/chromium/public/win \ | |
55dddbd9 | 231 | third_party/WebKit/Source/WebKit/chromium/src/android \ |
3333a973 ER |
232 | third_party/WebKit/Source/WebKit/chromium/src/mac \ |
233 | third_party/WebKit/Source/WebKit/chromium/src/win \ | |
e31bf7c6 | 234 | third_party/WebKit/Source/WebKit/gtk/docs \ |
3333a973 | 235 | third_party/WebKit/Source/WebKit/mac \ |
4a263112 | 236 | third_party/WebKit/Source/WebKit/qt \ |
e31bf7c6 | 237 | third_party/WebKit/Source/WebKit/qt/docs \ |
dda6f58c | 238 | third_party/WebKit/Source/WebKit/qt/examples \ |
3333a973 | 239 | third_party/WebKit/Source/WebKit/win \ |
063abe65 | 240 | third_party/WebKit/Source/WebKit/wx/bindings/python/samples \ |
3333a973 ER |
241 | third_party/WebKit/Source/WebKit2/Platform/CoreIPC/mac \ |
242 | third_party/WebKit/Source/WebKit2/Platform/CoreIPC/win \ | |
243 | third_party/WebKit/Source/WebKit2/Platform/mac \ | |
244 | third_party/WebKit/Source/WebKit2/Platform/win \ | |
245 | third_party/WebKit/Source/WebKit2/PluginProcess/mac \ | |
246 | third_party/WebKit/Source/WebKit2/Shared/API/c/mac \ | |
247 | third_party/WebKit/Source/WebKit2/Shared/API/c/win \ | |
248 | third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/mac \ | |
249 | third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/win \ | |
250 | third_party/WebKit/Source/WebKit2/Shared/Plugins/mac \ | |
251 | third_party/WebKit/Source/WebKit2/Shared/cg/win \ | |
252 | third_party/WebKit/Source/WebKit2/Shared/mac \ | |
253 | third_party/WebKit/Source/WebKit2/Shared/win \ | |
254 | third_party/WebKit/Source/WebKit2/UIProcess/API/C/mac \ | |
255 | third_party/WebKit/Source/WebKit2/UIProcess/API/C/win \ | |
256 | third_party/WebKit/Source/WebKit2/UIProcess/API/mac \ | |
257 | third_party/WebKit/Source/WebKit2/UIProcess/Launcher/mac \ | |
258 | third_party/WebKit/Source/WebKit2/UIProcess/Launcher/win \ | |
259 | third_party/WebKit/Source/WebKit2/UIProcess/Plugins/mac \ | |
260 | third_party/WebKit/Source/WebKit2/UIProcess/Plugins/win \ | |
261 | third_party/WebKit/Source/WebKit2/UIProcess/mac \ | |
262 | third_party/WebKit/Source/WebKit2/UIProcess/win \ | |
263 | third_party/WebKit/Source/WebKit2/WebProcess/Authentication/mac \ | |
264 | third_party/WebKit/Source/WebKit2/WebProcess/Cookies/mac \ | |
265 | third_party/WebKit/Source/WebKit2/WebProcess/Downloads/cf/win \ | |
266 | third_party/WebKit/Source/WebKit2/WebProcess/Downloads/mac \ | |
267 | third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/mac \ | |
268 | third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/win \ | |
269 | third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/API/c/win \ | |
270 | third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/mac \ | |
271 | third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/win \ | |
272 | third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/mac \ | |
273 | third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/win \ | |
274 | third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/mac \ | |
275 | third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/win \ | |
276 | third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/mac \ | |
277 | third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/win \ | |
278 | third_party/WebKit/Source/WebKit2/WebProcess/WebPage/mac \ | |
279 | third_party/WebKit/Source/WebKit2/WebProcess/WebPage/win \ | |
280 | third_party/WebKit/Source/WebKit2/WebProcess/mac \ | |
281 | third_party/WebKit/Source/WebKit2/WebProcess/win \ | |
282 | third_party/WebKit/Source/WebKit2/mac \ | |
283 | third_party/WebKit/Source/WebKit2/win \ | |
3333a973 | 284 | third_party/WebKit/Tools/DumpRenderTree/mac \ |
4a263112 | 285 | third_party/WebKit/Tools/DumpRenderTree/qt \ |
3333a973 | 286 | third_party/WebKit/Tools/DumpRenderTree/win \ |
71581184 ER |
287 | third_party/angle_dx11/extensions \ |
288 | third_party/angle_dx11/samples \ | |
289 | third_party/angle_dx11/samples/gles2_book \ | |
05d9087c ER |
290 | third_party/boost \ |
291 | third_party/bsdiff \ | |
292 | third_party/bspatch \ | |
894dee72 ER |
293 | third_party/cacheinvalidation/src/example-app-build \ |
294 | third_party/cacheinvalidation/src/java \ | |
55dddbd9 | 295 | third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android \ |
55dddbd9 | 296 | third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android \ |
05d9087c | 297 | third_party/ffmpeg/binaries \ |
3333a973 ER |
298 | third_party/ffmpeg/chromium/binaries/Chromium/win \ |
299 | third_party/ffmpeg/chromium/config/Chrome/mac \ | |
e15125f5 | 300 | third_party/ffmpeg/chromium/config/Chrome/win \ |
3333a973 | 301 | third_party/ffmpeg/chromium/config/Chromium/mac \ |
e15125f5 | 302 | third_party/ffmpeg/chromium/config/Chromium/win \ |
3333a973 | 303 | third_party/ffmpeg/chromium/include/win \ |
e31bf7c6 | 304 | third_party/ffmpeg/doc \ |
894dee72 | 305 | third_party/ffmpeg/tools \ |
05d9087c | 306 | third_party/fuzzymatch \ |
8352ba82 | 307 | third_party/gles2_book \ |
05d9087c ER |
308 | third_party/gles_book_examples \ |
309 | third_party/gold \ | |
05d9087c | 310 | third_party/hunspell/dictionaries \ |
54623fc8 | 311 | third_party/hunspell_dictionaries \ |
e31bf7c6 | 312 | third_party/hyphen/doc \ |
55dddbd9 | 313 | third_party/icu/android \ |
05d9087c ER |
314 | third_party/icu/mac \ |
315 | third_party/lcov \ | |
e31bf7c6 | 316 | third_party/leveldatabase/src/doc \ |
3333a973 | 317 | third_party/leveldatabase/src/port/win \ |
dda6f58c | 318 | third_party/libjingle/source/talk/examples \ |
3333a973 ER |
319 | third_party/libjpeg_turbo/mac \ |
320 | third_party/libjpeg_turbo/win \ | |
55dddbd9 | 321 | third_party/libva/va/android \ |
3333a973 ER |
322 | third_party/libvpx/source/config/mac \ |
323 | third_party/libvpx/source/config/win \ | |
324 | third_party/libxml/mac \ | |
54623fc8 | 325 | third_party/lighttpd \ |
e31bf7c6 | 326 | third_party/mesa/MesaLib/docs \ |
e31bf7c6 | 327 | third_party/mesa/MesaLib/src/gallium/docs \ |
894dee72 | 328 | third_party/npapi/npspy/extern/java \ |
05d9087c ER |
329 | third_party/nspr \ |
330 | third_party/nss \ | |
331 | third_party/ocmock \ | |
55dddbd9 | 332 | third_party/openssl/config/android \ |
894dee72 | 333 | third_party/ots/tools \ |
05d9087c ER |
334 | third_party/pthread \ |
335 | third_party/pyftpdlib \ | |
e31bf7c6 | 336 | third_party/re2/doc \ |
05d9087c | 337 | third_party/scons \ |
894dee72 | 338 | third_party/sfntly/cpp/src/sfntly/tools \ |
05d9087c | 339 | third_party/simplejson \ |
55dddbd9 | 340 | third_party/skia/include/utils/android \ |
e31bf7c6 | 341 | third_party/skia/include/utils/ios \ |
3333a973 ER |
342 | third_party/skia/include/utils/mac \ |
343 | third_party/skia/include/utils/win \ | |
55dddbd9 ER |
344 | third_party/skia/include/views/android \ |
345 | third_party/skia/src/gpu/gl/android \ | |
3333a973 ER |
346 | third_party/skia/src/gpu/gl/mac \ |
347 | third_party/skia/src/gpu/gl/win \ | |
e31bf7c6 | 348 | third_party/skia/src/utils/ios \ |
3333a973 ER |
349 | third_party/skia/src/utils/mac \ |
350 | third_party/skia/src/utils/win \ | |
e31bf7c6 | 351 | third_party/skia/src/views/ios \ |
3333a973 ER |
352 | third_party/skia/src/views/mac \ |
353 | third_party/skia/src/views/win \ | |
354 | third_party/snappy/mac \ | |
e31bf7c6 ER |
355 | third_party/sqlite/src/doc \ |
356 | third_party/tcmalloc/vendor/doc \ | |
dda6f58c ER |
357 | third_party/trace-viewer/examples \ |
358 | third_party/trace-viewer/third_party/pywebsocket/src/example \ | |
54623fc8 | 359 | third_party/vc_80 \ |
e31bf7c6 | 360 | third_party/webdriver/pylib/docs \ |
55dddbd9 | 361 | third_party/webrtc/modules/audio_device/android \ |
e31bf7c6 | 362 | third_party/webrtc/modules/audio_device/ios \ |
3333a973 ER |
363 | third_party/webrtc/modules/audio_device/main/source/mac \ |
364 | third_party/webrtc/modules/audio_device/main/source/win \ | |
e15125f5 | 365 | third_party/webrtc/modules/audio_device/win \ |
894dee72 | 366 | third_party/webrtc/modules/video_capture/android/java \ |
55dddbd9 | 367 | third_party/webrtc/modules/video_capture/main/source/android \ |
894dee72 | 368 | third_party/webrtc/modules/video_render/android/java \ |
55dddbd9 | 369 | third_party/webrtc/modules/video_render/main/source/android \ |
3333a973 | 370 | third_party/webrtc/modules/video_render/main/source/mac \ |
55dddbd9 | 371 | third_party/webrtc/system_wrappers/source/android \ |
55dddbd9 | 372 | third_party/yasm/source/config/android \ |
3333a973 ER |
373 | third_party/yasm/source/config/mac \ |
374 | third_party/yasm/source/config/win \ | |
9304218b | 375 | tools/android \ |
063abe65 ER |
376 | tools/gyp/samples \ |
377 | tools/gyp/samples/samples \ | |
894dee72 | 378 | tools/gyp/tools \ |
3333a973 | 379 | tools/mac \ |
54623fc8 | 380 | tools/site_compare \ |
05d9087c ER |
381 | tools/stats_viewer \ |
382 | tools/symsrc \ | |
05d9087c | 383 | tools/valgrind \ |
3333a973 | 384 | tools/win \ |
05d9087c | 385 | tools/wine_valgrind \ |
9304218b | 386 | ui/android \ |
dda6f58c | 387 | ui/base/cocoa \ |
e15125f5 | 388 | ui/base/ime/win \ |
9304218b | 389 | ui/gfx/android \ |
3333a973 | 390 | ui/gfx/mac \ |
9304218b ER |
391 | ui/resources/default_100_percent/cros_ \ |
392 | ui/resources/default_200_percent/cros_ \ | |
dda6f58c | 393 | ui/views/examples \ |
3333a973 | 394 | ui/views/win \ |
063abe65 | 395 | v8/samples \ |
9304218b | 396 | webkit/chromeos \ |
55dddbd9 | 397 | webkit/media/android \ |
063abe65 ER |
398 | webrtc/modules/video_capture/windows \ |
399 | webrtc/modules/video_render/windows \ | |
8352ba82 | 400 | win8 \ |
f888c710 ER |
401 | ; do |
402 | rm -vfr "$dir" | |
403 | done | |
0bb93ab2 ER |
404 | |
405 | find $(ls -d \ | |
406 | base/mac \ | |
407 | base/win \ | |
408 | build/android \ | |
409 | chrome/browser/chromeos \ | |
410 | chrome/browser/component/web_contents_delegate_android \ | |
411 | chrome/tools \ | |
412 | chromeos \ | |
7879021e | 413 | cloud_print/service/win \ |
0bb93ab2 ER |
414 | content/browser/renderer_host/java \ |
415 | content/common/mac \ | |
416 | content/renderer/java \ | |
417 | gpu/tools \ | |
418 | native_client/src/include/win \ | |
419 | native_client/src/trusted/service_runtime/win \ | |
71581184 | 420 | net/tools \ |
0bb93ab2 ER |
421 | remoting/tools \ |
422 | sandbox/win \ | |
423 | third_party/WebKit/Source/WebKit/chromium/public/mac \ | |
424 | third_party/WebKit/Tools \ | |
425 | third_party/cld/encodings/compact_lang_det/win \ | |
426 | third_party/cros_system_api \ | |
427 | third_party/mozc/chrome/chromeos \ | |
428 | third_party/sfntly/cpp/src/sample \ | |
429 | third_party/tcmalloc \ | |
430 | third_party/v8-i18n/tools \ | |
431 | third_party/webrtc/modules/video_coding/codecs/tools \ | |
432 | third_party/webrtc/tools \ | |
433 | ui/base/win \ | |
434 | v8/tools \ | |
435 | webkit/tools \ | |
436 | ) '!' -type d '(' \ | |
0bb93ab2 | 437 | '!' -name '*.grd' \ |
f2f193c6 | 438 | '!' -name '*.gyp*' \ |
0bb93ab2 ER |
439 | '!' -path 'base/mac/bundle_locations.h' \ |
440 | '!' -path 'base/mac/crash_logging.h' \ | |
441 | '!' -path 'base/win/windows_version.h' \ | |
442 | '!' -path 'build/android/cpufeatures.gypi' \ | |
443 | '!' -path 'chrome/browser/chromeos/contacts/contact.proto' \ | |
4a275e0e | 444 | '!' -path 'chrome/browser/chromeos/extensions/echo_private_api.h' \ |
7879021e | 445 | '!' -path 'chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api.h' \ |
4a275e0e ER |
446 | '!' -path 'chrome/browser/chromeos/extensions/info_private_api.h' \ |
447 | '!' -path 'chrome/browser/chromeos/extensions/media_player_api.h' \ | |
f2f193c6 | 448 | '!' -path 'chrome/browser/chromeos/extensions/networking_private_api.h' \ |
4a275e0e | 449 | '!' -path 'chrome/browser/chromeos/extensions/wallpaper_private_api.h' \ |
0bb93ab2 ER |
450 | '!' -path 'chrome/browser/chromeos/settings/cros_settings.h' \ |
451 | '!' -path 'chrome/browser/chromeos/settings/cros_settings_names.h' \ | |
452 | '!' -path 'chrome/browser/chromeos/settings/cros_settings_provider.h' \ | |
f2f193c6 | 453 | '!' -path 'chrome/browser/chromeos/settings/device_settings_service.h' \ |
0bb93ab2 ER |
454 | '!' -path 'chrome/tools/build/generate_policy_source.py' \ |
455 | '!' -path 'chrome/tools/build/linux/sed.sh' \ | |
456 | '!' -path 'chrome/tools/build/make_version_cc.py' \ | |
457 | '!' -path 'chrome/tools/build/repack_locales.py' \ | |
458 | '!' -path 'chrome/tools/build/version.py' \ | |
71581184 | 459 | '!' -path 'chromeos/chromeos_constants.h' \ |
0bb93ab2 | 460 | '!' -path 'chromeos/chromeos_export.h' \ |
4a275e0e | 461 | '!' -path 'chromeos/chromeos_switches.h' \ |
f2f193c6 ER |
462 | '!' -path 'chromeos/dbus/dbus_client_implementation_type.h' \ |
463 | '!' -path 'chromeos/dbus/session_manager_client.h' \ | |
0bb93ab2 ER |
464 | '!' -path 'chromeos/network/onc/onc_constants.h' \ |
465 | '!' -path 'content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h' \ | |
466 | '!' -path 'content/common/mac/attributed_string_coder.h' \ | |
467 | '!' -path 'content/common/mac/font_descriptor.h' \ | |
468 | '!' -path 'content/renderer/java/java_bridge_dispatcher.h' \ | |
469 | '!' -path 'native_client/src/include/win/mman.h' \ | |
470 | '!' -path 'native_client/src/trusted/service_runtime/win/debug_exception_handler.h' \ | |
471 | '!' -path 'native_client/src/trusted/service_runtime/win/exception_patch/ntdll_patch.h' \ | |
71581184 | 472 | '!' -path 'net/tools/tld_cleanup/*' \ |
0bb93ab2 ER |
473 | '!' -path 'remoting/tools/verify_resources.py' \ |
474 | '!' -path 'sandbox/win/src/sandbox_types.h' \ | |
475 | '!' -path 'third_party/WebKit/Source/WebKit/chromium/public/mac/WebSubstringUtil.h' \ | |
476 | '!' -path 'third_party/cld/encodings/compact_lang_det/win/cld_*.cc' \ | |
477 | '!' -path 'third_party/cld/encodings/compact_lang_det/win/cld_*.h' \ | |
478 | '!' -path 'third_party/cros_system_api/dbus/*.proto' \ | |
479 | '!' -path 'third_party/cros_system_api/dbus/service_constants.h' \ | |
480 | '!' -path 'third_party/sfntly/cpp/src/sample/chromium/*' \ | |
481 | '!' -path 'third_party/tcmalloc/chromium/*' \ | |
482 | '!' -path 'third_party/v8-i18n/tools/js2c.py' \ | |
483 | '!' -path 'ui/base/win/dpi.h' \ | |
484 | '!' -path 'v8/tools/js2c.py' \ | |
485 | '!' -path 'v8/tools/jsmin.py' \ | |
4a275e0e | 486 | '!' -path 'webkit/tools/test_shell/*.h' \ |
0bb93ab2 ER |
487 | ')' \ |
488 | -print -delete | |
f888c710 ER |
489 | } |
490 | ||
8352ba82 ER |
491 | # There are directories we want to strip, but that are unnecessarily required by the build-system |
492 | # So we drop everything but the gyp/gypi files | |
493 | almost_strip_dirs() { | |
494 | local dir | |
495 | for dir in \ | |
f2f193c6 | 496 | breakpad_ \ |
e31bf7c6 | 497 | build/ios \ |
8352ba82 | 498 | courgette \ |
18ffc809 | 499 | third_party/cros_dbus_cplusplus \ |
8352ba82 | 500 | ; do |
0bb93ab2 | 501 | find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' ')' -print -delete || : |
8352ba82 | 502 | done |
bcc7de3a ER |
503 | |
504 | find tools -type f \ | |
505 | '!' -iname '*.gyp*' \ | |
506 | '!' -path 'tools/build/*' \ | |
507 | '!' -path 'tools/clang/scripts/plugin_flags.sh' \ | |
bdd77e01 | 508 | '!' -path 'tools/compile_test/compile_test.py' \ |
108c5f7c ER |
509 | '!' -path 'tools/generate_library_loader/*' \ |
510 | '!' -path 'tools/generate_shim_headers/generate_shim_headers.py' \ | |
bcc7de3a ER |
511 | '!' -path 'tools/generate_stubs/*' \ |
512 | '!' -path 'tools/grit/*' \ | |
513 | '!' -path 'tools/gritsettings/*' \ | |
514 | '!' -path 'tools/gyp/*' \ | |
7879021e | 515 | '!' -path 'tools/json_comment_eater/json_comment_eater.py' \ |
bcc7de3a | 516 | '!' -path 'tools/json_schema_compiler/*' \ |
108c5f7c | 517 | '!' -path 'tools/json_to_struct/*' \ |
f2f193c6 | 518 | '!' -path 'tools/licenses.py' \ |
bcc7de3a | 519 | '!' -path 'tools/protoc_wrapper/*' \ |
f2f193c6 | 520 | '!' -path 'tools/usb_ids/*' \ |
bcc7de3a ER |
521 | '!' -path 'tools/uuidgen.py' \ |
522 | '!' -path 'tools/zip2msi.py' \ | |
523 | -print -delete | |
8352ba82 ER |
524 | } |
525 | ||
e21194da ER |
526 | # clean third party |
527 | # list based from archlinux PKGBUILD | |
528 | # https://aur.archlinux.org/packages/ch/chromium-dev/PKGBUILD | |
529 | clean_third_party() { | |
063abe65 ER |
530 | local dir |
531 | for dir in \ | |
532 | third_party/ashmem \ | |
063abe65 ER |
533 | third_party/eyesfree \ |
534 | third_party/guava \ | |
f2f193c6 | 535 | third_party/iaccessible2 \ |
063abe65 ER |
536 | third_party/icon_family \ |
537 | third_party/isimpledom \ | |
063abe65 ER |
538 | third_party/jsr-305 \ |
539 | third_party/libexif \ | |
540 | third_party/mach_override \ | |
f2f193c6 ER |
541 | third_party/npapi/npspy \ |
542 | third_party/re2/benchlog \ | |
063abe65 ER |
543 | third_party/sqlite/*.patch \ |
544 | third_party/sqlite/src/*.patch \ | |
f2f193c6 | 545 | third_party/sudden_motion_sensor \ |
063abe65 ER |
546 | ; do |
547 | rm -vfr "$dir" | |
548 | done | |
549 | ||
80b34a6e ER |
550 | find third_party -type f \ |
551 | '!' -iname '*.gyp*' \ | |
15f29c79 ER |
552 | \! -path 'third_party/WebKit/*' \ |
553 | \! -path 'third_party/adobe/flash/*' \ | |
71581184 ER |
554 | \! -path 'third_party/angle_dx11/include/EGL/*' \ |
555 | \! -path 'third_party/angle_dx11/include/GLSLANG/*' \ | |
556 | \! -path 'third_party/angle_dx11/src/common/*' \ | |
557 | \! -path 'third_party/angle_dx11/src/compiler/*' \ | |
558 | \! -path 'third_party/angle_dx11/src/third_party/compiler/*' \ | |
e21194da ER |
559 | \! -path 'third_party/cacheinvalidation/*' \ |
560 | \! -path 'third_party/cld/*' \ | |
15f29c79 | 561 | \! -path 'third_party/cros_system_api/*' \ |
063abe65 | 562 | \! -path 'third_party/flot/*.js' \ |
e21194da ER |
563 | \! -path 'third_party/hunspell/*' \ |
564 | \! -path 'third_party/hyphen/*' \ | |
565 | \! -path 'third_party/iccjpeg/*' \ | |
80b34a6e | 566 | \! -path 'third_party/jstemplate/*' \ |
e21194da ER |
567 | \! -path 'third_party/khronos/*' \ |
568 | \! -path 'third_party/leveldatabase/*' \ | |
15f29c79 | 569 | \! -path 'third_party/libXNVCtrl/*' \ |
e21194da ER |
570 | \! -path 'third_party/libjingle/*' \ |
571 | \! -path 'third_party/libphonenumber/*' \ | |
e21194da | 572 | \! -path 'third_party/libva/*' \ |
80b34a6e | 573 | \! -path 'third_party/libvpx/*' \ |
e21194da | 574 | \! -path 'third_party/libxml/chromium/*' \ |
e21194da | 575 | \! -path 'third_party/libyuv/*' \ |
063abe65 | 576 | \! -path 'third_party/lss/*.h' \ |
71581184 ER |
577 | \! -path 'third_party/lzma_sdk/*' \ |
578 | \! -path 'third_party/mesa/src/include/GL/gl.h' \ | |
579 | \! -path 'third_party/mesa/src/include/GL/glext.h' \ | |
580 | \! -path 'third_party/mesa/src/include/GL/glx.h' \ | |
581 | \! -path 'third_party/mesa/src/include/GL/glxext.h' \ | |
582 | \! -path 'third_party/mesa/src/include/GL/osmesa.h' \ | |
e21194da | 583 | \! -path 'third_party/modp_b64/*' \ |
e21194da ER |
584 | \! -path 'third_party/mt19937ar/*' \ |
585 | \! -path 'third_party/npapi/*' \ | |
e21194da | 586 | \! -path 'third_party/ots/*' \ |
e21194da | 587 | \! -path 'third_party/protobuf/*' \ |
e21194da ER |
588 | \! -path 'third_party/qcms/*' \ |
589 | \! -path 'third_party/re2/*' \ | |
e21194da ER |
590 | \! -path 'third_party/sfntly/*' \ |
591 | \! -path 'third_party/skia/*' \ | |
592 | \! -path 'third_party/smhasher/*' \ | |
7879021e | 593 | \! -path 'third_party/snappy/*' \ |
94458173 ER |
594 | \! -path 'third_party/sqlite/amalgamation/*' \ |
595 | \! -path 'third_party/sqlite/sqlite3.h' \ | |
596 | \! -path 'third_party/sqlite/src/ext/*' \ | |
e21194da | 597 | \! -path 'third_party/tcmalloc/*' \ |
e21194da ER |
598 | \! -path 'third_party/trace-viewer/*' \ |
599 | \! -path 'third_party/undoview/*' \ | |
71581184 | 600 | \! -path 'third_party/usrsctp/*' \ |
e21194da ER |
601 | \! -path 'third_party/v8-i18n/*' \ |
602 | \! -path 'third_party/v8/*' \ | |
e21194da ER |
603 | \! -path 'third_party/webrtc/*' \ |
604 | \! -path 'third_party/widevine/*' \ | |
80b34a6e | 605 | \! -path 'third_party/x86inc/*' \ |
7879021e | 606 | \! -path 'third_party/zlib/google/*' \ |
e21194da ER |
607 | -print -delete |
608 | ||
e21194da ER |
609 | rm -vf third_party/expat/files/lib/expat.h |
610 | } | |
611 | ||
99f39995 ER |
612 | # parts based on ubuntu debian/rules |
613 | # http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-browser.head/view/head:/debian/rules | |
99f39995 | 614 | remove_bin_only() { |
55dddbd9 | 615 | find -type f \( \ |
99f39995 | 616 | -iname \*.exe -o \ |
894dee72 ER |
617 | -iname \*.nexe -o \ |
618 | -iname \*.fon -o \ | |
619 | -iname \*.ttf -o \ | |
99f39995 ER |
620 | -iname \*.dll -o \ |
621 | -iname \*.pdb -o \ | |
622 | -name \*.o -o \ | |
623 | -name \*.a -o \ | |
624 | -name \*.dylib \ | |
625 | \) -exec rm -fv {} \; | |
626 | } | |
627 | ||
628 | # removes dir, if the bcond is not turned off | |
629 | strip_system_dirs() { | |
517dd8ef ER |
630 | local dir lib bcond args |
631 | # prevent "*" from being expanded in $args | |
632 | set -f | |
99f39995 | 633 | for dir in "$@"; do |
517dd8ef ER |
634 | args=${dir#* } |
635 | test "$args" = "$dir" && args= | |
636 | dir=${dir%% *} | |
99f39995 ER |
637 | lib=${dir##*/} |
638 | bcond=$(eval echo \$$lib) | |
cd09b941 | 639 | [ "${bcond:-1}" = 0 ] && continue |
99f39995 ER |
640 | |
641 | # skip already removed dirs | |
642 | test -d $dir || continue | |
643 | ||
517dd8ef | 644 | find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' -o -path $dir/$lib.h $args ')' -print -delete || : |
99f39995 | 645 | done |
517dd8ef | 646 | set +f |
99f39995 ER |
647 | } |
648 | ||
da3dfa9f | 649 | # remove test data and files |
e31bf7c6 | 650 | # some scanned with find -name tests -o -name test -o -name test_data -o name testdata |
da3dfa9f ER |
651 | # and find -iname *test* |
652 | remove_tests() { | |
653 | local dir | |
654 | ||
655 | # full remove | |
656 | for dir in \ | |
657 | ash/test \ | |
658 | base/test \ | |
659 | breakpad/src/client/windows/tests \ | |
660 | breakpad/src/common/linux/tests \ | |
661 | breakpad/src/common/tests \ | |
e31bf7c6 | 662 | cc/test \ |
da3dfa9f ER |
663 | chrome/browser/chromeos/bluetooth/test \ |
664 | chrome/browser/component_updater/test \ | |
e31bf7c6 | 665 | chrome/browser/extensions/api/test_ \ |
da3dfa9f | 666 | chrome/browser/printing/cloud_print/test \ |
71581184 | 667 | chrome/browser/resources/gaia_auth/test_ \ |
da3dfa9f ER |
668 | chrome/browser/resources/tracing/tests \ |
669 | chrome/browser/sync/test \ | |
e31bf7c6 ER |
670 | chrome/browser/ui/cocoa/test \ |
671 | chrome/browser/ui/gtk/test \ | |
da3dfa9f | 672 | chrome/browser/ui/tests \ |
e31bf7c6 | 673 | chrome/browser/ui/views/test \ |
da3dfa9f ER |
674 | chrome/installer/test \ |
675 | chrome/test/chromeos \ | |
676 | chrome/test/data/firefox2_nss_mac \ | |
677 | chrome/test/data/safe_browsing/old \ | |
678 | chrome/test/logging/win \ | |
679 | chrome/test/pyautolib/chromeos \ | |
680 | chrome/test/webdriver/test \ | |
e31bf7c6 | 681 | chrome/test_ \ |
da3dfa9f ER |
682 | chrome/tools/test \ |
683 | chrome_frame/test \ | |
684 | chrome_frame/tools/test \ | |
685 | content/browser/worker_host/test \ | |
e31bf7c6 | 686 | content/common/gpu/testdata \ |
da3dfa9f ER |
687 | content/public/test \ |
688 | content/test \ | |
689 | courgette/testdata \ | |
e31bf7c6 ER |
690 | device/bluetooth/test \ |
691 | device/test \ | |
da3dfa9f ER |
692 | gpu/command_buffer/tests \ |
693 | media/test \ | |
694 | media/tools/layout_tests/test_data \ | |
e31bf7c6 ER |
695 | native_client/buildbot \ |
696 | native_client/src/shared/platform/testdata \ | |
697 | native_client/src/trusted/gio/testdata \ | |
698 | native_client/src/trusted/interval_multiset/testdata \ | |
da3dfa9f | 699 | native_client/src/trusted/service_runtime/testdata \ |
e31bf7c6 | 700 | native_client/src/trusted/validator/x86/decoder/generator/testdata \ |
da3dfa9f | 701 | native_client/src/trusted/validator/x86/testing \ |
e31bf7c6 ER |
702 | native_client/src/trusted/validator_arm/testdata \ |
703 | native_client/src/trusted/validator_mips/testdata \ | |
704 | native_client/src/trusted/validator_x86/testdata \ | |
da3dfa9f | 705 | native_client/tests \ |
e31bf7c6 | 706 | native_client/tools/testdata \ |
da3dfa9f ER |
707 | native_client/tools/tests \ |
708 | native_client_sdk/src/build_tools/tests \ | |
709 | native_client_sdk/src/libraries/c_salt/test \ | |
710 | net/test \ | |
711 | o3d/tests \ | |
712 | ppapi/native_client/tests \ | |
713 | ppapi/tests \ | |
714 | printing/test \ | |
715 | rlz/test \ | |
716 | sandbox/linux/seccomp-legacy/tests \ | |
717 | sandbox/linux/tests \ | |
718 | sandbox/tests \ | |
719 | sandbox/win/tests \ | |
e31bf7c6 | 720 | sdch/open-vcdiff/testdata \ |
da3dfa9f ER |
721 | seccompsandbox/tests \ |
722 | sync/internal_api/public/test \ | |
723 | sync/internal_api/test \ | |
724 | sync/test \ | |
725 | testing/android \ | |
726 | testing/gmock/scripts/test \ | |
727 | testing/gmock/test \ | |
728 | testing/gtest/scripts/test \ | |
729 | testing/gtest/test \ | |
730 | third_party/WebKit/LayoutTests \ | |
731 | third_party/WebKit/Source/JavaScriptCore/API/tests \ | |
732 | third_party/WebKit/Source/JavaScriptCore/qt/tests \ | |
733 | third_party/WebKit/Source/JavaScriptCore/tests \ | |
734 | third_party/WebKit/Source/ThirdParty/gtest/scripts/test \ | |
735 | third_party/WebKit/Source/ThirdParty/gtest/test \ | |
736 | third_party/WebKit/Source/ThirdParty/gyp/test \ | |
737 | third_party/WebKit/Source/ThirdParty/qunit/test \ | |
738 | third_party/WebKit/Source/WebCore/bindings/scripts/test \ | |
739 | third_party/WebKit/Source/WebCore/testing_ \ | |
740 | third_party/WebKit/Source/WebKit/chromium/tests \ | |
741 | third_party/WebKit/Source/WebKit/efl/tests \ | |
742 | third_party/WebKit/Source/WebKit/gtk/tests \ | |
743 | third_party/WebKit/Source/WebKit/qt/tests \ | |
744 | third_party/WebKit/Source/WebKit2/UIProcess/API/efl/tests \ | |
745 | third_party/WebKit/Source/WebKit2/UIProcess/API/gtk/tests \ | |
746 | third_party/WebKit/Source/WebKit2/UIProcess/API/qt/tests \ | |
747 | third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac \ | |
748 | third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/win \ | |
749 | third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/mac \ | |
750 | third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/win \ | |
751 | third_party/WebKit/Tools/Scripts/webkitpy/test \ | |
752 | third_party/WebKit/Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac \ | |
753 | third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit/win \ | |
754 | third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/mac \ | |
755 | third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/win \ | |
756 | third_party/WebKit/Tools/TestWebKitAPI/Tests/mac \ | |
757 | third_party/WebKit/Tools/TestWebKitAPI/mac \ | |
758 | third_party/WebKit/Tools/TestWebKitAPI/win \ | |
71581184 | 759 | third_party/angle_dx11/tests \ |
da3dfa9f | 760 | third_party/cacheinvalidation/files/src/google/cacheinvalidation/test \ |
e31bf7c6 | 761 | third_party/cacheinvalidation/src/google/cacheinvalidation/test \ |
da3dfa9f ER |
762 | third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing \ |
763 | third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing/android \ | |
764 | third_party/ffmpeg/tests \ | |
765 | third_party/harfbuzz/tests \ | |
766 | third_party/hunspell/tests \ | |
767 | third_party/hyphen/tests \ | |
768 | third_party/libexif/sources/test \ | |
769 | third_party/libjingle/source/talk/app/webrtc/test \ | |
e31bf7c6 | 770 | third_party/libjingle/source/talk/media/testdata \ |
da3dfa9f ER |
771 | third_party/libphonenumber/src/resources/test \ |
772 | third_party/libphonenumber/src/test \ | |
773 | third_party/libsrtp/srtp/crypto/test \ | |
774 | third_party/libsrtp/srtp/test \ | |
e31bf7c6 | 775 | third_party/libyuv/unit_test/testdata \ |
da3dfa9f ER |
776 | third_party/mesa/MesaLib/src/gallium/tests \ |
777 | third_party/openssl/openssl/crypto/des/t/test \ | |
778 | third_party/openssl/openssl/test \ | |
779 | third_party/ots/test \ | |
e31bf7c6 | 780 | third_party/protobuf/src/google/protobuf/testdata \ |
da3dfa9f ER |
781 | third_party/protobuf/src/google/protobuf/testing \ |
782 | third_party/re2/re2/testing \ | |
783 | third_party/safe_browsing/testing \ | |
784 | third_party/sfntly/cpp/src/test \ | |
785 | third_party/sqlite/src/test \ | |
786 | third_party/sqlite/test \ | |
787 | third_party/talloc/libreplace/test \ | |
788 | third_party/tcmalloc/chromium/src/tests \ | |
789 | third_party/tcmalloc/vendor/src/tests \ | |
790 | third_party/tlslite/test \ | |
791 | third_party/trace-viewer/test_data \ | |
e31bf7c6 ER |
792 | third_party/trace-viewer/third_party/pywebsocket/src/test \ |
793 | third_party/trace-viewer/third_party/pywebsocket/src/test/testdata \ | |
da3dfa9f ER |
794 | third_party/v8-i18n/tests \ |
795 | third_party/webdriver/pylib/test \ | |
796 | third_party/webdriver/test_data \ | |
797 | third_party/webrtc/modules/audio_device/test/android \ | |
798 | third_party/webrtc/modules/audio_processing/test/android \ | |
e31bf7c6 | 799 | third_party/webrtc/modules/utility/test \ |
da3dfa9f | 800 | third_party/webrtc/modules/video_capture/main/test/android \ |
e31bf7c6 | 801 | third_party/webrtc/system_wrappers/test \ |
4a275e0e | 802 | third_party/webrtc/test/manual \ |
da3dfa9f | 803 | third_party/webrtc/test/testsupport/mac \ |
da3dfa9f ER |
804 | third_party/webrtc/video_engine/test/auto_test/android \ |
805 | third_party/webrtc/voice_engine/test/android \ | |
806 | third_party/xdg-utils/tests \ | |
807 | third_party/yasm/source/patched-yasm/libyasm/tests \ | |
808 | third_party/yasm/source/patched-yasm/modules/arch/lc3b/tests \ | |
809 | third_party/yasm/source/patched-yasm/modules/arch/x86/tests \ | |
810 | third_party/yasm/source/patched-yasm/modules/dbgfmts/dwarf2/tests \ | |
811 | third_party/yasm/source/patched-yasm/modules/dbgfmts/stabs/tests \ | |
812 | third_party/yasm/source/patched-yasm/modules/objfmts/bin/tests \ | |
813 | third_party/yasm/source/patched-yasm/modules/objfmts/coff/tests \ | |
814 | third_party/yasm/source/patched-yasm/modules/objfmts/elf/tests \ | |
815 | third_party/yasm/source/patched-yasm/modules/objfmts/macho/tests \ | |
816 | third_party/yasm/source/patched-yasm/modules/objfmts/rdf/tests \ | |
817 | third_party/yasm/source/patched-yasm/modules/objfmts/win32/tests \ | |
818 | third_party/yasm/source/patched-yasm/modules/objfmts/win64/tests \ | |
819 | third_party/yasm/source/patched-yasm/modules/objfmts/xdf/tests \ | |
820 | third_party/yasm/source/patched-yasm/modules/parsers/gas/tests \ | |
821 | third_party/yasm/source/patched-yasm/modules/parsers/nasm/tests \ | |
822 | third_party/yasm/source/patched-yasm/modules/parsers/tasm/tests \ | |
823 | third_party/yasm/source/patched-yasm/modules/preprocs/nasm/tests \ | |
824 | third_party/yasm/source/patched-yasm/modules/preprocs/raw/tests \ | |
825 | third_party/yasm/source/patched-yasm/tools/python-yasm/tests \ | |
826 | tools/clang/plugins/tests \ | |
e31bf7c6 | 827 | tools/grit/grit/testdata \ |
da3dfa9f | 828 | tools/gyp/test \ |
e31bf7c6 | 829 | tools/gyp/tools/emacs/testdata \ |
da3dfa9f ER |
830 | tools/page_cycler/webpagereplay/tests \ |
831 | tools/perf_expectations/tests \ | |
e31bf7c6 | 832 | tools/swarm_client/tests \ |
da3dfa9f ER |
833 | ui/app_list/test \ |
834 | ui/aura/test \ | |
835 | ui/base/test \ | |
836 | ui/compositor/test \ | |
837 | ui/gfx/test \ | |
838 | ui/test \ | |
839 | ui/views/test \ | |
840 | v8/test \ | |
e31bf7c6 | 841 | webkit/compositor_bindings/test \ |
da3dfa9f ER |
842 | webkit/data/layout_tests \ |
843 | webkit/plugins/npapi/test \ | |
844 | webkit/tools/test/reference_build \ | |
845 | webkit/tools/test_shell/mac \ | |
846 | ; do | |
847 | rm -vfr "$dir" | |
848 | done | |
849 | ||
850 | # partial remove (keep .gyp) | |
851 | for dir in \ | |
e31bf7c6 | 852 | chrome/browser/nacl_host/test \ |
da3dfa9f ER |
853 | chrome/test/data \ |
854 | testing \ | |
e31bf7c6 ER |
855 | third_party/webrtc/modules/audio_coding/codecs/cng/test \ |
856 | third_party/webrtc/modules/audio_coding/codecs/g711/test \ | |
857 | third_party/webrtc/modules/audio_coding/codecs/g722/test \ | |
858 | third_party/webrtc/modules/audio_coding/codecs/ilbc/test \ | |
859 | third_party/webrtc/modules/audio_coding/codecs/isac/fix/test \ | |
860 | third_party/webrtc/modules/audio_coding/codecs/isac/main/test \ | |
861 | third_party/webrtc/modules/audio_coding/main/test \ | |
862 | third_party/webrtc/modules/audio_coding/neteq/test \ | |
863 | third_party/webrtc/modules/audio_conference_mixer/test \ | |
864 | third_party/webrtc/modules/audio_device/test \ | |
865 | third_party/webrtc/modules/audio_processing/test \ | |
866 | third_party/webrtc/modules/rtp_rtcp/test \ | |
867 | third_party/webrtc/modules/udp_transport/test \ | |
868 | third_party/webrtc/modules/video_capture/main/test \ | |
869 | third_party/webrtc/modules/video_coding/codecs/test \ | |
870 | third_party/webrtc/modules/video_coding/codecs/vp8/test \ | |
871 | third_party/webrtc/modules/video_coding/main/test \ | |
872 | third_party/webrtc/modules/video_processing/main/test \ | |
873 | third_party/webrtc/modules/video_render/main/test \ | |
874 | third_party/webrtc/video_engine/test \ | |
875 | third_party/webrtc/voice_engine/test \ | |
876 | tools/json_schema_compiler/test \ | |
da3dfa9f | 877 | ; do |
e31bf7c6 | 878 | find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' ')' -print -delete || : |
da3dfa9f ER |
879 | done |
880 | ||
881 | # link headers from system dir. too many files to patch, we don't even build tests | |
882 | install -d testing/gtest/include | |
883 | ln -s /usr/include/gtest testing/gtest/include/gtest | |
884 | ||
885 | # delete unittest files | |
dda6f58c ER |
886 | find . '(' \ |
887 | -name '*_unittest*.*' \ | |
063abe65 ER |
888 | -o -name '*_unittest.*' \ |
889 | -o -name '*_unittest' \ | |
890 | -o -name 'test_*.*' \ | |
dda6f58c ER |
891 | -o -name '*_test.*' \ |
892 | ')' '!' -name '*.gyp*' \ | |
063abe65 ER |
893 | '!' -name '*.isolate' \ |
894 | '!' -name '*.grd' \ | |
dda6f58c | 895 | '!' -path './chrome/browser/diagnostics/diagnostics_test.*' \ |
063abe65 ER |
896 | '!' -path './chrome/browser/extensions/api/declarative/test_rules_registry.*' \ |
897 | '!' -path './chrome/browser/extensions/api/test/test_api.*' \ | |
71581184 | 898 | '!' -path './chrome/browser/resources/gaia_auth/manifest_test.json' \ |
063abe65 | 899 | '!' -path './chrome/browser/resources/net_internals/*' \ |
7879021e | 900 | '!' -path './chrome/browser/storage_monitor/test_media_transfer_protocol_manager_linux.*' \ |
063abe65 ER |
901 | '!' -path './chrome/browser/ui/webui/test_chrome_web_ui_controller_factory*' \ |
902 | '!' -path './chrome/common/net/test_server_locations.*' \ | |
4a275e0e | 903 | '!' -path './chrome/renderer/resources/extensions/test_custom_bindings.js' \ |
063abe65 | 904 | '!' -path './chrome/test/base/test_switches.*' \ |
dda6f58c | 905 | '!' -path './chrome/test/perf/browser_perf_test.*' \ |
063abe65 ER |
906 | '!' -path './chrome/test/perf/perf_test.*' \ |
907 | '!' -path './native_client/src/trusted/fault_injection/test_injection.*' \ | |
908 | '!' -path './native_client/src/trusted/service_runtime/env_cleanser_test.h' \ | |
909 | '!' -path './net/base/test_completion_callback.*' \ | |
910 | '!' -path './net/base/test_data_stream.*' \ | |
7879021e | 911 | '!' -path './net/cert/test_root_certs*' \ |
3b691646 | 912 | '!' -path './remoting/base/resources_unittest.*' \ |
063abe65 | 913 | '!' -path './third_party/skia/src/gpu/gr_unittests.*' \ |
bdd77e01 | 914 | '!' -path './tools/compile_test/compile_test.py' \ |
063abe65 | 915 | '!' -path './ui/compositor/test_web_graphics_context_3d.*' \ |
71581184 ER |
916 | '!' -path './webkit/browser/fileapi/test_mount_point_provider.*' \ |
917 | '!' -path './webkit/common/gpu/test_context_provider_factory.*' \ | |
4a275e0e ER |
918 | '!' -path './webkit/gpu/test_context_provider_factory.*' \ |
919 | '!' -path './webkit/support/test_webkit_platform_support.h' \ | |
920 | '!' -path './webkit/tools/test_shell/*.h' \ | |
063abe65 | 921 | -print -delete || : |
da3dfa9f ER |
922 | } |
923 | ||
99f39995 | 924 | strip_system_dirs \ |
31187203 | 925 | native_client/src/third_party_mod/jsoncpp \ |
99f39995 | 926 | third_party/bzip2 \ |
80b34a6e | 927 | third_party/ffmpeg \ |
31187203 | 928 | third_party/flac \ |
99f39995 | 929 | third_party/icu \ |
31187203 | 930 | third_party/jsoncpp \ |
42e551c9 | 931 | third_party/libXNVCtrl \ |
99f39995 | 932 | third_party/libevent \ |
07d26a0d | 933 | third_party/libexif \ |
99f39995 | 934 | third_party/libjpeg \ |
07d26a0d | 935 | third_party/libmtp \ |
99f39995 | 936 | third_party/libpng \ |
3ee15dec | 937 | third_party/libsrtp \ |
581aec44 | 938 | third_party/libusb \ |
4b411ffe | 939 | third_party/libvpx \ |
31187203 | 940 | third_party/libwebp \ |
99f39995 | 941 | third_party/libxslt \ |
25d4e23c | 942 | third_party/mesa \ |
07d26a0d | 943 | third_party/opus \ |
75a27c2e | 944 | third_party/protobuf \ |
80b34a6e | 945 | third_party/re2 \ |
7879021e | 946 | third_party/snappy \ |
ed514974 | 947 | third_party/speex \ |
5048b37a | 948 | third_party/sqlite \ |
e15125f5 | 949 | third_party/yasm \ |
517dd8ef | 950 | "third_party/zlib -o -path third_party/zlib/google/*" \ |
99f39995 | 951 | v8 \ |
e31bf7c6 | 952 | > REMOVED-system_dirs.txt |
7879021e ER |
953 | remove_nonessential_dirs > REMOVED-nonessential_dirs.txt |
954 | almost_strip_dirs > REMOVED-stripped.txt | |
955 | remove_bin_only > REMOVED-bin_only.txt | |
956 | remove_tests > REMOVED-tests.txt | |
00360a4d | 957 | |
bebfe676 ER |
958 | if [ "${sqlite:-1}" = 1 ]; then |
959 | # some code does not pass -DUSE_SYSTEM_SQLITE properly | |
960 | ln -sf /usr/include/sqlite3.h third_party/sqlite/sqlite3.h | |
961 | fi | |
962 | ||
e31bf7c6 | 963 | clean_third_party > REMOVED-third_party.txt |
fe547a32 | 964 | |
cd09b941 | 965 | if [ "${v8:-1}" != "0" ]; then |
fe547a32 ER |
966 | # The implementation files include v8 headers with full path, |
967 | # like #include "v8/include/v8.h". Make sure the system headers | |
968 | # will be used. | |
598df428 | 969 | rm -rf v8/include |
fe547a32 ER |
970 | ln -s /usr/include v8/include |
971 | fi | |
972 | ||
cd09b941 | 973 | if [ "${nacl:-1}" != "0" ]; then |
fe547a32 ER |
974 | # NOTE: here is always x86_64 |
975 | rm -rf native_client/toolchain/linux_x86_newlib | |
fe547a32 | 976 | fi |
18ffc809 | 977 | |
23e8b485 ER |
978 | if [ "${emptydirs:-0}" != "0" ]; then |
979 | # cleanup empty dirs | |
980 | find -type d '!' -name '.' -print0 | sort -zr | xargs -0 rmdir --ignore-fail-on-non-empty > REMOVED-dirs.txt | |
981 | fi | |
e31bf7c6 ER |
982 | |
983 | # report what's in them | |
984 | for a in REMOVED-*.txt; do | |
985 | cat $a | |
986 | done |