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