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