added expect and tcl
[platform/upstream/binutils.git] / .Sanitize
1 # .Sanitize for devo.
2
3 # Each directory to survive it's way into a release will need a file
4 # like this one called "./.Sanitize".  All keyword lines must exist,
5 # and must exist in the order specified by this file.  Each directory
6 # in the tree will be processed, top down, in the following order.
7
8 # Hash started lines like this one are comments and will be deleted
9 # before anything else is done.  Blank lines will also be squashed
10 # out.
11
12 # The lines between the "Do-first:" line and the "Things-to-keep:"
13 # line are executed as a /bin/sh shell script before anything else is
14 # done in this directory.
15
16 Do-first:
17
18 # All files listed between the "Things-to-keep:" line and the
19 # "Do-last:" line will be kept.  All other files will be removed.
20 # Directories listed in this section will have their own Sanitize
21 # called.  Directories not listed will be removed in their entirety
22 # with rm -rf.
23
24 Things-to-keep:
25
26 .cvsignore
27 COPYING
28 COPYING.LIB
29 CYGNUS
30 ChangeLog
31 INSTALL
32 Makefile.in
33 README
34 SUPPORTED
35 autoconf
36 bfd
37 binutils
38 byacc
39 cfg-paper.texi
40 config
41 config.sub
42 configure
43 configure.bat
44 configure.in
45 configure.man
46 configure.texi
47 cvs
48 deja-gnu
49 diff
50 emacs
51 expect
52 flex
53 gas
54 gcc
55 gdb
56 gdbm
57 gdbtest
58 glob
59 gprof
60 grep
61 include
62 install.texinfo
63 ispell
64 ld
65 libg++
66 libgcc
67 libiberty
68 make
69 mmalloc
70 move-if-change
71 newlib
72 opcodes
73 patch
74 prms
75 rcs
76 readline
77 send_pr
78 standards.texi
79 tcl
80 test-build.mk
81 texinfo
82 tgas
83
84 # The lines between the "Do-last:" line and the end of the file
85 # are executed as a /bin/sh shell script after everything else is
86 # done.
87
88 Do-last:
89
90 echo Looking for signs of \"v9\"...
91
92 # Don't try to clean directories here, as the 'mv' command will fail.
93 # Also, grep fails on NFS mounted directories.
94 if ( echo $* | grep keep\-v9 > /dev/null ) ; then
95         for i in * ; do
96                 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
97                         echo Keeping v9 stuff in $i
98                 fi
99         done
100 else
101         for i in * ; do
102                 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
103                         echo Cleaning the \"v9\" out of $i...
104                         cp $i new
105                         sed '/start\-sanitize\-v9/,/end-\sanitize\-v9/d' < $i > new
106                         if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
107                                 mv $i .Recover
108                         fi
109                         mv new $i
110                 fi
111         done
112 fi
113
114 for i in * ; do
115         if test ! -d $i && (grep sanitize $i > /dev/null) ; then
116                 echo Some mentions of Sanitize are still left in $i!
117         fi
118 done
119
120 # eof