Debian Codegraph @

scripts/CLEANUP

raw
1 #!/bin/bash
2 # CLEANUP
3 # This is not really needed, as autogen.sh updates
4 # what needs to be updated,
5 # And if all built in-tree 'make maintainer-clean'
6 # does a good job. But this does a lot towards cleanup.
7
8 chkisdir() {
9 if [ ! -d $1 ]
10 then
11 echo "The directory $1 is not found"
12 echo "we are in the wrong directory to run scripts/CLEANUP"
13 exit 1
14 fi
15 }
16
17 chkisdir scripts
18 chkisdir test
19 chkisdir doc
20 chkisdir src/lib/libdwarf
21 chkisdir src/bin/dwarfdump
22 chkisdir src/bin/dwarfexample
23
24 l=`pwd`
25 #echo "Now at $l"
26 #echo "sloc $sloc"
27
28 # Won't work unless configure was done.
29 # in the source tree.
30 if [ -f Makefile ]
31 then
32 make maintainer-clean
33 fi
34
35 # Some unlikely but possible files no one wants:
36
37 rm -f src/bin/dwarfgen/configure.lineno
38 rm -f junk* */junk*
39 rm -f *~ */*~
40 rm -rf autom4te.cache/
41
42 #Leftovers from building in-tree.
43 for i in src/bin/dwarfdump/dwarfdump src/bin/dwarfexample/dwdebuglink \
44 src/bin/dwarfexample/findfuncbypc src/bin/dwarfexample/frame1 \
45 src/bin/dwarfexample/simplereader test/runtestdd.sh.log \
46 test/runtestdd.sh.trs test/runtestsexample.sh.log \
47 test/runtestsexample.sh.trs test/test_dwarfstring \
48 test/test_dwarfstring.log test/test_dwarfstring.trs \
49 test/test_dwgetopt test/test_dwgetopt.log \
50 test/test_dwgetopt.trs test/test_extra_flag_strings \
51 test/test_extra_flag_strings.log test/test_extra_flag_strings.trs \
52 test/test_headersok test/test_headersok.log \
53 test/test_headersok.trs test/test_helpertree \
54 test/test_helpertree.log test/test_helpertree.trs \
55 test/test_linkedtopath test/test_linkedtopath.log \
56 test/test_linkedtopath.trs test/test_macrocheck \
57 test/test_macrocheck.log test/test_macrocheck.trs \
58 test/test_makenametest test/test_makenametest.log \
59 test/test_makenametest.trs test/test_sectionbitmaps \
60 test/test_sectionbitmaps.log test/test_sectionbitmaps.trs \
61 test/test_testesb test/test_testesb.log \
62 test/test_testesb.trs test/dwarfdump.conf
63 do
64 rm -f $i
65 done
66
67 #Leftovers from autoreconf /autogen.sh
68 for i in junk* *~ cscope.files TAGS *.exe *.lo *.la .dirstamp \
69 aclocal.m4 \
70 ar-lib compile config.guess config.h config.h.in config.log config.sub \
71 configure config.status depcomp install-sh libdwarf.pc libtool ltmain.sh \
72 m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 \
73 missing stamp-h1 test-driver test-suite.log
74 do
75 rm -f $i
76 done
77
78 rm -f doc/Makefile
79 rm -f doc/Makefile.in
80 rm -f test-driver
81 rm -f test/junk.debuglink1
82 rm -f test/junk.debuglink1a
83 rm -f test/junk.debuglink1b
84 rm -f test/junk.debuglink1sed1
85 rm -f test/junk.debuglink1sed2
86 rm -f test/junk.debuglink2
87 rm -f test/junk.debuglink2a
88 rm -f test/junk.debuglink2b
89
90 for i in Makefile Makefile.in
91 do
92 for d in . test src/bin/dwarfdump src/bin/dwarfgen src/bin/dwarfexample \
93 src/lib/libdwarf
94 do
95 rm -f $d/$i
96 done
97 done
98
99 for dl in CMakeFiles/ Testing/ src/bin/dwarfdump/CMakeFiles/ src/lib/libdwarf/CMakeFiles/ test/CMakeFiles/
100 do
101 rm -rf $dl
102 done
103 for fi in CMakeCache.txt CTestTestfile.cmake cmake_install.cmake src/bin/dwarfdump/CTestTestfile.cmake src/bin/dwarfdump/cmake_install.cmake src/lib/libdwarf/CTestTestfile.cmake src/lib/libdwarf/cmake_install.cmake test/CTestTestfile.cmake test/cmake_install.cmake test/selfesb test/selfgetopttest test/selfhelpertree test/selfleb test/selfmakename test/selfmc test/selfsectionbitmaps test/selftestesb test/selftied test/teststring
104 do
105 rm -f $fi
106 done
107