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