]> git.pld-linux.org Git - packages/apache-mod_pagespeed.git/blame - clean-source.sh
- added system-protobuf patch to use system protobuf; but build still fails due to...
[packages/apache-mod_pagespeed.git] / clean-source.sh
CommitLineData
81c4dc24
ER
1#!/bin/sh
2set -xe
3
4# There are directories we want to strip, but that are unnecessarily required by the build-system
5# So we drop everything but the gyp/gypi files
6almost_strip_dirs() {
7 for dir in "$@"; do
8 find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' ')' -print -delete || :
9 done
10}
11
12export LC_ALL=C
13
14# clean sources, but preserve .gyp, .gypi
15almost_strip_dirs \
16 third_party/apr/ \
17 third_party/httpd/ \
18 third_party/httpd24/ \
19 third_party/instaweb/ \
20 third_party/openssl/ \
d1259ece
ER
21 third_party/chromium/src/base/third_party/superfasthash/ \
22 third_party/chromium/src/base/third_party/symbolize/ \
23 third_party/chromium/src/base/third_party/xdg_mime/ \
24 third_party/chromium/src/base/third_party/xdg_user_dirs/ \
81c4dc24
ER
25
26# some more unneeded files for build
81c4dc24 27rm -r net/instaweb/rewriter/testdata
d1259ece
ER
28rm -r third_party/aprutil/gen
29rm -r third_party/chromium/src/base/test
d1259ece
ER
30rm -r third_party/chromium/src/net
31rm -r third_party/gflags/src/windows
32rm -r third_party/giflib/windows
33rm -r third_party/google-sparsehash/src/windows
34rm -r third_party/libjpeg_turbo/src/{mac,win}
35rm -r third_party/protobuf/java
36rm -r third_party/protobuf/src/google/protobuf/testdata
37rm -r third_party/zlib/{contrib,examples,old,doc}
38rm -r third_party/zlib/{win32,msdos,nintendods,watcom,qnx,amiga}
39
40find -type d -name testdata | xargs rm -r
41find -type d -name mac | xargs rm -r
42find -type d -name win | xargs rm -r
12ba1b2b 43find -depth -type d -name test | xargs rm -rv
d1259ece
ER
44find third_party -type d -name android | xargs rm -r
45
46find -type f -name '*_test.cc' | xargs rm
47find -type f -name '*_unittest.cc' | xargs rm
48
49# not using gn nor ninja
50find -name BUILD.gn | xargs rm
51
52# cleanup empty dirs
53find -type d '!' -name '.' -print0 | sort -zr | xargs -0 rmdir --ignore-fail-on-non-empty
81c4dc24 54
d1259ece
ER
55# build/linux and third_party/chromium/src/build/linux are same dirs,
56# the later is not used by build system, but used by tarball packaging
81c4dc24
ER
57#rm -r third_party/chromium/src/build/linux
58#third_party/chromium/src/build/linux
This page took 0.093397 seconds and 4 git commands to generate.