]> git.pld-linux.org Git - packages/chromium-browser.git/blame_incremental - clean-source.sh
- pl
[packages/chromium-browser.git] / clean-source.sh
... / ...
CommitLineData
1#!/bin/sh
2set -xe
3
4export LC_ALL=C
5
6# import options
7# remove everything unless it's remove has been disabled with "0"
8# "v8=0" means "do not remove v8"
9eval "$@"
10
11# {{{ remove nonessential dirs
12# Strip tarball from some big directories not needed on the linux platform
13# https://code.google.com/p/chromium/wiki/LinuxPackaging
14# initial list from src/tools/export_tarball/export_tarball.py
15# also removed non-linux files: find -name win -o -name mac -o name android -o name windows
16# find -type d -name 'android' -o -name 'chromeos' -o -name 'cros'
17# find -type d -name *doc*
18# find -type d -name *example*
19# find -type d -name java
20# find -type d -name tools
21# find -type d -name samples
22# suffix with _ those that we can't remove (just yet) because of the gclient
23# hooks (see build/all.gyp) or of some unneeded deps/includes
24remove_nonessential_dirs() {
25 find -type f '(' \
26 -name 'Android.mk' -o \
27 -name '*.vcproj' -o \
28 -name '*.sln' -o \
29 -name '*.mm' -o \
30 -name '*.m' \
31 ')' '!' -type d '(' \
32 '!' -path './remoting/host/continue_window_mac.mm' \
33 '!' -path './remoting/host/disconnect_window_mac.mm' \
34 ')' \
35 -print -delete
36
37 find -regextype posix-extended \
38 -regex '.*_(win|cros|mac)_.*.xtb' \
39 -print -delete
40
41 local dir
42 for dir in \
43 v8/benchmarks \
44 v8/src/arm \
45 third_party/chromite \
46 android_webview \
47 ash/resources/default_100_percent/cros_ \
48 ash/resources/default_200_percent/cros_ \
49 ash/shell/cocoa \
50 ash/system/chromeos_ \
51 base/android \
52 base/chromeos_ \
53 base/ios \
54 breakpad/src/client/mac \
55 breakpad/src/common/android \
56 breakpad/src/common/mac \
57 breakpad/src/tools/mac \
58 build/mac \
59 build/win_ \
60 chrome/android \
61 chrome/app/android \
62 chrome/app/resources/terms/chromeos \
63 chrome/app/theme/default_100_percent/cros_ \
64 chrome/app/theme/default_100_percent/mac_ \
65 chrome/app/theme/default_100_percent/win_ \
66 chrome/app/theme/default_200_percent/cros_ \
67 chrome/app/theme/default_200_percent/mac \
68 chrome/app/theme/default_200_percent/win_ \
69 chrome/app/theme/touch_100_percent/win \
70 chrome/app/theme/touch_140_percent/win \
71 chrome/app/theme/touch_180_percent/win \
72 chrome/browser/android \
73 chrome/browser/chromeos/cros \
74 chrome/browser/extensions/docs \
75 chrome/browser/history/android \
76 chrome/browser/mac_ \
77 chrome/browser/resources/about_welcome_android \
78 chrome/browser/resources/chromeos_ \
79 chrome/browser/resources/ntp_android \
80 chrome/browser/resources/options/chromeos_ \
81 chrome/browser/resources/shared/css/chromeos \
82 chrome/browser/resources/shared/js/chromeos_ \
83 chrome/browser/ui/android_ \
84 chrome/browser/ui/cocoa \
85 chrome/browser/ui/webui/chromeos \
86 chrome/browser/ui/webui/ntp/android \
87 chrome/browser/ui/webui/options/chromeos \
88 chrome/common/extensions/docs \
89 chrome/common/mac_ \
90 chrome/installer/mac \
91 chrome/installer/mac/third_party/xz/config/mac \
92 chrome/installer/tools \
93 chrome/third_party/jstemplate/tutorial_examples \
94 third_party/jstemplate/tutorial_examples \
95 chrome/third_party/mock4js/examples \
96 chrome/third_party/wtl/ \
97 chrome/tools/build/chromeos \
98 chrome/tools/build/mac \
99 chrome/tools/build/win \
100 chrome_frame \
101 cloud_print/virtual_driver/win \
102 content/app/android \
103 content/browser/android \
104 content/common/android \
105 content/components/navigation_interception/java \
106 content/components/web_contents_delegate_android/java \
107 content/public/android \
108 content/public/browser/android \
109 content/renderer/android \
110 content/shell/android \
111 content/shell/mac \
112 data \
113 gears \
114 google_update \
115 gpu/command_buffer/docs \
116 gpu/demos \
117 media/audio/android \
118 media/audio/ios \
119 media/audio/mac \
120 media/audio/win \
121 media/tools \
122 media/video/capture/mac \
123 media/video/capture/win \
124 media/webm/chromeos \
125 mesa/MesaLib/src/mesa/drivers/windows \
126 native_client/build/mac \
127 native_client/documentation \
128 native_client/src/shared/imc/win \
129 native_client/src/shared/platform/win \
130 native_client/src/tools \
131 native_client/src/trusted/debug_stub/win \
132 native_client/src/trusted/desc/win \
133 native_client/src/trusted/nonnacl_util/win \
134 native_client/src/trusted/platform_qualify/win \
135 native_client/toolchain \
136 native_client/tools \
137 native_client/tools/trusted_cross_toolchains \
138 native_client_sdk \
139 native_client_sdk/src/libraries/win \
140 net/android \
141 net/tools/testserver \
142 npapi/npspy/windows \
143 o3d \
144 o3d/documentation \
145 o3d/samples \
146 ppapi/c/documentation \
147 ppapi/cpp/documentation \
148 ppapi/native_client/src/tools \
149 ppapi/native_client/src/trusted/plugin/win \
150 ppapi/native_client/tools \
151 remoting/host/installer/mac_ \
152 remoting/host/installer/win \
153 remoting/host/mac_ \
154 remoting/host/setup/win \
155 remoting/host/win_ \
156 rlz/examples \
157 rlz/mac \
158 rlz/win \
159 sandbox/win/tools \
160 sdch/ios \
161 sdch/mac \
162 skia/config/win \
163 sync/tools_ \
164 tcmalloc/chromium/src/windows \
165 tcmalloc/vendor/src/windows \
166 third_party/WebKit/Source/JavaScriptCore/docs \
167 third_party/WebKit/Source/JavaScriptCore/tools \
168 third_party/WebKit/Source/Platform/chromium/public/android \
169 third_party/WebKit/Source/Platform/chromium/public/mac \
170 third_party/WebKit/Source/Platform/chromium/public/win \
171 third_party/WebKit/Source/ThirdParty/gtest/samples \
172 third_party/WebKit/Source/ThirdParty/gyp/samples \
173 third_party/WebKit/Source/ThirdParty/gyp/samples/samples \
174 third_party/WebKit/Source/ThirdParty/gyp/tools \
175 third_party/WebKit/Source/WTF/wtf/mac \
176 third_party/WebKit/Source/WTF/wtf/qt \
177 third_party/WebKit/Source/WTF/wtf/threads/win \
178 third_party/WebKit/Source/WTF/wtf/win \
179 third_party/WebKit/Source/WebCore/WebCore.gyp/mac \
180 third_party/WebKit/Source/WebCore/accessibility/mac \
181 third_party/WebKit/Source/WebCore/accessibility/qt \
182 third_party/WebKit/Source/WebCore/accessibility/win \
183 third_party/WebKit/Source/WebCore/bridge/qt \
184 third_party/WebKit/Source/WebCore/editing/android \
185 third_party/WebKit/Source/WebCore/editing/mac \
186 third_party/WebKit/Source/WebCore/editing/qt \
187 third_party/WebKit/Source/WebCore/history/android \
188 third_party/WebKit/Source/WebCore/history/mac \
189 third_party/WebKit/Source/WebCore/history/qt \
190 third_party/WebKit/Source/WebCore/loader/mac \
191 third_party/WebKit/Source/WebCore/loader/win \
192 third_party/WebKit/Source/WebCore/page/android \
193 third_party/WebKit/Source/WebCore/page/mac \
194 third_party/WebKit/Source/WebCore/page/qt \
195 third_party/WebKit/Source/WebCore/page/scrolling/mac \
196 third_party/WebKit/Source/WebCore/page/win \
197 third_party/WebKit/Source/WebCore/platform/android \
198 third_party/WebKit/Source/WebCore/platform/audio/mac \
199 third_party/WebKit/Source/WebCore/platform/audio/qt \
200 third_party/WebKit/Source/WebCore/platform/cf/win \
201 third_party/WebKit/Source/WebCore/platform/cocoa \
202 third_party/WebKit/Source/WebCore/platform/graphics/ca/mac \
203 third_party/WebKit/Source/WebCore/platform/graphics/ca/win \
204 third_party/WebKit/Source/WebCore/platform/graphics/cocoa \
205 third_party/WebKit/Source/WebCore/platform/graphics/gpu/mac \
206 third_party/WebKit/Source/WebCore/platform/graphics/gpu/qt \
207 third_party/WebKit/Source/WebCore/platform/graphics/mac \
208 third_party/WebKit/Source/WebCore/platform/graphics/qt \
209 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/mac \
210 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/qt \
211 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/win \
212 third_party/WebKit/Source/WebCore/platform/graphics/win \
213 third_party/WebKit/Source/WebCore/platform/ios \
214 third_party/WebKit/Source/WebCore/platform/mac \
215 third_party/WebKit/Source/WebCore/platform/network/android \
216 third_party/WebKit/Source/WebCore/platform/network/mac \
217 third_party/WebKit/Source/WebCore/platform/network/qt \
218 third_party/WebKit/Source/WebCore/platform/network/win \
219 third_party/WebKit/Source/WebCore/platform/qt \
220 third_party/WebKit/Source/WebCore/platform/text/android \
221 third_party/WebKit/Source/WebCore/platform/text/mac \
222 third_party/WebKit/Source/WebCore/platform/text/qt \
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/qt \
229 third_party/WebKit/Source/WebCore/plugins/win \
230 third_party/WebKit/Source/WebKit/chromium/public/android \
231 third_party/WebKit/Source/WebKit/chromium/public/platform/android \
232 third_party/WebKit/Source/WebKit/chromium/public/platform/mac \
233 third_party/WebKit/Source/WebKit/chromium/public/platform/win \
234 third_party/WebKit/Source/WebKit/chromium/public/win \
235 third_party/WebKit/Source/WebKit/chromium/src/android \
236 third_party/WebKit/Source/WebKit/chromium/src/mac \
237 third_party/WebKit/Source/WebKit/chromium/src/win \
238 third_party/WebKit/Source/WebKit/gtk/docs \
239 third_party/WebKit/Source/WebKit/mac \
240 third_party/WebKit/Source/WebKit/qt \
241 third_party/WebKit/Source/WebKit/qt/docs \
242 third_party/WebKit/Source/WebKit/qt/examples \
243 third_party/WebKit/Source/WebKit/win \
244 third_party/WebKit/Source/WebKit/wx/bindings/python/samples \
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 \
260 third_party/WebKit/Source/WebKit2/UIProcess/API/mac \
261 third_party/WebKit/Source/WebKit2/UIProcess/Launcher/mac \
262 third_party/WebKit/Source/WebKit2/UIProcess/Launcher/win \
263 third_party/WebKit/Source/WebKit2/UIProcess/Plugins/mac \
264 third_party/WebKit/Source/WebKit2/UIProcess/Plugins/win \
265 third_party/WebKit/Source/WebKit2/UIProcess/mac \
266 third_party/WebKit/Source/WebKit2/UIProcess/win \
267 third_party/WebKit/Source/WebKit2/WebProcess/Authentication/mac \
268 third_party/WebKit/Source/WebKit2/WebProcess/Cookies/mac \
269 third_party/WebKit/Source/WebKit2/WebProcess/Downloads/cf/win \
270 third_party/WebKit/Source/WebKit2/WebProcess/Downloads/mac \
271 third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/mac \
272 third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/win \
273 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/API/c/win \
274 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/mac \
275 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/win \
276 third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/mac \
277 third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/win \
278 third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/mac \
279 third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/win \
280 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/mac \
281 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/win \
282 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/mac \
283 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/win \
284 third_party/WebKit/Source/WebKit2/WebProcess/mac \
285 third_party/WebKit/Source/WebKit2/WebProcess/win \
286 third_party/WebKit/Source/WebKit2/mac \
287 third_party/WebKit/Source/WebKit2/win \
288 third_party/WebKit/Tools/DumpRenderTree/mac \
289 third_party/WebKit/Tools/DumpRenderTree/qt \
290 third_party/WebKit/Tools/DumpRenderTree/win \
291 third_party/angle_dx11/extensions \
292 third_party/angle_dx11/samples \
293 third_party/angle_dx11/samples/gles2_book \
294 third_party/boost \
295 third_party/bsdiff \
296 third_party/bspatch \
297 third_party/cacheinvalidation/src/example-app-build \
298 third_party/cacheinvalidation/src/java \
299 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android \
300 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android \
301 third_party/ffmpeg/binaries \
302 third_party/ffmpeg/chromium/binaries/Chromium/win \
303 third_party/ffmpeg/chromium/config/Chrome/linux/arm \
304 third_party/ffmpeg/chromium/config/Chrome/mac \
305 third_party/ffmpeg/chromium/config/Chrome/win \
306 third_party/ffmpeg/chromium/config/ChromeOS/linux/arm \
307 third_party/ffmpeg/chromium/config/Chromium/linux/arm \
308 third_party/ffmpeg/chromium/config/Chromium/mac \
309 third_party/ffmpeg/chromium/config/Chromium/win \
310 third_party/ffmpeg/chromium/config/ChromiumOS/linux/arm \
311 third_party/ffmpeg/chromium/include/win \
312 third_party/ffmpeg/doc_ \
313 third_party/ffmpeg/libavcodec/alpha \
314 third_party/ffmpeg/libavcodec/arm \
315 third_party/ffmpeg/libavcodec/avr32 \
316 third_party/ffmpeg/libavcodec/bfin \
317 third_party/ffmpeg/libavcodec/mips_ \
318 third_party/ffmpeg/libavcodec/ppc \
319 third_party/ffmpeg/libavcodec/sh4 \
320 third_party/ffmpeg/libavcodec/sparc \
321 third_party/ffmpeg/libavresample/arm \
322 third_party/ffmpeg/libavutil/avr32 \
323 third_party/ffmpeg/libavutil/bfin \
324 third_party/ffmpeg/libavutil/mips_ \
325 third_party/ffmpeg/libavutil/ppc \
326 third_party/ffmpeg/libavutil/sh4 \
327 third_party/ffmpeg/libswresample/arm \
328 third_party/ffmpeg/libswscale/bfin \
329 third_party/ffmpeg/libswscale/ppc \
330 third_party/ffmpeg/libswscale/sparc \
331 third_party/ffmpeg/tools \
332 third_party/fuzzymatch \
333 third_party/gles2_book \
334 third_party/gles_book_examples \
335 third_party/gold \
336 third_party/hunspell/dictionaries \
337 third_party/hunspell_dictionaries \
338 third_party/hyphen/doc \
339 third_party/icu/android \
340 third_party/icu/mac \
341 third_party/lcov \
342 third_party/leveldatabase/src/doc \
343 third_party/leveldatabase/src/port/win \
344 third_party/libjingle/source/talk/examples \
345 third_party/libjpeg_turbo/mac \
346 third_party/libjpeg_turbo/win \
347 third_party/libva/va/android \
348 third_party/libvpx/source/config/mac \
349 third_party/libvpx/source/config/win \
350 third_party/libxml/mac \
351 third_party/lighttpd \
352 third_party/mesa/MesaLib/docs \
353 third_party/mesa/MesaLib/src/gallium/docs \
354 third_party/npapi/npspy/extern/java \
355 third_party/nspr \
356 third_party/nss \
357 third_party/ocmock \
358 third_party/openssl \
359 third_party/openssl/config/android \
360 third_party/ots/tools \
361 third_party/pthread \
362 third_party/pyftpdlib \
363 third_party/re2/doc \
364 third_party/scons \
365 third_party/sfntly/cpp/src/sfntly/tools \
366 third_party/simplejson \
367 third_party/skia/include/utils/android \
368 third_party/skia/include/utils/ios \
369 third_party/skia/include/utils/mac \
370 third_party/skia/include/utils/win \
371 third_party/skia/include/views/android \
372 third_party/skia/src/gpu/gl/android \
373 third_party/skia/src/gpu/gl/mac \
374 third_party/skia/src/gpu/gl/win \
375 third_party/skia/src/utils/ios \
376 third_party/skia/src/utils/mac \
377 third_party/skia/src/utils/win \
378 third_party/skia/src/views/ios \
379 third_party/skia/src/views/mac \
380 third_party/skia/src/views/win \
381 third_party/snappy/mac \
382 third_party/sqlite/src/doc \
383 third_party/tcmalloc/vendor/doc \
384 third_party/trace-viewer/examples \
385 third_party/trace-viewer/third_party/pywebsocket/src/example \
386 third_party/vc_80 \
387 third_party/webdriver/pylib/docs \
388 third_party/webrtc/modules/audio_device/android \
389 third_party/webrtc/modules/audio_device/ios \
390 third_party/webrtc/modules/audio_device/main/source/mac \
391 third_party/webrtc/modules/audio_device/main/source/win \
392 third_party/webrtc/modules/audio_device/win \
393 third_party/webrtc/modules/video_capture/android/java \
394 third_party/webrtc/modules/video_capture/main/source/android \
395 third_party/webrtc/modules/video_render/android/java \
396 third_party/webrtc/modules/video_render/main/source/android \
397 third_party/webrtc/modules/video_render/main/source/mac \
398 third_party/webrtc/system_wrappers/source/android \
399 third_party/yasm/source/config/android \
400 third_party/yasm/source/config/mac \
401 third_party/yasm/source/config/win \
402 tools/android \
403 tools/gyp/samples \
404 tools/gyp/samples/samples \
405 tools/gyp/tools \
406 tools/mac \
407 tools/site_compare \
408 tools/stats_viewer \
409 tools/symsrc \
410 tools/valgrind \
411 tools/win \
412 tools/wine_valgrind \
413 ui/android \
414 ui/base/cocoa \
415 ui/base/ime/win \
416 ui/gfx/android \
417 ui/gfx/mac \
418 ui/resources/default_100_percent/cros_ \
419 ui/resources/default_200_percent/cros_ \
420 ui/views/examples_ \
421 ui/views/win \
422 v8/samples \
423 webkit/chromeos \
424 webkit/media/android \
425 webrtc/modules/video_capture/windows \
426 webrtc/modules/video_render/windows \
427 win8 \
428 ; do
429 rm -vfr "$dir"
430 done
431
432 find $(ls -d \
433 base/mac \
434 base/win \
435 build/android \
436 chrome/browser/chromeos_ \
437 v8/src/d8* \
438 chrome/browser/component/web_contents_delegate_android \
439 chrome/tools \
440 chromeos_ \
441 cloud_print/service/win \
442 content/browser/renderer_host/java \
443 content/common/mac \
444 content/renderer/java \
445 gpu/tools \
446 media/base/android_ \
447 native_client/src/include/win \
448 native_client/src/trusted/service_runtime/win \
449 net/tools \
450 remoting/tools \
451 sandbox/win \
452 third_party/WebKit/Source/WebKit/chromium/public/mac \
453 third_party/WebKit/Tools \
454 third_party/cld/encodings/compact_lang_det/win \
455 third_party/cros_system_api \
456 third_party/mozc/chrome/chromeos \
457 third_party/sfntly/cpp/src/sample \
458 third_party/tcmalloc \
459 third_party/v8-i18n/tools \
460 third_party/webrtc/modules/video_coding/codecs/tools \
461 third_party/webrtc/tools \
462 ui/base/win \
463 v8/tools_ \
464 webkit/tools \
465 ) '!' -type d '(' \
466 '!' -name '*.grd' \
467 '!' -name '*.gyp*' \
468 '!' -name '*.isolate' \
469 '!' -path 'base/mac/bundle_locations.h' \
470 '!' -path 'base/mac/crash_logging.h' \
471 '!' -path 'base/win/windows_version.h' \
472 '!' -path 'chrome/browser/chromeos/attestation/platform_verification_flow.h' \
473 '!' -path 'chrome/browser/chromeos/contacts/contact.proto' \
474 '!' -path 'chrome/browser/chromeos/extensions/*.h' \
475 '!' -path 'chrome/browser/chromeos/extensions/echo_private_api.h' \
476 '!' -path 'chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api.h' \
477 '!' -path 'chrome/browser/chromeos/extensions/file_manager/file_browser_private_api_functions.h' \
478 '!' -path 'chrome/browser/chromeos/extensions/info_private_api.h' \
479 '!' -path 'chrome/browser/chromeos/extensions/media_player_api.h' \
480 '!' -path 'chrome/browser/chromeos/extensions/networking_private_api.h' \
481 '!' -path 'chrome/browser/chromeos/extensions/wallpaper_api.h' \
482 '!' -path 'chrome/browser/chromeos/extensions/wallpaper_private_api.h' \
483 '!' -path 'chrome/browser/chromeos/settings/cros_settings.h' \
484 '!' -path 'chrome/browser/chromeos/settings/cros_settings_names.h' \
485 '!' -path 'chrome/browser/chromeos/settings/cros_settings_provider.h' \
486 '!' -path 'chrome/browser/chromeos/settings/device_settings_service.h' \
487 '!' -path 'chrome/browser/chromeos/system_logs/*.h' \
488 '!' -path 'chrome/tools/build/generate_policy_source.py' \
489 '!' -path 'chrome/tools/build/linux/sed.py' \
490 '!' -path 'chrome/tools/build/make_version_cc.py' \
491 '!' -path 'chrome/tools/build/repack_locales.py' \
492 '!' -path 'chrome/tools/build/version.py' \
493 '!' -path 'chromeos/chromeos_constants.h' \
494 '!' -path 'chromeos/chromeos_export.h' \
495 '!' -path 'chromeos/chromeos_switches.h' \
496 '!' -path 'chromeos/dbus/dbus_client_implementation_type.h' \
497 '!' -path 'chromeos/dbus/dbus_method_call_status.h' \
498 '!' -path 'chromeos/dbus/session_manager_client.h' \
499 '!' -path 'chromeos/network/network_state_handler_observer.h' \
500 '!' -path 'chromeos/network/onc/onc_constants.h' \
501 '!' -path 'content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h' \
502 '!' -path 'content/common/mac/attributed_string_coder.h' \
503 '!' -path 'content/common/mac/font_descriptor.h' \
504 '!' -path 'content/renderer/java/java_bridge_dispatcher.h' \
505 '!' -path 'media/base/android/demuxer_android.h' \
506 '!' -path 'native_client/src/include/win/mman.h' \
507 '!' -path 'native_client/src/trusted/service_runtime/win/debug_exception_handler.h' \
508 '!' -path 'native_client/src/trusted/service_runtime/win/exception_patch/ntdll_patch.h' \
509 '!' -path 'net/tools/dafsa/*' \
510 '!' -path 'net/tools/tld_cleanup/*' \
511 '!' -path 'remoting/tools/build/*' \
512 '!' -path 'remoting/tools/verify_resources.py' \
513 '!' -path 'sandbox/win/src/sandbox_types.h' \
514 '!' -path 'third_party/WebKit/Source/WebKit/chromium/public/mac/WebSubstringUtil.h' \
515 '!' -path 'third_party/cld/encodings/compact_lang_det/win/cld_*.cc' \
516 '!' -path 'third_party/cld/encodings/compact_lang_det/win/cld_*.h' \
517 '!' -path 'third_party/cros_system_api/dbus/*.proto' \
518 '!' -path 'third_party/cros_system_api/dbus/*/dbus-constants.h' \
519 '!' -path 'third_party/cros_system_api/dbus/service_constants.h' \
520 '!' -path 'third_party/sfntly/cpp/src/sample/chromium/*' \
521 '!' -path 'third_party/tcmalloc/chromium/*' \
522 '!' -path 'third_party/v8-i18n/tools/js2c.py' \
523 '!' -path 'third_party/webrtc/tools/tools_unittests.isolate' \
524 '!' -path 'ui/base/win/dpi.h' \
525 '!' -path 'ui/webui/resources/js/webui_resource_test.js' \
526 '!' -path 'v8/tools/js2c.py' \
527 '!' -path 'v8/tools/jsmin.py' \
528 '!' -path 'webkit/tools/test_shell/*.h' \
529 ')' \
530 -print -delete
531}
532# }}}
533# {{{ almost_strip_dirs
534# There are directories we want to strip, but that are unnecessarily required by the build-system
535# So we drop everything but the gyp/gypi files
536almost_strip_dirs() {
537 local dir
538 for dir in \
539 breakpad_ \
540 build/ios \
541 courgette_ \
542 third_party/cros_dbus_cplusplus \
543 ; do
544 find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' ')' -print -delete || :
545 done
546
547 find tools -type f \
548 '!' -iname '*.gyp*' \
549 '!' -path 'tools/build/*' \
550 '!' -path 'tools/battor_agent/*' \
551 '!' -path 'tools/clang/scripts/plugin_flags.sh' \
552 '!' -path 'tools/compile_test/compile_test.py' \
553 '!' -path 'tools/generate_library_loader/*' \
554 '!' -path 'tools/generate_shim_headers/generate_shim_headers.py' \
555 '!' -path 'tools/generate_stubs/*' \
556 '!' -path 'tools/grit/*' \
557 '!' -path 'tools/gritsettings/*' \
558 '!' -path 'tools/gyp/*' \
559 '!' -path 'tools/idl_parser/*' \
560 '!' -path 'tools/json_comment_eater/json_comment_eater.py' \
561 '!' -path 'tools/json_schema_compiler/*' \
562 '!' -path 'tools/json_to_struct/*' \
563 '!' -path 'tools/licenses.py' \
564 '!' -path 'tools/protoc_wrapper/*' \
565 '!' -path 'tools/usb_ids/*' \
566 '!' -path 'tools/uuidgen.py' \
567 '!' -path 'tools/variations/*' \
568 '!' -path 'tools/zip2msi.py' \
569 -print -delete
570}
571# }}}
572# {{{ clean third party
573# list based from archlinux PKGBUILD
574# https://aur.archlinux.org/packages/ch/chromium-dev/PKGBUILD
575clean_third_party() {
576
577 # NOTE: don't forget to sync remove_bundled_libraries() {
578
579 local dir
580 for dir in \
581 third_party/ashmem \
582 third_party/eyesfree \
583 third_party/guava \
584 third_party/iaccessible2 \
585 third_party/icon_family \
586 third_party/isimpledom \
587 third_party/jsr-305 \
588 third_party/mach_override \
589 third_party/npapi/npspy \
590 third_party/re2/benchlog \
591 third_party/sqlite/*.patch \
592 third_party/sqlite/src/*.patch \
593 third_party/sudden_motion_sensor \
594 ; do
595 rm -vfr "$dir"
596 done
597
598 find third_party -type f \
599 '!' -iname '*.gyp*' \
600 '!' -iname '*.isolate' \
601 '!' -path 'third_party/WebKit/*' \
602 '!' -path 'third_party/adobe/flash/*' \
603 '!' -path 'third_party/analytics/*' \
604 '!' -path 'third_party/angle/enumerate_files.py' \
605 '!' -path 'third_party/angle/include/*.h' \
606 '!' -path 'third_party/angle/include/EGL/*' \
607 '!' -path 'third_party/angle/include/GLSLANG/*' \
608 '!' -path 'third_party/angle/src/*' \
609 '!' -path 'third_party/angle/src/common/*' \
610 '!' -path 'third_party/angle/src/compiler/*' \
611 '!' -path 'third_party/angle/src/enumerate_files.py' \
612 '!' -path 'third_party/angle/src/third_party/compiler/*' \
613 '!' -path 'third_party/angle/src/third_party/murmurhash/*' \
614 '!' -path 'third_party/angle/src/third_party/trace_event/*' \
615 '!' -path 'third_party/boringssl/*' \
616 '!' -path 'third_party/brotli/*' \
617 '!' -path 'third_party/cacheinvalidation/*' \
618 '!' -path 'third_party/catapult/*' \
619 '!' -path 'third_party/cld/*' \
620 '!' -path 'third_party/cld_2/*' \
621 '!' -path 'third_party/cros_system_api/*' \
622 '!' -path 'third_party/cython/python_flags.py' \
623 '!' -path 'third_party/devscripts/*' \
624 '!' -path 'third_party/dom_distiller_js/*' \
625 '!' -path 'third_party/ffmpeg/*' \
626 '!' -path 'third_party/fips181/*' \
627 '!' -path 'third_party/flot/*.js' \
628 '!' -path 'third_party/google_input_tools/*' \
629 '!' -path 'third_party/hunspell/*' \
630 '!' -path 'third_party/hunspell_new/*' \
631 '!' -path 'third_party/hyphen/*' \
632 '!' -path 'third_party/iccjpeg/*' \
633 '!' -path 'third_party/icu/*' \
634 '!' -path 'third_party/icu/icu.isolate' \
635 '!' -path 'third_party/jinja2/*' \
636 '!' -path 'third_party/jstemplate/*' \
637 '!' -path 'third_party/khronos/*' \
638 '!' -path 'third_party/leveldatabase/*' \
639 '!' -path 'third_party/libXNVCtrl/*' \
640 '!' -path 'third_party/libaddressinput/*' \
641 '!' -path 'third_party/libjingle/*' \
642 '!' -path 'third_party/libphonenumber/*' \
643 '!' -path 'third_party/libsecret/*' \
644 '!' -path 'third_party/libsrtp/*' \
645 '!' -path 'third_party/libusb/*' \
646 '!' -path 'third_party/libva/*' \
647 '!' -path 'third_party/libvpx_new/*' \
648 '!' -path 'third_party/libwebm/*' \
649 '!' -path 'third_party/libwebp/*' \
650 '!' -path 'third_party/libxml/chromium/*' \
651 '!' -path 'third_party/libyuv/*' \
652 '!' -path 'third_party/lss/*.h' \
653 '!' -path 'third_party/lzma_sdk/*' \
654 '!' -path 'third_party/markupsafe/*' \
655 '!' -path 'third_party/mesa/src/include/GL/gl.h' \
656 '!' -path 'third_party/mesa/src/include/GL/glext.h' \
657 '!' -path 'third_party/mesa/src/include/GL/glx.h' \
658 '!' -path 'third_party/mesa/src/include/GL/glxext.h' \
659 '!' -path 'third_party/mesa/src/include/GL/osmesa.h' \
660 '!' -path 'third_party/modp_b64/*' \
661 '!' -path 'third_party/mojo/*' \
662 '!' -path 'third_party/mt19937ar/*' \
663 '!' -path 'third_party/npapi/*' \
664 '!' -path 'third_party/openh264/*' \
665 '!' -path 'third_party/openmax_dl/*' \
666 '!' -path 'third_party/ots/*' \
667 '!' -path 'third_party/pdfium/*' \
668 '!' -path 'third_party/ply/*' \
669 '!' -path 'third_party/polymer/*' \
670 '!' -path 'third_party/polymer_legacy/*' \
671 '!' -path 'third_party/protobuf/*' \
672 '!' -path 'third_party/qcms/*' \
673 '!' -path 'third_party/re2/*' \
674 '!' -path 'third_party/readability/*' \
675 '!' -path 'third_party/sfntly/*' \
676 '!' -path 'third_party/skia/*' \
677 '!' -path 'third_party/smhasher/*' \
678 '!' -path 'third_party/snappy/*' \
679 '!' -path 'third_party/sqlite/amalgamation/*' \
680 '!' -path 'third_party/sqlite/sqlite3.h' \
681 '!' -path 'third_party/sqlite/src/ext/*' \
682 '!' -path 'third_party/tcmalloc/*' \
683 '!' -path 'third_party/usrsctp/*' \
684 '!' -path 'third_party/v8-i18n/*' \
685 '!' -path 'third_party/v8/*' \
686 '!' -path 'third_party/web-animations-js/*' \
687 '!' -path 'third_party/webrtc/*' \
688 '!' -path 'third_party/webrtc_overrides/*' \
689 '!' -path 'third_party/widevine/*' \
690 '!' -path 'third_party/woff2/*' \
691 '!' -path 'third_party/x86inc/*' \
692 '!' -path 'third_party/zlib/google/*' \
693 '!' -path 'third_party/zlib/zlib.h' \
694 \
695 '!' -path 'third_party/jinja2/*' \
696 '!' -path 'third_party/libvpx/*' \
697 '!' -path 'third_party/markupsafe/*' \
698 '!' -path 'third_party/opus/*' \
699 '!' -path 'third_party/libudev/*' \
700 -print -delete
701
702 rm -vf third_party/expat/files/lib/expat.h
703}
704# }}}
705# {{{ remove_bin_only
706# parts based on ubuntu debian/rules
707# http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-browser.head/view/head:/debian/rules
708remove_bin_only() {
709 # preserve: ui/keyboard/resources/roboto_bold.ttf
710 find -type f \( \
711 -iname \*.exe -o \
712 -iname \*.nexe -o \
713 -iname \*.fon -o \
714 -iname \*.ttf_ -o \
715 -iname \*.dll -o \
716 -iname \*.pdb -o \
717 -name \*.o -o \
718 -name \*.a -o \
719 -name \*.dylib \
720 \) -exec rm -fv {} \;
721}
722# }}}
723# {{{ strip_system_dirs
724# removes dir, if the bcond is not turned off
725strip_system_dirs() {
726 local dir lib bcond args
727 # prevent "*" from being expanded in $args
728 set -f
729 for dir in "$@"; do
730 args=${dir#* }
731 test "$args" = "$dir" && args=
732 dir=${dir%% *}
733 lib=${dir##*/}
734 bcond=$(eval echo \$$lib)
735 [ "${bcond:-1}" = 0 ] && continue
736
737 # skip already removed dirs
738 test -d $dir || continue
739
740 find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' -o -name '*.isolate' -o -path $dir/$lib.h $args ')' -print -delete || :
741 done
742 set +f
743}
744# }}}
745# {{{ remove_tests
746# remove test data and files
747# some scanned with find -name tests -o -name test -o -name test_data -o name testdata
748# and find -iname *test*
749remove_tests() {
750 local dir
751
752 echo '> full remove'
753 for dir in \
754 ash/test \
755 base/test_ \
756 breakpad/src/client/windows/tests \
757 breakpad/src/common/linux/tests \
758 breakpad/src/common/tests \
759 cc/test_ \
760 chrome/browser/chromeos/bluetooth/test \
761 chrome/browser/component_updater/test \
762 chrome/browser/extensions/api/test_ \
763 chrome/browser/printing/cloud_print/test \
764 chrome/browser/resources/gaia_auth/test_ \
765 chrome/browser/resources/tracing/tests \
766 chrome/browser/sync/test \
767 chrome/browser/ui/cocoa/test \
768 chrome/browser/ui/gtk/test \
769 chrome/browser/ui/tests \
770 chrome/browser/ui/views/test \
771 chrome/installer/test \
772 chrome/test/chromeos \
773 chrome/test/data/firefox2_nss_mac \
774 chrome/test/data/safe_browsing/old \
775 chrome/test/logging/win \
776 chrome/test/pyautolib/chromeos \
777 chrome/test/webdriver/test \
778 chrome/test_ \
779 chrome/tools/test \
780 chrome_frame/test \
781 chrome_frame/tools/test \
782 content/browser/worker_host/test \
783 content/common/gpu/testdata \
784 content/public/test_ \
785 content/test \
786 courgette/testdata \
787 device/bluetooth/test \
788 device/test \
789 gpu/command_buffer/tests \
790 media/test \
791 media/tools/layout_tests/test_data \
792 native_client/buildbot \
793 native_client/src/shared/platform/testdata \
794 native_client/src/trusted/gio/testdata \
795 native_client/src/trusted/interval_multiset/testdata \
796 native_client/src/trusted/service_runtime/testdata \
797 native_client/src/trusted/validator/x86/decoder/generator/testdata \
798 native_client/src/trusted/validator/x86/testing \
799 native_client/src/trusted/validator_arm/testdata \
800 native_client/src/trusted/validator_mips/testdata \
801 native_client/src/trusted/validator_x86/testdata \
802 native_client/tests \
803 native_client/tools/testdata \
804 native_client/tools/tests \
805 native_client_sdk/src/build_tools/tests \
806 native_client_sdk/src/libraries/c_salt/test \
807 net/test \
808 o3d/tests \
809 ppapi/native_client/tests \
810 ppapi/tests_ \
811 printing/test \
812 rlz/test \
813 sandbox/linux/seccomp-legacy/tests \
814 sandbox/linux/tests \
815 sandbox/tests \
816 sandbox/win/tests \
817 sdch/open-vcdiff/testdata \
818 seccompsandbox/tests \
819 sync/internal_api/public/test \
820 sync/internal_api/test \
821 sync/test \
822 testing/android \
823 testing/gmock/scripts/test \
824 testing/gmock/test \
825 testing/gtest/scripts/test \
826 testing/gtest/test \
827 third_party/WebKit/LayoutTests \
828 third_party/WebKit/Source/JavaScriptCore/API/tests \
829 third_party/WebKit/Source/JavaScriptCore/qt/tests \
830 third_party/WebKit/Source/JavaScriptCore/tests \
831 third_party/WebKit/Source/ThirdParty/gtest/scripts/test \
832 third_party/WebKit/Source/ThirdParty/gtest/test \
833 third_party/WebKit/Source/ThirdParty/gyp/test \
834 third_party/WebKit/Source/ThirdParty/qunit/test \
835 third_party/WebKit/Source/WebCore/bindings/scripts/test \
836 third_party/WebKit/Source/WebCore/testing_ \
837 third_party/WebKit/Source/WebKit/chromium/tests \
838 third_party/WebKit/Source/WebKit/efl/tests \
839 third_party/WebKit/Source/WebKit/gtk/tests \
840 third_party/WebKit/Source/WebKit/qt/tests \
841 third_party/WebKit/Source/WebKit2/UIProcess/API/efl/tests \
842 third_party/WebKit/Source/WebKit2/UIProcess/API/gtk/tests \
843 third_party/WebKit/Source/WebKit2/UIProcess/API/qt/tests \
844 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac \
845 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/win \
846 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/mac \
847 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/win \
848 third_party/WebKit/Tools/Scripts/webkitpy/test \
849 third_party/WebKit/Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac \
850 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit/win \
851 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/mac \
852 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/win \
853 third_party/WebKit/Tools/TestWebKitAPI/Tests/mac \
854 third_party/WebKit/Tools/TestWebKitAPI/mac \
855 third_party/WebKit/Tools/TestWebKitAPI/win \
856 third_party/angle_dx11/tests \
857 third_party/cacheinvalidation/files/src/google/cacheinvalidation/test \
858 third_party/cacheinvalidation/src/google/cacheinvalidation/test \
859 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing \
860 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing/android \
861 third_party/ffmpeg/tests_ \
862 third_party/harfbuzz/tests \
863 third_party/hunspell/tests \
864 third_party/hyphen/tests \
865 third_party/libexif/sources/test \
866 third_party/libjingle/source/talk/app/webrtc/test \
867 third_party/libjingle/source/talk/media/testdata \
868 third_party/libphonenumber/src/resources/test \
869 third_party/libphonenumber/src/test \
870 third_party/libsrtp/srtp/crypto/test \
871 third_party/libsrtp/srtp/test \
872 third_party/libyuv/unit_test/testdata \
873 third_party/mesa/MesaLib/src/gallium/tests \
874 third_party/openssl/openssl/crypto/des/t/test \
875 third_party/openssl/openssl/test \
876 third_party/ots/test \
877 third_party/protobuf/src/google/protobuf/testdata \
878 third_party/protobuf/src/google/protobuf/testing_ \
879 third_party/re2/re2/testing \
880 third_party/safe_browsing/testing \
881 third_party/sfntly/cpp/src/test \
882 third_party/sqlite/src/test \
883 third_party/sqlite/test \
884 third_party/talloc/libreplace/test \
885 third_party/tcmalloc/chromium/src/tests \
886 third_party/tcmalloc/vendor/src/tests \
887 third_party/tlslite/test \
888 third_party/trace-viewer/test_data \
889 third_party/trace-viewer/third_party/pywebsocket/src/test \
890 third_party/trace-viewer/third_party/pywebsocket/src/test/testdata \
891 third_party/v8-i18n/tests \
892 third_party/webdriver/pylib/test \
893 third_party/webdriver/test_data \
894 third_party/webrtc/modules/audio_device/test/android \
895 third_party/webrtc/modules/audio_processing/test/android \
896 third_party/webrtc/modules/utility/test \
897 third_party/webrtc/modules/video_capture/main/test/android \
898 third_party/webrtc/system_wrappers/test \
899 third_party/webrtc/test/manual \
900 third_party/webrtc/test/testsupport/mac \
901 third_party/webrtc/video_engine/test/auto_test/android \
902 third_party/webrtc/voice_engine/test/android \
903 third_party/xdg-utils/tests \
904 third_party/yasm/source/patched-yasm/libyasm/tests \
905 third_party/yasm/source/patched-yasm/modules/arch/lc3b/tests \
906 third_party/yasm/source/patched-yasm/modules/arch/x86/tests \
907 third_party/yasm/source/patched-yasm/modules/dbgfmts/dwarf2/tests \
908 third_party/yasm/source/patched-yasm/modules/dbgfmts/stabs/tests \
909 third_party/yasm/source/patched-yasm/modules/objfmts/bin/tests \
910 third_party/yasm/source/patched-yasm/modules/objfmts/coff/tests \
911 third_party/yasm/source/patched-yasm/modules/objfmts/elf/tests \
912 third_party/yasm/source/patched-yasm/modules/objfmts/macho/tests \
913 third_party/yasm/source/patched-yasm/modules/objfmts/rdf/tests \
914 third_party/yasm/source/patched-yasm/modules/objfmts/win32/tests \
915 third_party/yasm/source/patched-yasm/modules/objfmts/win64/tests \
916 third_party/yasm/source/patched-yasm/modules/objfmts/xdf/tests \
917 third_party/yasm/source/patched-yasm/modules/parsers/gas/tests \
918 third_party/yasm/source/patched-yasm/modules/parsers/nasm/tests \
919 third_party/yasm/source/patched-yasm/modules/parsers/tasm/tests \
920 third_party/yasm/source/patched-yasm/modules/preprocs/nasm/tests \
921 third_party/yasm/source/patched-yasm/modules/preprocs/raw/tests \
922 third_party/yasm/source/patched-yasm/tools/python-yasm/tests \
923 third_party/zlib/google/test \
924 tools/clang/plugins/tests \
925 tools/grit/grit/testdata \
926 tools/gyp/test \
927 tools/gyp/tools/emacs/testdata \
928 tools/page_cycler/webpagereplay/tests \
929 tools/perf_expectations/tests \
930 tools/swarm_client/tests \
931 ui/app_list/test \
932 ui/aura/test \
933 ui/base/test \
934 ui/compositor/test \
935 ui/gfx/test \
936 ui/test \
937 ui/views/test \
938 v8/test \
939 webkit/compositor_bindings/test \
940 webkit/data/layout_tests \
941 webkit/plugins/npapi/test \
942 webkit/tools/test/reference_build \
943 webkit/tools/test_shell/mac \
944 ; do
945 rm -vfr "$dir"
946 done
947
948 echo '> partial remove (keep .gyp)'
949 for dir in \
950 chrome/browser/nacl_host/test \
951 chrome/test/data_ \
952 testing/gtest_ \
953 testing/gtest_ios \
954 testing/gmock_ \
955 third_party/webrtc/modules/audio_coding/codecs/cng/test \
956 third_party/webrtc/modules/audio_coding/codecs/g711/test \
957 third_party/webrtc/modules/audio_coding/codecs/g722/test \
958 third_party/webrtc/modules/audio_coding/codecs/ilbc/test \
959 third_party/webrtc/modules/audio_coding/codecs/isac/fix/test \
960 third_party/webrtc/modules/audio_coding/codecs/isac/main/test \
961 third_party/webrtc/modules/audio_coding/main/test \
962 third_party/webrtc/modules/audio_coding/neteq/test \
963 third_party/webrtc/modules/audio_conference_mixer/test \
964 third_party/webrtc/modules/audio_device/test \
965 third_party/webrtc/modules/audio_processing/test \
966 third_party/webrtc/modules/rtp_rtcp/test \
967 third_party/webrtc/modules/udp_transport/test \
968 third_party/webrtc/modules/video_capture/main/test \
969 third_party/webrtc/modules/video_coding/codecs/test \
970 third_party/webrtc/modules/video_coding/codecs/vp8/test \
971 third_party/webrtc/modules/video_coding/main/test \
972 third_party/webrtc/modules/video_processing/main/test \
973 third_party/webrtc/modules/video_render/main/test \
974 third_party/webrtc/video_engine/test_ \
975 third_party/webrtc/voice_engine/test \
976 tools/json_schema_compiler/test \
977 ; do
978 find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' ')' -print -delete || :
979 done
980
981 # link headers from system dir. too many files to patch, we don't even build tests
982# install -d testing/gtest/include
983# ln -s /usr/include/gtest testing/gtest/include/gtest
984
985 # fast exit. as this requires fine-tuning
986 return
987
988 echo '> delete unittest files'
989 find . '(' \
990 -name '*_unittest*.*' -o \
991 -name '*_unittest.*' -o \
992 -name '*_unittest' -o \
993 -name 'test_*.*' -o \
994 -name '*_test.*' -o \
995 -path './testing/' \
996 ')' '!' -type d '(' \
997 '!' -name '*.grd' \
998 '!' -name '*.gyp*' \
999 '!' -name '*.isolate' \
1000 '!' -path './base/test/*' \
1001 '!' -path './base/test/launcher/*' \
1002 '!' -path './base/test/launcher/test_launcher.*' \
1003 '!' -path './base/test/launcher/test_result.*' \
1004 '!' -path './cc/debug/*' \
1005 '!' -path './cc/debug/test_context_provider.h' \
1006 '!' -path './cc/debug/test_web_graphics_context_3d.h' \
1007 '!' -path './chrome/browser/diagnostics/diagnostics_test.*' \
1008 '!' -path './chrome/browser/extensions/api/declarative/test_rules_registry.*' \
1009 '!' -path './chrome/browser/extensions/api/test/test_api.*' \
1010 '!' -path './chrome/browser/resources/gaia_auth/manifest_test.json' \
1011 '!' -path './extensions/renderer/resources/test_custom_bindings.js' \
1012 '!' -path './sync/internal_api/attachments/attachment_service_proxy_for_test.cc' \
1013 '!' -path './net/base/registry_controlled_domains/effective_tld_names_unittest1.gperf' \
1014 '!' -path './chrome/browser/resources/net_internals/*' \
1015 '!' -path './chrome/browser/storage_monitor/test_media_transfer_protocol_manager_linux.*' \
1016 '!' -path './chrome/browser/ui/webui/test_chrome_web_ui_controller_factory*' \
1017 '!' -path './chrome/common/net/test_server_locations.*' \
1018 '!' -path './chrome/renderer/resources/extensions/test_custom_bindings.js' \
1019 '!' -path './chrome/test/base/test_switches.*' \
1020 '!' -path './chrome/test/perf/browser_perf_test.*' \
1021 '!' -path './chrome/test/perf/perf_test.*' \
1022 '!' -path './content/public/test/test_utils.h' \
1023 '!' -path './extensions/browser/api/test/test_api.*' \
1024 '!' -path './extensions/renderer/test_features_native_handler.*' \
1025 '!' -path './media/cast/rtcp/test_rtcp_packet_builder.*' \
1026 '!' -path './native_client/src/trusted/fault_injection/test_injection.*' \
1027 '!' -path './native_client/src/trusted/service_runtime/env_cleanser_test.h' \
1028 '!' -path './net/base/test_completion_callback.*' \
1029 '!' -path './net/base/test_data_stream.*' \
1030 '!' -path './net/cert/test_root_certs*' \
1031 '!' -path './remoting/base/resources_unittest.*' \
1032 '!' -path './sync/api/attachments/attachment_service_proxy_for_test.*' \
1033 '!' -path './testing/*' \
1034 '!' -path './testing/perf/perf_test.*' \
1035 '!' -path './third_party/skia/src/gpu/gr_unittests.*' \
1036 '!' -path './third_party/trace-viewer/src/base/unittest/test_error.js' \
1037 '!' -path './third_party/trace-viewer/src/tracing/test_utils.js' \
1038 '!' -path './third_party/trace-viewer/third_party/tvcm/src/tvcm/unittest/*.js' \
1039 '!' -path './third_party/trace-viewer/third_party/tvcm/src/tvcm/unittest/test_case.js' \
1040 '!' -path './third_party/trace-viewer/third_party/tvcm/src/tvcm/unittest/test_error.js' \
1041 '!' -path './third_party/trace-viewer/third_party/tvcm/src/tvcm/unittest/test_runner.js' \
1042 '!' -path './third_party/trace-viewer/third_party/tvcm/third_party/rcssmin/*' \
1043 '!' -path './third_party/trace-viewer/third_party/tvcm/third_party/rjsmin/*' \
1044 '!' -path './third_party/trace-viewer/trace_viewer/tracing/test_utils.js' \
1045 '!' -path './mojo/embedder/test_embedder.*' \
1046 '!' -path './ui/base/hit_test.*' \
1047 '!' -path './tools/compile_test/compile_test.py' \
1048 '!' -path './tools/compile_test/compile_test.py' \
1049 '!' -path './ui/compositor/test_web_graphics_context_3d.*' \
1050 '!' -path './ui/webui/resources/js/webui_resource_test.js' \
1051 '!' -path './webkit/browser/fileapi/*.cc' \
1052 '!' -path './webkit/browser/fileapi/*.h' \
1053 '!' -path './webkit/common/gpu/test_context_provider_factory.*' \
1054 '!' -path './webkit/gpu/test_context_provider_factory.*' \
1055 '!' -path './webkit/support/test_webkit_platform_support.h' \
1056 '!' -path './webkit/tools/test_shell/*.h' \
1057 ')' \
1058 -print -delete || :
1059}
1060# }}}
1061
1062# {{{ remove_bundled_libraries
1063# Remove most bundled libraries. Some are still needed.
1064# Sync this with gentoo/chromium-*.ebuild
1065# NOTE: argument list to script specifies paths to preserve
1066remove_bundled_libraries() {
1067 # ninja: error: '../../third_party/jinja2/__init__.py', needed by 'gen/blink/InternalSettingsGenerated.idl', missing and no known rule to make it
1068 # ninja: error: '../../third_party/markupsafe/__init__.py', needed by 'gen/blink/InternalSettingsGenerated.idl', missing and no known rule to make it
1069
1070 # NOTE: don't forget to sync clean_third_party()
1071
1072 build/linux/unbundle/remove_bundled_libraries.py \
1073 third_party/adobe/flash/flapper_version.h \
1074 third_party/jinja2 \
1075 third_party/markupsafe/ \
1076 third_party/ply/ \
1077 third_party/catapult/third_party/beautifulsoup4 \
1078 third_party/ffmpeg \
1079 'base/third_party/dmg_fp' \
1080 'base/third_party/dynamic_annotations' \
1081 'base/third_party/icu' \
1082 'base/third_party/nspr' \
1083 'base/third_party/superfasthash' \
1084 'base/third_party/symbolize' \
1085 'base/third_party/valgrind' \
1086 'base/third_party/xdg_mime' \
1087 'base/third_party/xdg_user_dirs' \
1088 'breakpad/src/third_party/curl' \
1089 'chrome/third_party/mozilla_security_manager' \
1090 'courgette/third_party' \
1091 'crypto/third_party/nss' \
1092 'net/third_party/mozilla_security_manager' \
1093 'net/third_party/nss' \
1094 'third_party/WebKit' \
1095 'third_party/analytics' \
1096 'third_party/angle' \
1097 'third_party/angle/src/third_party/compiler' \
1098 'third_party/angle/src/third_party/murmurhash' \
1099 'third_party/angle/src/third_party/trace_event' \
1100 'third_party/boringssl' \
1101 'third_party/brotli' \
1102 'third_party/cacheinvalidation' \
1103 'third_party/catapult' \
1104 'third_party/catapult/third_party/py_vulcanize' \
1105 'third_party/catapult/third_party/py_vulcanize/third_party/rcssmin' \
1106 'third_party/catapult/third_party/py_vulcanize/third_party/rjsmin' \
1107 'third_party/catapult/tracing/third_party/components/polymer' \
1108 'third_party/catapult/tracing/third_party/d3' \
1109 'third_party/catapult/tracing/third_party/gl-matrix' \
1110 'third_party/catapult/tracing/third_party/jszip' \
1111 'third_party/cld_2' \
1112 'third_party/cros_system_api' \
1113 'third_party/cython/python_flags.py' \
1114 'third_party/devscripts' \
1115 'third_party/dom_distiller_js' \
1116 'third_party/dom_distiller_js/dist/proto_gen/third_party/dom_distiller_js' \
1117 'third_party/fips181' \
1118 'third_party/flot' \
1119 'third_party/google_input_tools' \
1120 'third_party/google_input_tools/third_party/closure_library' \
1121 'third_party/google_input_tools/third_party/closure_library/third_party/closure' \
1122 'third_party/hunspell' \
1123 'third_party/iccjpeg' \
1124 'third_party/icu' \
1125 'third_party/jstemplate' \
1126 'third_party/khronos' \
1127 'third_party/leveldatabase' \
1128 'third_party/libXNVCtrl' \
1129 'third_party/libaddressinput' \
1130 'third_party/libjingle' \
1131 'third_party/libphonenumber' \
1132 'third_party/libsecret' \
1133 'third_party/libsrtp' \
1134 'third_party/libudev' \
1135 'third_party/libusb' \
1136 'third_party/libvpx_new' \
1137 'third_party/libvpx_new/source/libvpx/third_party/x86inc' \
1138 'third_party/libxml/chromium' \
1139 'third_party/libwebm' \
1140 'third_party/libyuv' \
1141 'third_party/lss' \
1142 'third_party/lzma_sdk' \
1143 'third_party/mesa' \
1144 'third_party/modp_b64' \
1145 'third_party/mt19937ar' \
1146 'third_party/npapi' \
1147 'third_party/openh264' \
1148 'third_party/openmax_dl' \
1149 'third_party/opus' \
1150 'third_party/ots' \
1151 'third_party/pdfium' \
1152 'third_party/pdfium/third_party/agg23' \
1153 'third_party/pdfium/third_party/base' \
1154 'third_party/pdfium/third_party/bigint' \
1155 'third_party/pdfium/third_party/freetype' \
1156 'third_party/pdfium/third_party/lcms2-2.6' \
1157 'third_party/pdfium/third_party/libjpeg' \
1158 'third_party/pdfium/third_party/libopenjpeg20' \
1159 'third_party/pdfium/third_party/zlib_v128' \
1160 'third_party/polymer' \
1161 'third_party/protobuf' \
1162 'third_party/qcms' \
1163 'third_party/re2' \
1164 'third_party/sfntly' \
1165 'third_party/skia' \
1166 'third_party/smhasher' \
1167 'third_party/sqlite' \
1168 'third_party/tcmalloc' \
1169 'third_party/usrsctp' \
1170 'third_party/web-animations-js' \
1171 'third_party/webdriver' \
1172 'third_party/webrtc' \
1173 'third_party/widevine' \
1174 'third_party/woff2' \
1175 'third_party/x86inc' \
1176 'third_party/zlib/google' \
1177 'url/third_party/mozilla' \
1178 'v8/src/third_party/fdlibm' \
1179 'v8/src/third_party/valgrind' \
1180 --do-print \
1181 --do-remove
1182}
1183# }}}
1184
1185# clean extra files that are cleaned in tarball provided by google
1186clean_src_extra() {
1187 rm -rfv \
1188 .landmines \
1189 chrome/browser/resources/pdf/html_office \
1190 third_party/WebKit/ManualTests \
1191 third_party/WebKit/PerformanceTests
1192}
1193
1194remove_bundled_libraries > REMOVED-bundled_libraries.txt
1195
1196strip_system_dirs \
1197 native_client/src/third_party_mod/jsoncpp \
1198 third_party/bzip2 \
1199 third_party/ffmpeg_ \
1200 third_party/flac \
1201 third_party/icu_ \
1202 third_party/jsoncpp \
1203 third_party/libXNVCtrl \
1204 third_party/libevent \
1205 third_party/libexif \
1206 third_party/libjpeg \
1207 third_party/libmtp \
1208 third_party/libpng \
1209 third_party/libsrtp_ \
1210 third_party/libusb_ \
1211 third_party/libvpx_ \
1212 third_party/libwebp \
1213 third_party/libxslt \
1214 third_party/mesa \
1215 third_party/opus_ \
1216 third_party/protobuf \
1217 third_party/re2 \
1218 third_party/snappy \
1219 third_party/speex \
1220 third_party/sqlite \
1221 third_party/yasm \
1222 "third_party/zlib -o -path third_party/zlib/google/*" \
1223 v8 \
1224> REMOVED-system_dirs.txt
1225remove_nonessential_dirs > REMOVED-nonessential_dirs.txt
1226almost_strip_dirs > REMOVED-stripped.txt
1227remove_bin_only > REMOVED-bin_only.txt
1228remove_tests > REMOVED-tests.txt
1229
1230if [ "${sqlite:-1}" = 1 ]; then
1231 # some code does not pass -DUSE_SYSTEM_SQLITE properly
1232 ln -sf /usr/include/sqlite3.h third_party/sqlite/sqlite3.h
1233fi
1234
1235clean_third_party > REMOVED-third_party.txt
1236
1237clean_src_extra > REMOVED-extra.txt
1238
1239if [ "${v8:-1}" != "0" ]; then
1240 # The implementation files include v8 headers with full path,
1241 # like #include "v8/include/v8.h". Make sure the system headers
1242 # will be used.
1243 rm -rf v8/include
1244 ln -s /usr/include v8/include
1245fi
1246
1247if [ "${nacl:-1}" != "0" ]; then
1248 # NOTE: here is always x86_64
1249 rm -rf native_client/toolchain/linux_x86_newlib
1250fi
1251
1252if [ "${emptydirs:-0}" != "0" ]; then
1253 # cleanup empty dirs
1254 find -type d '!' -name '.' -print0 | sort -zr | xargs -0 rmdir --ignore-fail-on-non-empty > REMOVED-dirs.txt
1255fi
1256
1257# report what's in them
1258for a in REMOVED-*.txt; do
1259 sed -e "s/^/$a: /" $a
1260done
1261
1262# vim:fdm=marker
This page took 0.147809 seconds and 4 git commands to generate.