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