* gdb.base/Makefile.in (MISCELLANEOUS): new macros -- extra things
[deliverable/binutils-gdb.git] / gdb / testsuite / .Sanitize
1 # .Sanitize for devo/gdb/testsuite.
2
3 # Each directory to survive its 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 gdbtk_files="gdb.gdbtk"
19
20 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
21 lose_these_too="${gdbtk_files} ${lose_these_too}"
22 if [ -n "${verbose}" ] ; then
23 echo Deleting ${gdbtk_files}
24 fi
25 else
26 keep_these_too="${gdbtk_files} ${keep_these_too}"
27 if [ -n "${verbose}" ] ; then
28 echo Keeping ${gdbtk_files}
29 fi
30 fi
31
32 # All files listed between the "Things-to-keep:" line and the
33 # "Do-last:" line will be kept. All other files will be removed.
34 # Directories listed in this section will have their own Sanitize
35 # called. Directories not listed will be removed in their entirety
36 # with rm -rf.
37
38 Things-to-keep:
39
40 .gdbinit
41 ChangeLog
42 Makefile.in
43 TODO
44 aclocal.m4
45 config
46 configure
47 configure.in
48 gdb.asm
49 gdb.base
50 gdb.c++
51 gdb.chill
52 gdb.disasm
53 gdb.fortran
54 gdb.stabs
55 gdb.threads
56 gdb.trace
57 lib
58
59 Things-to-lose:
60
61 # The lines between the "Do-last:" line and the end of the file
62 # are executed as a /bin/sh shell script after everything else is
63 # done.
64
65 Do-last:
66
67 never_files="ChangeLog"
68 for i in $never_files ; do
69 if test ! -d $i && (grep sanitize-cygnus-never $i > /dev/null) ; then
70 if [ -n "${verbose}" ] ; then
71 echo Removing traces of \"cygnus-never\" from $i...
72 fi
73 cp $i new
74 sed '/start\-sanitize\-cygnus-never/,/end\-sanitize\-cygnus-never/d' < $i > new
75 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
76 if [ -n "${verbose}" ] ; then
77 echo Caching $i in .Recover...
78 fi
79 mv $i .Recover
80 fi
81 mv new $i
82 fi
83 done
84
85 am33_files="ChangeLog"
86 if ( echo $* | grep keep\-am33 > /dev/null ) ; then
87 for i in $am33_files ; do
88 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
89 if [ -n "${verbose}" ] ; then
90 echo Keeping am33 stuff in $i
91 fi
92 fi
93 done
94 else
95 for i in $am33_files ; do
96 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
97 if [ -n "${verbose}" ] ; then
98 echo Removing traces of \"am33\" from $i...
99 fi
100 cp $i new
101 sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/d' < $i > new
102 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
103 if [ -n "${verbose}" ] ; then
104 echo Caching $i in .Recover...
105 fi
106 mv $i .Recover
107 fi
108 mv new $i
109 fi
110 done
111 fi
112
113 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
114 echo Catering to RMS by removing traces of \"gdbtk\"...
115 for i in * ; do
116 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
117 echo Removing traces of \"gdbtk\" out of $i...
118 cp $i new
119 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
120 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
121 echo Caching $i in .Recover...
122 mv $i .Recover
123 fi
124 mv new $i
125 fi
126 done
127 else
128 echo Leaving \"gdbtk\" in the sources...
129 for i in * ; do
130 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
131 echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines...
132 cp $i new
133 sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new
134 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
135 echo Caching $i in .Recover...
136 mv $i .Recover
137 fi
138 mv new $i
139 fi
140 done
141 fi
142
143 for i in * ; do
144 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
145 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
146 fi
147 done
148
149 # eof
This page took 0.033576 seconds and 4 git commands to generate.