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