summaryrefslogtreecommitdiff
path: root/build/clean.sh
blob: b5b9c320fa06d18b152d09afe0da71cfd33d9a8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh

if [ \! -f build/version ]; then
    echo 'Must run the clean script from the top-level dir of the libarchive distribution' 1>&2
    exit 1
fi

#
# The automake-generated 'maintainer-clean' target does clean up a
# lot.  If that fails, try plain 'clean' in case we're using the cmake
# or other makefile.  But don't worry if we can't...
#
make maintainer-clean || make clean || true

# If we're on BSD, blow away the build dir under /usr/obj
rm -rf /usr/obj`pwd`

#
# Try to clean up a bit more...
#
find . -name '*~' | xargs rm
find . -name '*.rej' | xargs rm
find . -name '*.orig' | xargs rm
find . -name '*.o' | xargs rm
find . -name '*.po' | xargs rm
find . -name '*.lo' | xargs rm
find . -name '*.So' | xargs rm
find . -name '*.a' | xargs rm
find . -name '*.la' | xargs rm
find . -name '.depend' | xargs rm
find . -name '.dirstamp' | xargs rm
find . -name '.deps' | xargs rm -rf
find . -name '.libs' | xargs rm -rf
rm -rf autom4te.cache
rm -f bsdcpio bsdcpio_test bsdtar bsdtar_test libarchive_test
rm -f libtool aclocal.m4 config.h config.h.in
rm -f doc/man/* doc/pdf/* doc/wiki/* doc/html/* doc/text/*
rm -f config.log Makefile.in configure config.status stamp-h1
rm -f libarchive/*.[35].gz libarchive/libarchive.so*
rm -f libarchive/test/libarchive_test libarchive/test/list.h
rm -f tar/*.1.gz tar/bsdtar tar/test/bsdtar_test tar/test/list.h
rm -f cpio/*.1.gz cpio/bsdcpio cpio/test/bsdcpio_test cpio/test/list.h
rm -f build/autoconf/compile build/autoconf/config.* build/autoconf/ltmain.sh
rm -f build/autoconf/install-sh build/autoconf/depcomp build/autoconf/missing
rm -f build/pkgconfig/libarchive.pc