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