keep new files; get rid of trailing spaces after sh-support file names
[binutils-gdb.git] / ld / .Sanitize
1 # Sanitize.in for devo.
2 # $Id$
3 #
4
5 # Each directory to survive it's way into a release will need a file
6 # like this one called "./.Sanitize". All keyword lines must exist,
7 # and must exist in the order specified by this file. Each directory
8 # in the tree will be processed, top down, in the following order.
9
10 # Hash started lines like this one are comments and will be deleted
11 # before anything else is done. Blank lines will also be squashed
12 # out.
13
14 # The lines between the "Do-first:" line and the "Things-to-keep:"
15 # line are executed as a /bin/sh shell script before anything else is
16 # done in this
17
18 Do-first:
19
20 if ( echo $* | grep keep\-v9 > /dev/null ) ; then
21 keep_these_too=""
22 fi
23
24 # All files listed between the "Things-to-keep:" line and the
25 # "Files-to-sed:" line will be kept. All other files will be removed.
26 # Directories listed in this section will have their own Sanitize
27 # called. Directories not listed will be removed in their entirety
28 # with rm -rf.
29
30 Things-to-keep:
31 ChangeLog
32 Makefile.in
33 README
34 TODO
35 a29k.sc-sh
36 a29k.sh
37 aout.sc-sh
38 aout-mipsbsd.sc-sh
39 cdtest-foo.cc
40 cdtest-foo.h
41 cdtest-func.cc
42 cdtest-main.cc
43 cdtest.exp
44 config
45 config.h
46 configure.bat
47 configure.in
48 ebmon29k.sc-sh
49 ebmon29k.sh
50 generic.em
51 genscripts.sh
52 h8-doc.texi
53 ld.1
54 gen-doc.texi
55 gld960.em
56 gld960.sh
57 go32.sh
58 hp300bsd.sh
59 hp3hpux.sh
60 hppaosf.em
61 hppaosf.sc-sh
62 hppaosf.sh
63 h8300hms.em
64 h8300hms.sc-sh
65 h8300hms.sh
66 h8500hms.em
67 h8500hms.sc-sh
68 h8500hms.sh
69 i386aout.sh
70 i386bsd.sh
71 i386coff.sc-sh
72 i386coff.sh
73 i960.sc-sh
74 ld.h
75 ld.texinfo
76 ldctor.c
77 ldctor.h
78 ldemul.c
79 ldemul.h
80 lderror.c
81 lderror.h
82 ldexp.c
83 ldexp.h
84 ldfile.c
85 ldfile.h
86 ldgram.y
87 ldindr.c
88 ldindr.h
89 ldint.texinfo
90 ldlang.c
91 ldlang.h
92 ldlex.h
93 ldlex.l
94 ldmain.c
95 ldmain.h
96 ldmisc.c
97 ldmisc.h
98 ldsym.c
99 ldsym.h
100 ldver.c
101 ldver.h
102 ldwarn.c
103 ldwarn.h
104 ldwrite.c
105 ldwrite.h
106 lexsup.c
107 lnk960.em
108 lnk960.sh
109 m68kcoff.sc-sh
110 m68kcoff.sh
111 m88kbcs.sc-sh
112 m88kbcs.sh
113 mips.sc-sh
114 mipsbig.sh
115 mipsbsd.sh
116 mipsidt.sh
117 mipslit.sh
118 mri.c
119 mri.h
120 go32.sh
121 mkscript.c
122 news.sh
123 relax.c
124 relax.h
125 sh.em
126 sh.sc-sh
127 sh.sh
128 st2000.em
129 st2000.sc-sh
130 st2000.sh
131 sa29200.sc-sh
132 sa29200.sh
133 scripts
134 sun3.sh
135 sun4.sh
136 vanilla.em
137 vanilla.sc-sh
138 vanilla.sh
139 vax.sh
140 z8ksim.em
141 z8ksim.sc-sh
142 z8ksim.sh
143
144 Do-last:
145
146 echo Looking for signs of \"v9\"...
147
148 # Don't try to clean directories here, as the 'mv' command will fail.
149 # Also, grep fails on NFS mounted directories.
150 if ( echo $* | grep keep\-v9 > /dev/null ) ; then
151 for i in * ; do
152 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
153 echo Keeping v9 stuff in $i
154 fi
155 done
156 else
157 for i in * ; do
158 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
159 echo Cleaning the \"v9\" out of $i...
160 cp $i new
161 sed '/start\-sanitize\-v9/,/end-\sanitize\-v9/d' < $i > new
162 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
163 echo Caching $i in .Recover...
164 mv $i .Recover
165 fi
166 mv new $i
167 fi
168 done
169 fi
170
171 # End of file.