]> git.pld-linux.org Git - packages/chromium-browser.git/blame - clean-source.sh
use .gz source for beta branch, cleanup todo; update disk usage
[packages/chromium-browser.git] / clean-source.sh
CommitLineData
fe547a32 1#!/bin/sh
8f5f6775 2set -xe
fe547a32
ER
3
4# import options
cd09b941
ER
5# remove everything unless it's remove has been disabled with "0"
6# "v8=0" means "do not remove v8"
fe547a32
ER
7eval "$@"
8
05d9087c 9# Strip tarball from some big directories not needed on the linux platform
f888c710 10# https://code.google.com/p/chromium/wiki/LinuxPackaging
99f39995 11# initial list from src/tools/export_tarball/export_tarball.py
1dd58211 12# some scanned with find -name tests -o -name test -o -name test_data
55dddbd9
ER
13# and find -iname *test*
14# also removed non-linux files: find -name win -o -name mac -o name android
9304218b 15# find -type d -name 'android' -o -name 'chromeos' -o -name 'cros'
05d9087c
ER
16# suffix with _ those that we can't remove (just yet) because of the gclient
17# hooks (see build/all.gyp) or of some unneeded deps/includes
f888c710
ER
18remove_nonessential_dirs() {
19 local dir
20 for dir in \
18ffc809 21 android_webview \
9304218b
ER
22 ash/resources/default_100_percent/cros_ \
23 ash/resources/default_200_percent/cros_ \
24 ash/system/chromeos \
1dd58211 25 ash/test \
55dddbd9 26 base/android \
54623fc8 27 base/android/javatests/src/org/chromium/base/test \
9304218b 28 base/chromeos \
55dddbd9 29 base/mac_ \
54623fc8 30 base/test \
55dddbd9 31 base/win_ \
3333a973 32 breakpad/src/client/mac \
54623fc8
ER
33 breakpad/src/client/mac/tests \
34 breakpad/src/client/windows/tests \
9304218b 35 breakpad/src/common/android \
54623fc8
ER
36 breakpad/src/common/android/testing \
37 breakpad/src/common/linux/tests \
3333a973 38 breakpad/src/common/mac \
54623fc8 39 breakpad/src/common/tests \
3333a973 40 breakpad/src/tools/mac \
9304218b 41 build/android \
3333a973
ER
42 build/mac \
43 build/win \
55dddbd9
ER
44 chrome/android \
45 chrome/app/android \
9304218b
ER
46 chrome/app/resources/terms/chromeos \
47 chrome/app/theme/default_100_percent/cros_ \
3333a973
ER
48 chrome/app/theme/default_100_percent/mac \
49 chrome/app/theme/default_100_percent/win \
9304218b 50 chrome/app/theme/default_200_percent/cros_ \
3333a973
ER
51 chrome/app/theme/default_200_percent/mac \
52 chrome/app/theme/default_200_percent/win \
53 chrome/app/theme/touch_100_percent/win \
54 chrome/app/theme/touch_140_percent/win \
55 chrome/app/theme/touch_180_percent/win \
55dddbd9 56 chrome/browser/android \
54623fc8 57 chrome/browser/chromeos/bluetooth/test \
9304218b
ER
58 chrome/browser/chromeos/cros \
59 chrome/browser/chromeos_ \
18ffc809 60 chrome/browser/component/web_contents_delegate_android_ \
54623fc8 61 chrome/browser/component_updater/test \
55dddbd9 62 chrome/browser/history/android \
3333a973 63 chrome/browser/mac \
54623fc8 64 chrome/browser/printing/cloud_print/test \
18ffc809 65 chrome/browser/resources/about_welcome_android \
9304218b 66 chrome/browser/resources/chromeos_ \
54623fc8 67 chrome/browser/resources/gaia_auth/test \
18ffc809 68 chrome/browser/resources/ntp_android \
9304218b
ER
69 chrome/browser/resources/options/chromeos_ \
70 chrome/browser/resources/shared/css/chromeos \
71 chrome/browser/resources/shared/js/chromeos_ \
54623fc8
ER
72 chrome/browser/resources/tracing/tests \
73 chrome/browser/sync/test \
9304218b 74 chrome/browser/ui/android \
54623fc8 75 chrome/browser/ui/tests \
9304218b
ER
76 chrome/browser/ui/webui/chromeos \
77 chrome/browser/ui/webui/ntp/android \
78 chrome/browser/ui/webui/options/chromeos \
54623fc8 79 chrome/common/extensions/docs \
3333a973
ER
80 chrome/common/mac \
81 chrome/installer/mac \
82 chrome/installer/mac/third_party/xz/config/mac \
54623fc8 83 chrome/installer/test \
9304218b 84 chrome/test/chromeos \
05d9087c
ER
85 chrome/test/data/firefox2_nss_mac \
86 chrome/test/data/safe_browsing/old \
3333a973 87 chrome/test/logging/win \
9304218b 88 chrome/test/pyautolib/chromeos \
54623fc8 89 chrome/test/webdriver/test \
05d9087c 90 chrome/third_party/wtl/ \
9304218b 91 chrome/tools/build/chromeos \
3333a973
ER
92 chrome/tools/build/mac \
93 chrome/tools/build/win \
54623fc8
ER
94 chrome/tools/test \
95 chrome/tools/test/reference_build \
96 chrome_frame \
97 chrome_frame/test \
98 chrome_frame/tools/test \
9304218b 99 chromeos \
3333a973
ER
100 cloud_print/service/win \
101 cloud_print/virtual_driver/win \
55dddbd9
ER
102 content/app/android \
103 content/browser/android \
54623fc8 104 content/browser/worker_host/test \
55dddbd9
ER
105 content/common/android \
106 content/common/mac_ \
107 content/public/android \
108 content/public/browser/android \
54623fc8 109 content/public/test \
55dddbd9
ER
110 content/renderer/android \
111 content/shell/android \
3333a973 112 content/shell/mac \
54623fc8
ER
113 content/test \
114 content/test/data/layout_tests/LayoutTests/http/tests \
115 content/test/data/layout_tests/LayoutTests/http/tests/websocket/tests \
116 content/test/data/layout_tests/LayoutTests/platform/chromium-win/http/tests \
117 courgette/testdata \
118 data \
05d9087c
ER
119 gears \
120 google_update \
54623fc8 121 gpu/command_buffer/tests \
05d9087c 122 gpu/demos \
9304218b 123 media/audio/android \
3333a973
ER
124 media/audio/mac \
125 media/audio/win \
9304218b 126 media/base/android \
54623fc8
ER
127 media/test \
128 media/tools/layout_tests/test_data \
3333a973
ER
129 media/video/capture/mac \
130 media/video/capture/win \
9304218b 131 media/webm/chromeos \
3333a973 132 native_client/build/mac \
55dddbd9 133 native_client/src/include/win_ \
3333a973
ER
134 native_client/src/shared/imc/win \
135 native_client/src/shared/platform/win \
136 native_client/src/trusted/debug_stub/win \
137 native_client/src/trusted/desc/win \
138 native_client/src/trusted/nonnacl_util/win \
139 native_client/src/trusted/platform_qualify/win \
54623fc8 140 native_client/src/trusted/service_runtime/testdata \
55dddbd9 141 native_client/src/trusted/service_runtime/win_ \
54623fc8
ER
142 native_client/src/trusted/validator/x86/testing \
143 native_client/tests \
144 native_client/tools/tests \
18ffc809 145 native_client/tools/trusted_cross_toolchains \
54623fc8
ER
146 native_client_sdk \
147 native_client_sdk/src/build_tools/tests \
148 native_client_sdk/src/libraries/c_salt/test \
3333a973 149 native_client_sdk/src/libraries/win \
9304218b 150 net/android \
54623fc8 151 net/test \
05d9087c 152 o3d \
54623fc8
ER
153 o3d/documentation \
154 o3d/samples \
155 o3d/tests \
3333a973 156 ppapi/native_client/src/trusted/plugin/win \
54623fc8
ER
157 ppapi/native_client/tests \
158 ppapi/tests \
159 printing/test \
3333a973 160 remoting/host/installer/mac \
e15125f5 161 remoting/host/installer/win \
3333a973 162 remoting/host/mac \
e15125f5 163 remoting/host/setup/win \
3333a973
ER
164 remoting/host/win \
165 rlz/mac \
54623fc8 166 rlz/test \
3333a973 167 rlz/win \
54623fc8
ER
168 sandbox/linux/seccomp-legacy/tests \
169 sandbox/linux/tests \
170 sandbox/tests \
171 sandbox/win/tests \
55dddbd9 172 sandbox/win_ \
3333a973 173 sdch/mac \
54623fc8 174 seccompsandbox/tests \
3333a973 175 skia/config/win \
54623fc8
ER
176 sync/internal_api/public/test \
177 sync/internal_api/test \
178 sync/test \
9304218b 179 testing/android \
54623fc8
ER
180 testing/gmock/scripts/test \
181 testing/gmock/test \
182 testing/gtest/scripts/test \
183 testing/gtest/test \
184 third_party/WebKit/LayoutTests \
185 third_party/WebKit/Source/JavaScriptCore/API/tests \
186 third_party/WebKit/Source/JavaScriptCore/qt/tests \
187 third_party/WebKit/Source/JavaScriptCore/tests \
55dddbd9 188 third_party/WebKit/Source/Platform/chromium/public/android \
3333a973
ER
189 third_party/WebKit/Source/Platform/chromium/public/mac \
190 third_party/WebKit/Source/Platform/chromium/public/win \
54623fc8
ER
191 third_party/WebKit/Source/ThirdParty/gtest/scripts/test \
192 third_party/WebKit/Source/ThirdParty/gtest/test \
193 third_party/WebKit/Source/ThirdParty/gyp/test \
194 third_party/WebKit/Source/ThirdParty/qunit/test \
3333a973
ER
195 third_party/WebKit/Source/WTF/wtf/mac \
196 third_party/WebKit/Source/WTF/wtf/threads/win \
197 third_party/WebKit/Source/WTF/wtf/win \
198 third_party/WebKit/Source/WebCore/WebCore.gyp/mac \
199 third_party/WebKit/Source/WebCore/accessibility/mac \
200 third_party/WebKit/Source/WebCore/accessibility/win \
54623fc8 201 third_party/WebKit/Source/WebCore/bindings/scripts/test \
55dddbd9 202 third_party/WebKit/Source/WebCore/editing/android \
3333a973 203 third_party/WebKit/Source/WebCore/editing/mac \
55dddbd9 204 third_party/WebKit/Source/WebCore/history/android \
3333a973
ER
205 third_party/WebKit/Source/WebCore/history/mac \
206 third_party/WebKit/Source/WebCore/loader/mac \
207 third_party/WebKit/Source/WebCore/loader/win \
55dddbd9 208 third_party/WebKit/Source/WebCore/page/android \
3333a973
ER
209 third_party/WebKit/Source/WebCore/page/mac \
210 third_party/WebKit/Source/WebCore/page/scrolling/mac \
211 third_party/WebKit/Source/WebCore/page/win \
55dddbd9 212 third_party/WebKit/Source/WebCore/platform/android \
3333a973
ER
213 third_party/WebKit/Source/WebCore/platform/audio/mac \
214 third_party/WebKit/Source/WebCore/platform/cf/win \
215 third_party/WebKit/Source/WebCore/platform/graphics/ca/mac \
216 third_party/WebKit/Source/WebCore/platform/graphics/ca/win \
217 third_party/WebKit/Source/WebCore/platform/graphics/gpu/mac \
218 third_party/WebKit/Source/WebCore/platform/graphics/mac \
219 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/mac \
e15125f5 220 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/win \
3333a973
ER
221 third_party/WebKit/Source/WebCore/platform/graphics/win \
222 third_party/WebKit/Source/WebCore/platform/mac \
55dddbd9 223 third_party/WebKit/Source/WebCore/platform/network/android \
3333a973
ER
224 third_party/WebKit/Source/WebCore/platform/network/mac \
225 third_party/WebKit/Source/WebCore/platform/network/win \
55dddbd9 226 third_party/WebKit/Source/WebCore/platform/text/android \
3333a973
ER
227 third_party/WebKit/Source/WebCore/platform/text/mac \
228 third_party/WebKit/Source/WebCore/platform/text/win \
229 third_party/WebKit/Source/WebCore/platform/win \
230 third_party/WebKit/Source/WebCore/platform/wx/wxcode/mac \
231 third_party/WebKit/Source/WebCore/platform/wx/wxcode/win \
232 third_party/WebKit/Source/WebCore/plugins/mac \
233 third_party/WebKit/Source/WebCore/plugins/win \
54623fc8 234 third_party/WebKit/Source/WebCore/testing_ \
55dddbd9
ER
235 third_party/WebKit/Source/WebKit/chromium/public/android \
236 third_party/WebKit/Source/WebKit/chromium/public/mac_ \
237 third_party/WebKit/Source/WebKit/chromium/public/platform/android \
3333a973
ER
238 third_party/WebKit/Source/WebKit/chromium/public/platform/mac \
239 third_party/WebKit/Source/WebKit/chromium/public/platform/win \
240 third_party/WebKit/Source/WebKit/chromium/public/win \
55dddbd9 241 third_party/WebKit/Source/WebKit/chromium/src/android \
3333a973
ER
242 third_party/WebKit/Source/WebKit/chromium/src/mac \
243 third_party/WebKit/Source/WebKit/chromium/src/win \
54623fc8
ER
244 third_party/WebKit/Source/WebKit/chromium/tests \
245 third_party/WebKit/Source/WebKit/efl/tests \
246 third_party/WebKit/Source/WebKit/gtk/tests \
3333a973 247 third_party/WebKit/Source/WebKit/mac \
54623fc8 248 third_party/WebKit/Source/WebKit/qt/tests \
3333a973
ER
249 third_party/WebKit/Source/WebKit/win \
250 third_party/WebKit/Source/WebKit2/Platform/CoreIPC/mac \
251 third_party/WebKit/Source/WebKit2/Platform/CoreIPC/win \
252 third_party/WebKit/Source/WebKit2/Platform/mac \
253 third_party/WebKit/Source/WebKit2/Platform/win \
254 third_party/WebKit/Source/WebKit2/PluginProcess/mac \
255 third_party/WebKit/Source/WebKit2/Shared/API/c/mac \
256 third_party/WebKit/Source/WebKit2/Shared/API/c/win \
257 third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/mac \
258 third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/win \
259 third_party/WebKit/Source/WebKit2/Shared/Plugins/mac \
260 third_party/WebKit/Source/WebKit2/Shared/cg/win \
261 third_party/WebKit/Source/WebKit2/Shared/mac \
262 third_party/WebKit/Source/WebKit2/Shared/win \
263 third_party/WebKit/Source/WebKit2/UIProcess/API/C/mac \
264 third_party/WebKit/Source/WebKit2/UIProcess/API/C/win \
54623fc8
ER
265 third_party/WebKit/Source/WebKit2/UIProcess/API/efl/tests \
266 third_party/WebKit/Source/WebKit2/UIProcess/API/gtk/tests \
3333a973 267 third_party/WebKit/Source/WebKit2/UIProcess/API/mac \
54623fc8 268 third_party/WebKit/Source/WebKit2/UIProcess/API/qt/tests \
3333a973
ER
269 third_party/WebKit/Source/WebKit2/UIProcess/Launcher/mac \
270 third_party/WebKit/Source/WebKit2/UIProcess/Launcher/win \
271 third_party/WebKit/Source/WebKit2/UIProcess/Plugins/mac \
272 third_party/WebKit/Source/WebKit2/UIProcess/Plugins/win \
273 third_party/WebKit/Source/WebKit2/UIProcess/mac \
274 third_party/WebKit/Source/WebKit2/UIProcess/win \
275 third_party/WebKit/Source/WebKit2/WebProcess/Authentication/mac \
276 third_party/WebKit/Source/WebKit2/WebProcess/Cookies/mac \
277 third_party/WebKit/Source/WebKit2/WebProcess/Downloads/cf/win \
278 third_party/WebKit/Source/WebKit2/WebProcess/Downloads/mac \
279 third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/mac \
280 third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/win \
281 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/API/c/win \
282 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/mac \
283 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/win \
284 third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/mac \
285 third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/win \
286 third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/mac \
287 third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/win \
288 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/mac \
289 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/win \
290 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/mac \
291 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/win \
292 third_party/WebKit/Source/WebKit2/WebProcess/mac \
293 third_party/WebKit/Source/WebKit2/WebProcess/win \
294 third_party/WebKit/Source/WebKit2/mac \
295 third_party/WebKit/Source/WebKit2/win \
296 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac \
297 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/win \
298 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/mac \
299 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/win \
300 third_party/WebKit/Tools/DumpRenderTree/mac \
301 third_party/WebKit/Tools/DumpRenderTree/win \
54623fc8 302 third_party/WebKit/Tools/Scripts/webkitpy/test \
3333a973
ER
303 third_party/WebKit/Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac \
304 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit/win \
305 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/mac \
306 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/win \
307 third_party/WebKit/Tools/TestWebKitAPI/Tests/mac \
308 third_party/WebKit/Tools/TestWebKitAPI/mac \
309 third_party/WebKit/Tools/TestWebKitAPI/win \
54623fc8
ER
310 third_party/angle/samples/gles2_book \
311 third_party/angle/tests \
05d9087c
ER
312 third_party/boost \
313 third_party/bsdiff \
314 third_party/bspatch \
54623fc8 315 third_party/cacheinvalidation/files/src/google/cacheinvalidation/test \
55dddbd9 316 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android \
54623fc8 317 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing \
55dddbd9
ER
318 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing/android \
319 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android \
320 third_party/cld/encodings/compact_lang_det/win_ \
18ffc809 321 third_party/cros_system_api_ \
05d9087c 322 third_party/ffmpeg/binaries \
3333a973
ER
323 third_party/ffmpeg/chromium/binaries/Chromium/win \
324 third_party/ffmpeg/chromium/config/Chrome/mac \
e15125f5 325 third_party/ffmpeg/chromium/config/Chrome/win \
3333a973 326 third_party/ffmpeg/chromium/config/Chromium/mac \
e15125f5 327 third_party/ffmpeg/chromium/config/Chromium/win \
3333a973 328 third_party/ffmpeg/chromium/include/win \
54623fc8 329 third_party/ffmpeg/tests \
05d9087c 330 third_party/fuzzymatch \
8352ba82 331 third_party/gles2_book \
05d9087c
ER
332 third_party/gles_book_examples \
333 third_party/gold \
54623fc8 334 third_party/harfbuzz/tests \
05d9087c 335 third_party/hunspell/dictionaries \
54623fc8
ER
336 third_party/hunspell/tests \
337 third_party/hunspell_dictionaries \
338 third_party/hyphen/tests \
55dddbd9 339 third_party/icu/android \
05d9087c
ER
340 third_party/icu/mac \
341 third_party/lcov \
3333a973 342 third_party/leveldatabase/src/port/win \
54623fc8
ER
343 third_party/libexif/sources/test \
344 third_party/libjingle/source/talk/app/webrtc/test \
3333a973
ER
345 third_party/libjpeg_turbo/mac \
346 third_party/libjpeg_turbo/win \
54623fc8
ER
347 third_party/libphonenumber/src/resources/test \
348 third_party/libphonenumber/src/test \
349 third_party/libsrtp/srtp/crypto/test \
350 third_party/libsrtp/srtp/test \
55dddbd9 351 third_party/libva/va/android \
3333a973
ER
352 third_party/libvpx/source/config/mac \
353 third_party/libvpx/source/config/win \
354 third_party/libxml/mac \
54623fc8
ER
355 third_party/lighttpd \
356 third_party/mesa/MesaLib/src/gallium/tests \
357 third_party/mesa/MesaLib/src/gallium/tests/python/tests \
9304218b 358 third_party/mozc/chrome/chromeos_ \
05d9087c
ER
359 third_party/nspr \
360 third_party/nss \
361 third_party/ocmock \
55dddbd9 362 third_party/openssl/config/android \
54623fc8
ER
363 third_party/openssl/openssl/crypto/des/t/test \
364 third_party/openssl/openssl/test \
365 third_party/ots/test \
366 third_party/protobuf/src/google/protobuf/testing \
05d9087c
ER
367 third_party/pthread \
368 third_party/pyftpdlib \
54623fc8
ER
369 third_party/re2/re2/testing \
370 third_party/safe_browsing/testing \
05d9087c 371 third_party/scons \
54623fc8 372 third_party/sfntly/cpp/src/test \
05d9087c 373 third_party/simplejson \
55dddbd9 374 third_party/skia/include/utils/android \
3333a973
ER
375 third_party/skia/include/utils/mac \
376 third_party/skia/include/utils/win \
55dddbd9
ER
377 third_party/skia/include/views/android \
378 third_party/skia/src/gpu/gl/android \
3333a973
ER
379 third_party/skia/src/gpu/gl/mac \
380 third_party/skia/src/gpu/gl/win \
381 third_party/skia/src/utils/mac \
382 third_party/skia/src/utils/win \
383 third_party/skia/src/views/mac \
384 third_party/skia/src/views/win \
385 third_party/snappy/mac \
54623fc8
ER
386 third_party/sqlite/src/test \
387 third_party/sqlite/test \
388 third_party/talloc/libreplace/test \
389 third_party/tcmalloc/chromium/src/tests \
390 third_party/tcmalloc/vendor/src/tests \
05d9087c 391 third_party/tcmalloc_ \
54623fc8
ER
392 third_party/tlslite/test \
393 third_party/trace-viewer/test_data \
394 third_party/v8-i18n/tests \
395 third_party/vc_80 \
396 third_party/webdriver/pylib/test \
397 third_party/webdriver/test_data \
55dddbd9 398 third_party/webrtc/modules/audio_device/android \
3333a973
ER
399 third_party/webrtc/modules/audio_device/main/source/mac \
400 third_party/webrtc/modules/audio_device/main/source/win \
55dddbd9 401 third_party/webrtc/modules/audio_device/test/android \
e15125f5 402 third_party/webrtc/modules/audio_device/win \
55dddbd9
ER
403 third_party/webrtc/modules/audio_processing/test/android \
404 third_party/webrtc/modules/video_capture/main/source/android \
405 third_party/webrtc/modules/video_capture/main/test/android \
406 third_party/webrtc/modules/video_render/main/source/android \
3333a973 407 third_party/webrtc/modules/video_render/main/source/mac \
55dddbd9 408 third_party/webrtc/system_wrappers/source/android \
3333a973 409 third_party/webrtc/test/testsupport/mac \
55dddbd9
ER
410 third_party/webrtc/video_engine/test/android \
411 third_party/webrtc/video_engine/test/auto_test/android \
412 third_party/webrtc/voice_engine/test/android \
54623fc8 413 third_party/xdg-utils/tests \
55dddbd9 414 third_party/yasm/source/config/android \
3333a973
ER
415 third_party/yasm/source/config/mac \
416 third_party/yasm/source/config/win \
54623fc8
ER
417 third_party/yasm/source/patched-yasm/libyasm/tests \
418 third_party/yasm/source/patched-yasm/modules/arch/lc3b/tests \
419 third_party/yasm/source/patched-yasm/modules/arch/x86/tests \
420 third_party/yasm/source/patched-yasm/modules/dbgfmts/dwarf2/tests \
421 third_party/yasm/source/patched-yasm/modules/dbgfmts/stabs/tests \
422 third_party/yasm/source/patched-yasm/modules/objfmts/bin/tests \
423 third_party/yasm/source/patched-yasm/modules/objfmts/coff/tests \
424 third_party/yasm/source/patched-yasm/modules/objfmts/elf/tests \
425 third_party/yasm/source/patched-yasm/modules/objfmts/macho/tests \
426 third_party/yasm/source/patched-yasm/modules/objfmts/rdf/tests \
427 third_party/yasm/source/patched-yasm/modules/objfmts/win32/tests \
428 third_party/yasm/source/patched-yasm/modules/objfmts/win64/tests \
429 third_party/yasm/source/patched-yasm/modules/objfmts/xdf/tests \
430 third_party/yasm/source/patched-yasm/modules/parsers/gas/tests \
431 third_party/yasm/source/patched-yasm/modules/parsers/nasm/tests \
432 third_party/yasm/source/patched-yasm/modules/parsers/tasm/tests \
433 third_party/yasm/source/patched-yasm/modules/preprocs/nasm/tests \
434 third_party/yasm/source/patched-yasm/modules/preprocs/raw/tests \
435 third_party/yasm/source/patched-yasm/tools/python-yasm/tests \
9304218b 436 tools/android \
54623fc8
ER
437 tools/clang/plugins/tests \
438 tools/gyp/test \
3333a973 439 tools/mac \
54623fc8
ER
440 tools/page_cycler/webpagereplay/tests \
441 tools/perf_expectations/tests \
442 tools/site_compare \
05d9087c
ER
443 tools/stats_viewer \
444 tools/symsrc \
05d9087c 445 tools/valgrind \
3333a973 446 tools/win \
05d9087c 447 tools/wine_valgrind \
9304218b 448 ui/android \
54623fc8
ER
449 ui/app_list/test \
450 ui/aura/test \
e15125f5 451 ui/base/ime/win \
54623fc8 452 ui/base/test \
55dddbd9 453 ui/base/win_ \
54623fc8 454 ui/compositor/test \
9304218b 455 ui/gfx/android \
3333a973 456 ui/gfx/mac \
54623fc8 457 ui/gfx/test \
9304218b
ER
458 ui/resources/default_100_percent/cros_ \
459 ui/resources/default_200_percent/cros_ \
54623fc8
ER
460 ui/test \
461 ui/views/test \
3333a973 462 ui/views/win \
54623fc8 463 v8/test \
05d9087c 464 v8/test/cctest \
9304218b 465 webkit/chromeos \
05d9087c 466 webkit/data/layout_tests \
55dddbd9 467 webkit/media/android \
54623fc8
ER
468 webkit/plugins/npapi/test \
469 webkit/tools/test/reference_build \
3333a973 470 webkit/tools/test_shell/mac \
8352ba82 471 win8 \
f888c710
ER
472 ; do
473 rm -vfr "$dir"
474 done
475}
476
8352ba82
ER
477# There are directories we want to strip, but that are unnecessarily required by the build-system
478# So we drop everything but the gyp/gypi files
479almost_strip_dirs() {
480 local dir
481 for dir in \
bcc7de3a 482 breakpad \
8352ba82
ER
483 chrome/test/data \
484 courgette \
ec8fc8f6 485 testing \
18ffc809 486 third_party/cros_dbus_cplusplus \
8352ba82
ER
487 ; do
488 find $dir -depth -mindepth 1 \! \( -name '*.gyp' -o -name '*.gypi' \) -print -delete || :
489 done
bcc7de3a
ER
490
491 find tools -type f \
492 '!' -iname '*.gyp*' \
493 '!' -path 'tools/build/*' \
494 '!' -path 'tools/clang/scripts/plugin_flags.sh' \
495 '!' -path 'tools/generate_stubs/*' \
496 '!' -path 'tools/grit/*' \
497 '!' -path 'tools/gritsettings/*' \
498 '!' -path 'tools/gyp/*' \
499 '!' -path 'tools/json_comment_eater.py' \
500 '!' -path 'tools/json_schema_compiler/*' \
501 '!' -path 'tools/protoc_wrapper/*' \
502 '!' -path 'tools/uuidgen.py' \
503 '!' -path 'tools/zip2msi.py' \
504 -print -delete
505
ec8fc8f6
ER
506 # link headers from system dir. too many files to patch, we don't even build tests
507 install -d testing/gtest/include
508 ln -s /usr/include/gtest testing/gtest/include/gtest
8352ba82
ER
509}
510
e21194da
ER
511# clean third party
512# list based from archlinux PKGBUILD
513# https://aur.archlinux.org/packages/ch/chromium-dev/PKGBUILD
514clean_third_party() {
e21194da 515 find third_party -type f \! -iname '*.gyp*' \
15f29c79
ER
516 \! -path 'third_party/WebKit/*' \
517 \! -path 'third_party/adobe/flash/*' \
e21194da
ER
518 \! -path 'third_party/angle/*' \
519 \! -path 'third_party/cacheinvalidation/*' \
520 \! -path 'third_party/cld/*' \
15f29c79 521 \! -path 'third_party/cros_system_api/*' \
e21194da
ER
522 \! -path 'third_party/ffmpeg/*' \
523 \! -path 'third_party/flac/flac.h' \
524 \! -path 'third_party/flot/*' \
525 \! -path 'third_party/gpsd/*' \
e21194da 526 \! -path 'third_party/harfbuzz-ng/*' \
15f29c79 527 \! -path 'third_party/harfbuzz/*' \
e21194da
ER
528 \! -path 'third_party/hunspell/*' \
529 \! -path 'third_party/hyphen/*' \
530 \! -path 'third_party/iccjpeg/*' \
531 \! -path 'third_party/jsoncpp/*' \
532 \! -path 'third_party/khronos/*' \
533 \! -path 'third_party/leveldatabase/*' \
15f29c79 534 \! -path 'third_party/libXNVCtrl/*' \
e21194da
ER
535 \! -path 'third_party/libjingle/*' \
536 \! -path 'third_party/libphonenumber/*' \
e21194da
ER
537 \! -path 'third_party/libsrtp/*' \
538 \! -path 'third_party/libusb/libusb.h' \
539 \! -path 'third_party/libva/*' \
540 \! -path 'third_party/libvpx/libvpx.h' \
541 \! -path 'third_party/libxml/chromium/*' \
e21194da 542 \! -path 'third_party/libyuv/*' \
e21194da
ER
543 \! -path 'third_party/lss/*' \
544 \! -path 'third_party/mesa/*' \
545 \! -path 'third_party/modp_b64/*' \
546 \! -path 'third_party/mongoose/*' \
547 \! -path 'third_party/mt19937ar/*' \
548 \! -path 'third_party/npapi/*' \
549 \! -path 'third_party/openmax/*' \
15f29c79 550 \! -path 'third_party/opus/opus.h*' \
e21194da 551 \! -path 'third_party/ots/*' \
e21194da
ER
552 \! -path 'third_party/protobuf/*' \
553 \! -path 'third_party/pywebsocket/*' \
554 \! -path 'third_party/qcms/*' \
555 \! -path 'third_party/re2/*' \
556 \! -path 'third_party/scons-2.0.1/*' \
557 \! -path 'third_party/sfntly/*' \
558 \! -path 'third_party/skia/*' \
559 \! -path 'third_party/smhasher/*' \
560 \! -path 'third_party/speex/speex.h' \
561 \! -path 'third_party/sqlite/*' \
562 \! -path 'third_party/tcmalloc/*' \
563 \! -path 'third_party/tlslite/*' \
564 \! -path 'third_party/trace-viewer/*' \
565 \! -path 'third_party/undoview/*' \
e21194da
ER
566 \! -path 'third_party/v8-i18n/*' \
567 \! -path 'third_party/v8/*' \
568 \! -path 'third_party/webdriver/*' \
e21194da
ER
569 \! -path 'third_party/webrtc/*' \
570 \! -path 'third_party/widevine/*' \
e21194da
ER
571 -print -delete
572
e21194da
ER
573 rm -vf third_party/expat/files/lib/expat.h
574}
575
99f39995
ER
576# parts based on ubuntu debian/rules
577# http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-browser.head/view/head:/debian/rules
99f39995 578remove_bin_only() {
55dddbd9 579 find -type f \( \
99f39995
ER
580 -iname \*.exe -o \
581 -iname \*.dll -o \
582 -iname \*.pdb -o \
583 -name \*.o -o \
584 -name \*.a -o \
585 -name \*.dylib \
586 \) -exec rm -fv {} \;
587}
588
589# removes dir, if the bcond is not turned off
590strip_system_dirs() {
591 local dir lib bcond
592 for dir in "$@"; do
593 lib=${dir##*/}
594 bcond=$(eval echo \$$lib)
cd09b941 595 [ "${bcond:-1}" = 0 ] && continue
99f39995
ER
596
597 # skip already removed dirs
598 test -d $dir || continue
599
0e308272 600 find $dir -depth -mindepth 1 \! \( -name '*.gyp' -o -name '*.gypi' -o -path $dir/$lib.h \) -print -delete
99f39995
ER
601 done
602}
603
99f39995 604remove_nonessential_dirs | tee -a REMOVED-nonessential_dirs.txt
8352ba82 605almost_strip_dirs | tee -a REMOVED-stripped.txt
18ffc809 606remove_bin_only | tee -a REMOVED-bin_only.txt
99f39995
ER
607
608strip_system_dirs \
31187203 609 native_client/src/third_party_mod/jsoncpp \
99f39995 610 third_party/bzip2 \
31187203 611 third_party/flac \
99f39995 612 third_party/icu \
31187203 613 third_party/jsoncpp \
99f39995 614 third_party/libevent \
07d26a0d 615 third_party/libexif \
99f39995 616 third_party/libjpeg \
07d26a0d 617 third_party/libmtp \
99f39995 618 third_party/libpng \
3ee15dec 619 third_party/libsrtp \
581aec44 620 third_party/libusb \
4b411ffe 621 third_party/libvpx \
31187203 622 third_party/libwebp \
81699e86 623 third_party/libxml_ \
99f39995 624 third_party/libxslt \
07d26a0d 625 third_party/opus \
ed514974 626 third_party/speex \
e15125f5 627 third_party/yasm \
2a97b574 628 third_party/zlib \
99f39995 629 v8 \
e21194da 630| tee -a REMOVED-system_dirs.txt
00360a4d 631
e21194da 632clean_third_party | tee -a REMOVED-third_party.txt
fe547a32 633
cd09b941 634if [ "${v8:-1}" != "0" ]; then
fe547a32
ER
635 # The implementation files include v8 headers with full path,
636 # like #include "v8/include/v8.h". Make sure the system headers
637 # will be used.
598df428 638 rm -rf v8/include
fe547a32
ER
639 ln -s /usr/include v8/include
640fi
641
cd09b941 642if [ "${nacl:-1}" != "0" ]; then
fe547a32
ER
643 # NOTE: here is always x86_64
644 rm -rf native_client/toolchain/linux_x86_newlib
fe547a32 645fi
18ffc809
ER
646
647# cleanup empty dirs
648find -type d -print0 | sort -zr | xargs -0 rmdir -v 2>/dev/null | tee -a REMOVED-dirs.txt
This page took 0.145093 seconds and 4 git commands to generate.