]>
Commit | Line | Data |
---|---|---|
fe547a32 | 1 | #!/bin/sh |
8f5f6775 | 2 | set -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 |
7 | eval "$@" |
8 | ||
9 | # drop bundled libs, from gentoo | |
598df428 | 10 | gyp_clean() { |
598df428 ER |
11 | local l lib=$1 |
12 | echo "Removing bundled library $lib ..." | |
13 | l=$(find "$lib" -mindepth 1 ! -iname '*.gyp*' -print -delete | wc -l) | |
14 | if [ $l -eq 0 ]; then | |
fe547a32 ER |
15 | echo >&2 "No files matched when removing bundled library $1" |
16 | exit 1 | |
17 | fi | |
18 | } | |
19 | ||
f888c710 | 20 | # https://code.google.com/p/chromium/wiki/LinuxPackaging |
99f39995 | 21 | # initial list from src/tools/export_tarball/export_tarball.py |
1dd58211 | 22 | # some scanned with find -name tests -o -name test -o -name test_data |
3333a973 | 23 | # also removed non-linux files: find -name win -o -name mac |
f888c710 ER |
24 | remove_nonessential_dirs() { |
25 | local dir | |
26 | for dir in \ | |
30ab5de0 | 27 | chrome/common/extensions/docs \ |
30ab5de0 ER |
28 | chrome/tools/test/reference_build \ |
29 | courgette/testdata \ | |
30 | data \ | |
31 | native_client/src/trusted/service_runtime/testdata \ | |
07d26a0d | 32 | native_client_sdk \ |
30ab5de0 ER |
33 | o3d/documentation \ |
34 | o3d/samples \ | |
35 | o3d/tests \ | |
36 | third_party/angle/samples/gles2_book \ | |
37 | third_party/hunspell_dictionaries \ | |
38 | third_party/hunspell/tests \ | |
39 | third_party/lighttpd \ | |
40 | third_party/sqlite/test \ | |
41 | third_party/vc_80 \ | |
42 | third_party/xdg-utils/tests \ | |
43 | third_party/yasm/source/patched-yasm/modules/arch/x86/tests \ | |
44 | third_party/yasm/source/patched-yasm/modules/dbgfmts/dwarf2/tests \ | |
45 | third_party/yasm/source/patched-yasm/modules/objfmts/bin/tests \ | |
46 | third_party/yasm/source/patched-yasm/modules/objfmts/coff/tests \ | |
47 | third_party/yasm/source/patched-yasm/modules/objfmts/elf/tests \ | |
48 | third_party/yasm/source/patched-yasm/modules/objfmts/macho/tests \ | |
49 | third_party/yasm/source/patched-yasm/modules/objfmts/rdf/tests \ | |
50 | third_party/yasm/source/patched-yasm/modules/objfmts/win32/tests \ | |
51 | third_party/yasm/source/patched-yasm/modules/objfmts/win64/tests \ | |
52 | third_party/yasm/source/patched-yasm/modules/objfmts/xdf/tests \ | |
53 | third_party/WebKit/Source/JavaScriptCore/tests \ | |
54 | third_party/WebKit/LayoutTests \ | |
daa4a66c ER |
55 | \ |
56 | breakpad/src/client/mac/tests \ | |
57 | breakpad/src/client/windows/tests \ | |
58 | breakpad/src/common/linux/tests \ | |
59 | breakpad/src/common/tests \ | |
60 | chrome/browser/resources/tracing/tests \ | |
61 | chrome/browser/ui/tests \ | |
62 | content/test/data/layout_tests/LayoutTests/http/tests \ | |
63 | content/test/data/layout_tests/LayoutTests/http/tests/websocket/tests \ | |
64 | content/test/data/layout_tests/LayoutTests/platform/chromium-win/http/tests \ | |
65 | gpu/command_buffer/tests \ | |
66 | native_client/tests \ | |
67 | native_client/tools/tests \ | |
68 | native_client_sdk/src/build_tools/tests \ | |
69 | ppapi/native_client/tests \ | |
70 | ppapi/tests \ | |
71 | sandbox/tests \ | |
72 | seccompsandbox/tests \ | |
73 | third_party/WebKit/Source/JavaScriptCore/API/tests \ | |
74 | third_party/WebKit/Source/JavaScriptCore/qt/tests \ | |
75 | third_party/WebKit/Source/WebKit/chromium/tests \ | |
76 | third_party/WebKit/Source/WebKit/gtk/tests \ | |
77 | third_party/WebKit/Source/WebKit/qt/tests \ | |
78 | third_party/WebKit/Source/WebKit2/UIProcess/API/gtk/tests \ | |
79 | third_party/WebKit/Source/WebKit2/UIProcess/API/qt/tests \ | |
80 | third_party/angle/tests \ | |
81 | third_party/ffmpeg/tests \ | |
82 | third_party/harfbuzz/tests \ | |
83 | third_party/hyphen/tests \ | |
84 | third_party/mesa/MesaLib/src/gallium/tests \ | |
85 | third_party/mesa/MesaLib/src/gallium/tests/python/tests \ | |
86 | third_party/tcmalloc/chromium/src/tests \ | |
87 | third_party/tcmalloc/vendor/src/tests \ | |
88 | third_party/yasm/source/patched-yasm/libyasm/tests \ | |
89 | third_party/yasm/source/patched-yasm/modules/arch/lc3b/tests \ | |
90 | third_party/yasm/source/patched-yasm/modules/dbgfmts/stabs/tests \ | |
91 | third_party/yasm/source/patched-yasm/modules/parsers/gas/tests \ | |
92 | third_party/yasm/source/patched-yasm/modules/parsers/nasm/tests \ | |
93 | third_party/yasm/source/patched-yasm/modules/parsers/tasm/tests \ | |
94 | third_party/yasm/source/patched-yasm/modules/preprocs/nasm/tests \ | |
95 | third_party/yasm/source/patched-yasm/modules/preprocs/raw/tests \ | |
96 | third_party/yasm/source/patched-yasm/tools/python-yasm/tests \ | |
97 | tools/clang/plugins/tests \ | |
98 | tools/page_cycler/webpagereplay/tests \ | |
99 | tools/perf_expectations/tests \ | |
100 | \ | |
30ab5de0 ER |
101 | v8/test \ |
102 | webkit/data/layout_tests \ | |
103 | webkit/tools/test/reference_build \ | |
99f39995 ER |
104 | \ |
105 | tools/site_compare \ | |
106 | tools/stats_viewer \ | |
107 | tools/symsrc \ | |
108 | tools/valgrind \ | |
c0808220 | 109 | tools/gyp/test \ |
1dd58211 ER |
110 | \ |
111 | ash/test \ | |
112 | base/android/javatests/src/org/chromium/base/test \ | |
113 | base/test \ | |
114 | chrome/browser/chromeos/bluetooth/test \ | |
115 | chrome/browser/component_updater/test \ | |
116 | chrome/browser/printing/cloud_print/test \ | |
117 | chrome/browser/resources/gaia_auth/test \ | |
118 | chrome/browser/sync/test \ | |
119 | chrome/installer/test \ | |
120 | chrome/test/webdriver/test \ | |
121 | chrome/tools/test \ | |
122 | chrome_frame/test \ | |
123 | chrome_frame/tools/test \ | |
07d26a0d | 124 | chrome_frame \ |
1dd58211 ER |
125 | content/browser/worker_host/test \ |
126 | content/public/test \ | |
127 | content/test \ | |
128 | media/test \ | |
129 | media/tools/layout_tests/test_data \ | |
130 | native_client_sdk/src/libraries/c_salt/test \ | |
131 | net/test \ | |
132 | printing/test \ | |
133 | rlz/test \ | |
134 | sandbox/linux/seccomp-legacy/tests \ | |
135 | sandbox/linux/tests \ | |
136 | sandbox/win/tests \ | |
137 | sync/internal_api/public/test \ | |
138 | sync/internal_api/test \ | |
139 | sync/test \ | |
140 | testing/gmock/scripts/test \ | |
141 | testing/gmock/test \ | |
142 | testing/gtest/scripts/test \ | |
143 | testing/gtest/test \ | |
144 | third_party/WebKit/Source/ThirdParty/gtest/scripts/test \ | |
145 | third_party/WebKit/Source/ThirdParty/gtest/test \ | |
146 | third_party/WebKit/Source/ThirdParty/gyp/test \ | |
147 | third_party/WebKit/Source/ThirdParty/qunit/test \ | |
148 | third_party/WebKit/Source/WebCore/bindings/scripts/test \ | |
149 | third_party/WebKit/Source/WebKit/efl/tests \ | |
150 | third_party/WebKit/Source/WebKit2/UIProcess/API/efl/tests \ | |
151 | third_party/WebKit/Tools/Scripts/webkitpy/test \ | |
152 | third_party/cacheinvalidation/files/src/google/cacheinvalidation/test \ | |
153 | third_party/libexif/sources/test \ | |
154 | third_party/libjingle/source/talk/app/webrtc/test \ | |
155 | third_party/libphonenumber/src/resources/test \ | |
156 | third_party/libphonenumber/src/test \ | |
157 | third_party/libsrtp/srtp/crypto/test \ | |
158 | third_party/libsrtp/srtp/test \ | |
159 | third_party/openssl/openssl/crypto/des/t/test \ | |
160 | third_party/openssl/openssl/test \ | |
161 | third_party/ots/test \ | |
162 | third_party/sfntly/cpp/src/test \ | |
163 | third_party/sqlite/src/test \ | |
164 | third_party/talloc/libreplace/test \ | |
165 | third_party/tlslite/test \ | |
166 | third_party/trace-viewer/test_data \ | |
167 | third_party/v8-i18n/tests \ | |
168 | third_party/webdriver/pylib/test \ | |
169 | third_party/webdriver/test_data \ | |
170 | ui/app_list/test \ | |
171 | ui/aura/test \ | |
172 | ui/base/test \ | |
173 | ui/compositor/test \ | |
174 | ui/gfx/test \ | |
175 | ui/test \ | |
176 | ui/views/test \ | |
177 | webkit/plugins/npapi/test \ | |
3333a973 ER |
178 | \ |
179 | _base/mac \ | |
180 | _base/win \ | |
181 | breakpad/src/client/mac \ | |
182 | breakpad/src/common/mac \ | |
183 | breakpad/src/tools/mac \ | |
184 | build/mac \ | |
185 | build/win \ | |
186 | chrome/app/theme/default_100_percent/mac \ | |
187 | chrome/app/theme/default_100_percent/win \ | |
188 | chrome/app/theme/default_200_percent/mac \ | |
189 | chrome/app/theme/default_200_percent/win \ | |
190 | chrome/app/theme/touch_100_percent/win \ | |
191 | chrome/app/theme/touch_140_percent/win \ | |
192 | chrome/app/theme/touch_180_percent/win \ | |
193 | chrome/browser/mac \ | |
194 | chrome/common/mac \ | |
195 | chrome/installer/mac \ | |
196 | chrome/installer/mac/third_party/xz/config/mac \ | |
197 | chrome/test/logging/win \ | |
198 | chrome/tools/build/mac \ | |
199 | chrome/tools/build/win \ | |
200 | cloud_print/service/win \ | |
201 | cloud_print/virtual_driver/win \ | |
202 | _content/common/mac \ | |
203 | content/shell/mac \ | |
204 | media/audio/mac \ | |
205 | media/audio/win \ | |
206 | media/video/capture/mac \ | |
207 | media/video/capture/win \ | |
208 | native_client/build/mac \ | |
209 | _native_client/src/include/win \ | |
210 | native_client/src/shared/imc/win \ | |
211 | native_client/src/shared/platform/win \ | |
212 | native_client/src/trusted/debug_stub/win \ | |
213 | native_client/src/trusted/desc/win \ | |
214 | native_client/src/trusted/nonnacl_util/win \ | |
215 | native_client/src/trusted/platform_qualify/win \ | |
216 | _native_client/src/trusted/service_runtime/win \ | |
217 | native_client_sdk/src/libraries/win \ | |
218 | ppapi/native_client/src/trusted/plugin/win \ | |
219 | remoting/host/installer/mac \ | |
220 | remoting/host/mac \ | |
221 | remoting/host/win \ | |
222 | rlz/mac \ | |
223 | rlz/win \ | |
224 | _sandbox/win \ | |
225 | sdch/mac \ | |
226 | skia/config/win \ | |
227 | third_party/WebKit/Source/Platform/chromium/public/mac \ | |
228 | third_party/WebKit/Source/Platform/chromium/public/win \ | |
229 | third_party/WebKit/Source/WTF/wtf/mac \ | |
230 | third_party/WebKit/Source/WTF/wtf/threads/win \ | |
231 | third_party/WebKit/Source/WTF/wtf/win \ | |
232 | third_party/WebKit/Source/WebCore/WebCore.gyp/mac \ | |
233 | third_party/WebKit/Source/WebCore/accessibility/mac \ | |
234 | third_party/WebKit/Source/WebCore/accessibility/win \ | |
235 | third_party/WebKit/Source/WebCore/editing/mac \ | |
236 | third_party/WebKit/Source/WebCore/history/mac \ | |
237 | third_party/WebKit/Source/WebCore/loader/mac \ | |
238 | third_party/WebKit/Source/WebCore/loader/win \ | |
239 | third_party/WebKit/Source/WebCore/page/mac \ | |
240 | third_party/WebKit/Source/WebCore/page/scrolling/mac \ | |
241 | third_party/WebKit/Source/WebCore/page/win \ | |
242 | third_party/WebKit/Source/WebCore/platform/audio/mac \ | |
243 | third_party/WebKit/Source/WebCore/platform/cf/win \ | |
244 | third_party/WebKit/Source/WebCore/platform/graphics/ca/mac \ | |
245 | third_party/WebKit/Source/WebCore/platform/graphics/ca/win \ | |
246 | third_party/WebKit/Source/WebCore/platform/graphics/gpu/mac \ | |
247 | third_party/WebKit/Source/WebCore/platform/graphics/mac \ | |
248 | third_party/WebKit/Source/WebCore/platform/graphics/surfaces/mac \ | |
249 | third_party/WebKit/Source/WebCore/platform/graphics/win \ | |
250 | third_party/WebKit/Source/WebCore/platform/mac \ | |
251 | third_party/WebKit/Source/WebCore/platform/network/mac \ | |
252 | third_party/WebKit/Source/WebCore/platform/network/win \ | |
253 | third_party/WebKit/Source/WebCore/platform/text/mac \ | |
254 | third_party/WebKit/Source/WebCore/platform/text/win \ | |
255 | third_party/WebKit/Source/WebCore/platform/win \ | |
256 | third_party/WebKit/Source/WebCore/platform/wx/wxcode/mac \ | |
257 | third_party/WebKit/Source/WebCore/platform/wx/wxcode/win \ | |
258 | third_party/WebKit/Source/WebCore/plugins/mac \ | |
259 | third_party/WebKit/Source/WebCore/plugins/win \ | |
260 | _third_party/WebKit/Source/WebKit/chromium/public/mac \ | |
261 | third_party/WebKit/Source/WebKit/chromium/public/platform/mac \ | |
262 | third_party/WebKit/Source/WebKit/chromium/public/platform/win \ | |
263 | third_party/WebKit/Source/WebKit/chromium/public/win \ | |
264 | third_party/WebKit/Source/WebKit/chromium/src/mac \ | |
265 | third_party/WebKit/Source/WebKit/chromium/src/win \ | |
266 | third_party/WebKit/Source/WebKit/mac \ | |
267 | third_party/WebKit/Source/WebKit/win \ | |
268 | third_party/WebKit/Source/WebKit2/Platform/CoreIPC/mac \ | |
269 | third_party/WebKit/Source/WebKit2/Platform/CoreIPC/win \ | |
270 | third_party/WebKit/Source/WebKit2/Platform/mac \ | |
271 | third_party/WebKit/Source/WebKit2/Platform/win \ | |
272 | third_party/WebKit/Source/WebKit2/PluginProcess/mac \ | |
273 | third_party/WebKit/Source/WebKit2/Shared/API/c/mac \ | |
274 | third_party/WebKit/Source/WebKit2/Shared/API/c/win \ | |
275 | third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/mac \ | |
276 | third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/win \ | |
277 | third_party/WebKit/Source/WebKit2/Shared/Plugins/mac \ | |
278 | third_party/WebKit/Source/WebKit2/Shared/cg/win \ | |
279 | third_party/WebKit/Source/WebKit2/Shared/mac \ | |
280 | third_party/WebKit/Source/WebKit2/Shared/win \ | |
281 | third_party/WebKit/Source/WebKit2/UIProcess/API/C/mac \ | |
282 | third_party/WebKit/Source/WebKit2/UIProcess/API/C/win \ | |
283 | third_party/WebKit/Source/WebKit2/UIProcess/API/mac \ | |
284 | third_party/WebKit/Source/WebKit2/UIProcess/Launcher/mac \ | |
285 | third_party/WebKit/Source/WebKit2/UIProcess/Launcher/win \ | |
286 | third_party/WebKit/Source/WebKit2/UIProcess/Plugins/mac \ | |
287 | third_party/WebKit/Source/WebKit2/UIProcess/Plugins/win \ | |
288 | third_party/WebKit/Source/WebKit2/UIProcess/mac \ | |
289 | third_party/WebKit/Source/WebKit2/UIProcess/win \ | |
290 | third_party/WebKit/Source/WebKit2/WebProcess/Authentication/mac \ | |
291 | third_party/WebKit/Source/WebKit2/WebProcess/Cookies/mac \ | |
292 | third_party/WebKit/Source/WebKit2/WebProcess/Downloads/cf/win \ | |
293 | third_party/WebKit/Source/WebKit2/WebProcess/Downloads/mac \ | |
294 | third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/mac \ | |
295 | third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/win \ | |
296 | third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/API/c/win \ | |
297 | third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/mac \ | |
298 | third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/win \ | |
299 | third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/mac \ | |
300 | third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/win \ | |
301 | third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/mac \ | |
302 | third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/win \ | |
303 | third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/mac \ | |
304 | third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/win \ | |
305 | third_party/WebKit/Source/WebKit2/WebProcess/WebPage/mac \ | |
306 | third_party/WebKit/Source/WebKit2/WebProcess/WebPage/win \ | |
307 | third_party/WebKit/Source/WebKit2/WebProcess/mac \ | |
308 | third_party/WebKit/Source/WebKit2/WebProcess/win \ | |
309 | third_party/WebKit/Source/WebKit2/mac \ | |
310 | third_party/WebKit/Source/WebKit2/win \ | |
311 | third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac \ | |
312 | third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/win \ | |
313 | third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/mac \ | |
314 | third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/win \ | |
315 | third_party/WebKit/Tools/DumpRenderTree/mac \ | |
316 | third_party/WebKit/Tools/DumpRenderTree/win \ | |
317 | third_party/WebKit/Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac \ | |
318 | third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit/win \ | |
319 | third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/mac \ | |
320 | third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/win \ | |
321 | third_party/WebKit/Tools/TestWebKitAPI/Tests/mac \ | |
322 | third_party/WebKit/Tools/TestWebKitAPI/mac \ | |
323 | third_party/WebKit/Tools/TestWebKitAPI/win \ | |
324 | _third_party/cld/encodings/compact_lang_det/win \ | |
325 | third_party/ffmpeg/chromium/binaries/Chromium/win \ | |
326 | third_party/ffmpeg/chromium/config/Chrome/mac \ | |
327 | third_party/ffmpeg/chromium/config/Chromium/mac \ | |
328 | third_party/ffmpeg/chromium/include/win \ | |
329 | third_party/leveldatabase/src/port/win \ | |
330 | third_party/libjpeg_turbo/mac \ | |
331 | third_party/libjpeg_turbo/win \ | |
332 | third_party/libvpx/source/config/mac \ | |
333 | third_party/libvpx/source/config/win \ | |
334 | third_party/libxml/mac \ | |
335 | third_party/skia/include/utils/mac \ | |
336 | third_party/skia/include/utils/win \ | |
337 | third_party/skia/src/gpu/gl/mac \ | |
338 | third_party/skia/src/gpu/gl/win \ | |
339 | third_party/skia/src/utils/mac \ | |
340 | third_party/skia/src/utils/win \ | |
341 | third_party/skia/src/views/mac \ | |
342 | third_party/skia/src/views/win \ | |
343 | third_party/snappy/mac \ | |
344 | third_party/webrtc/modules/audio_device/main/source/mac \ | |
345 | third_party/webrtc/modules/audio_device/main/source/win \ | |
346 | third_party/webrtc/modules/video_render/main/source/mac \ | |
347 | third_party/webrtc/test/testsupport/mac \ | |
348 | third_party/yasm/source/config/mac \ | |
349 | third_party/yasm/source/config/win \ | |
350 | tools/mac \ | |
351 | tools/win \ | |
352 | _ui/base/win \ | |
353 | ui/gfx/mac \ | |
354 | ui/views/win \ | |
355 | webkit/tools/test_shell/mac \ | |
f888c710 ER |
356 | ; do |
357 | rm -vfr "$dir" | |
358 | done | |
359 | } | |
360 | ||
99f39995 ER |
361 | # Strip tarball from some big directories not needed on the linux platform |
362 | strip_dirs() { | |
363 | # prefix with _ those that we can't remove (just yet) because of the gclient | |
364 | # hooks (see build/all.gyp) or of some unneeded deps/includes | |
f888c710 | 365 | |
99f39995 ER |
366 | local dir |
367 | for dir in \ | |
368 | chrome/test/data/safe_browsing/old \ | |
369 | chrome/test/data/firefox2_nss_mac \ | |
370 | chrome/third_party/wtl/ \ | |
371 | gears \ | |
372 | google_update \ | |
df52e8c0 | 373 | gpu/demos \ |
99f39995 ER |
374 | o3d \ |
375 | third_party/boost \ | |
376 | third_party/bsdiff \ | |
377 | third_party/bspatch \ | |
378 | third_party/ffmpeg/binaries \ | |
379 | third_party/fuzzymatch \ | |
380 | third_party/gles_book_examples \ | |
3a0be9f8 | 381 | third_party/gold \ |
99f39995 ER |
382 | third_party/hunspell/dictionaries \ |
383 | third_party/icu/mac \ | |
384 | third_party/lcov \ | |
385 | third_party/lighttpd \ | |
386 | third_party/nspr \ | |
387 | third_party/nss \ | |
388 | third_party/ocmock \ | |
389 | third_party/pthread \ | |
390 | third_party/pyftpdlib \ | |
391 | third_party/simplejson \ | |
392 | third_party/scons \ | |
393 | _third_party/tcmalloc \ | |
394 | tools/symsrc \ | |
395 | tools/site_compare \ | |
396 | tools/stats_viewer \ | |
397 | tools/valgrind \ | |
398 | tools/wine_valgrind \ | |
399 | v8/test/cctest \ | |
400 | webkit/data/layout_tests \ | |
401 | ; do | |
402 | rm -vfr "$dir" | |
403 | done | |
404 | } | |
405 | ||
406 | # parts based on ubuntu debian/rules | |
407 | # http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-browser.head/view/head:/debian/rules | |
408 | ||
409 | remove_bin_only() { | |
410 | find . -type f \( \ | |
411 | -iname \*.exe -o \ | |
412 | -iname \*.dll -o \ | |
413 | -iname \*.pdb -o \ | |
414 | -name \*.o -o \ | |
415 | -name \*.a -o \ | |
416 | -name \*.dylib \ | |
417 | \) -exec rm -fv {} \; | |
418 | } | |
419 | ||
420 | # removes dir, if the bcond is not turned off | |
421 | strip_system_dirs() { | |
422 | local dir lib bcond | |
423 | for dir in "$@"; do | |
424 | lib=${dir##*/} | |
425 | bcond=$(eval echo \$$lib) | |
cd09b941 | 426 | [ "${bcond:-1}" = 0 ] && continue |
99f39995 ER |
427 | |
428 | # skip already removed dirs | |
429 | test -d $dir || continue | |
430 | ||
431 | # here we ignore errors, as some dirs contain README.chromium after removal | |
8f5f6775 | 432 | find $dir -depth -mindepth 1 \! \( -name '*.gyp' -o -name '*.gypi' -o -name README.chromium -o -name '*.patch' -o -path $dir/$lib.h \) -print -delete || : |
99f39995 ER |
433 | done |
434 | } | |
435 | ||
436 | # There are directories we want to strip, but that are unnecessarily required by the build-system | |
437 | # So we drop everything but the gyp/gypi files and README.chromium (to see what that dir contained) | |
438 | almost_strip_dirs() { | |
439 | local dir | |
440 | for dir in "$@"; do | |
8f5f6775 | 441 | find $dir -depth -mindepth 1 \! \( -name '*.gyp' -o -name '*.gypi' -o -name README.chromium \) -print -delete || : |
99f39995 ER |
442 | done |
443 | } | |
444 | ||
445 | remove_nonessential_dirs | tee -a REMOVED-nonessential_dirs.txt | |
446 | remove_bin_only | tee -a REMOVED-bin_only.txt | |
447 | ||
448 | strip_dirs | tee -a REMOVED-stripped.txt | |
449 | ||
450 | almost_strip_dirs \ | |
451 | courgette \ | |
ed4bcb92 | 452 | chrome/test/data \ |
99f39995 ER |
453 | third_party/gles2_book \ |
454 | | tee -a REMOVED-stripped.txt | |
455 | ||
456 | strip_system_dirs \ | |
31187203 | 457 | native_client/src/third_party_mod/jsoncpp \ |
99f39995 | 458 | third_party/bzip2 \ |
31187203 | 459 | third_party/flac \ |
99f39995 | 460 | third_party/icu \ |
31187203 | 461 | third_party/jsoncpp \ |
99f39995 | 462 | third_party/libevent \ |
07d26a0d | 463 | third_party/libexif \ |
99f39995 | 464 | third_party/libjpeg \ |
07d26a0d | 465 | third_party/libmtp \ |
99f39995 | 466 | third_party/libpng \ |
3ee15dec | 467 | third_party/libsrtp \ |
581aec44 | 468 | third_party/libusb \ |
31187203 ER |
469 | _third_party/libvpx \ |
470 | third_party/libwebp \ | |
2a97b574 | 471 | third_party/libxml \ |
99f39995 | 472 | third_party/libxslt \ |
07d26a0d | 473 | third_party/opus \ |
ed514974 | 474 | third_party/speex \ |
2a97b574 | 475 | third_party/zlib \ |
99f39995 ER |
476 | v8 \ |
477 | | tee -a REMOVED-stripped.txt | |
598df428 | 478 | |
1dd58211 ER |
479 | # vpx can't be cleaned: |
480 | #make: *** No rule to make target `out/Release/obj.target/libvpx_asm_offsets/third_party/libvpx/source/libvpx/vp8/common/asm_com_offsets.o', | |
481 | #needed by `out/Release/obj.target/third_party/libvpx/libvpx_asm_offsets.a'. Stop. | |
482 | ||
30ab5de0 | 483 | # third_party/yasm/source/patched-yasm/modules/arch/x86/gen_x86_insn.py', needed by `out/Release/obj/gen/third_party/yasm/x86insns.c'. Stop. |
598df428 | 484 | #gyp_clean third_party/yasm |
fe547a32 | 485 | |
99f39995 | 486 | rm -vf third_party/expat/files/lib/expat.h |
fe547a32 | 487 | |
cd09b941 | 488 | if [ "${v8:-1}" != "0" ]; then |
fe547a32 ER |
489 | # The implementation files include v8 headers with full path, |
490 | # like #include "v8/include/v8.h". Make sure the system headers | |
491 | # will be used. | |
598df428 | 492 | rm -rf v8/include |
fe547a32 ER |
493 | ln -s /usr/include v8/include |
494 | fi | |
495 | ||
cd09b941 | 496 | if [ "${nacl:-1}" != "0" ]; then |
fe547a32 ER |
497 | # NOTE: here is always x86_64 |
498 | rm -rf native_client/toolchain/linux_x86_newlib | |
fe547a32 | 499 | fi |