New file.
[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 NEWS
34 README
35 TODO
36 a29k.sc-sh
37 a29k.sh
38 aout.sc-sh
39 aout-mipsbsd.sc-sh
40 cdtest-foo.cc
41 cdtest-foo.h
42 cdtest-func.cc
43 cdtest-main.cc
44 cdtest.exp
45 config
46 config.h
47 configure.bat
48 configure.in
49 ebmon29k.sc-sh
50 ebmon29k.sh
51 generic.em
52 genscripts.sh
53 h8-doc.texi
54 ld.1
55 gen-doc.texi
56 gld960.em
57 gld960.sh
58 go32.sh
59 hp300bsd.sh
60 hp3hpux.sh
61 hppaosf.em
62 hppaosf.sc-sh
63 hppaosf.sh
64 h8300hms.em
65 h8300hms.sc-sh
66 h8300hms.sh
67 h8500hms.em
68 h8500hms.sc-sh
69 h8500hms.sh
70 i386aout.sh
71 i386bsd.sh
72 i386coff.sc-sh
73 i386coff.sh
74 i960.sc-sh
75 ld.h
76 ld.texinfo
77 ldctor.c
78 ldctor.h
79 ldemul.c
80 ldemul.h
81 lderror.c
82 lderror.h
83 ldexp.c
84 ldexp.h
85 ldfile.c
86 ldfile.h
87 ldgram.y
88 ldindr.c
89 ldindr.h
90 ldint.texinfo
91 ldlang.c
92 ldlang.h
93 ldlex.h
94 ldlex.l
95 ldmain.c
96 ldmain.h
97 ldmisc.c
98 ldmisc.h
99 ldsym.c
100 ldsym.h
101 ldver.c
102 ldver.h
103 ldwarn.c
104 ldwarn.h
105 ldwrite.c
106 ldwrite.h
107 lexsup.c
108 lnk960.em
109 lnk960.sh
110 m68kcoff.sc-sh
111 m68kcoff.sh
112 m88kbcs.sc-sh
113 m88kbcs.sh
114 mips.sc-sh
115 mipsbig.sh
116 mipsbsd.sh
117 mipsidt.sh
118 mipslit.sh
119 mri.c
120 mri.h
121 go32.sh
122 mkscript.c
123 news.sh
124 relax.c
125 relax.h
126 sh.em
127 sh.sc-sh
128 sh.sh
129 st2000.em
130 st2000.sc-sh
131 st2000.sh
132 sa29200.sc-sh
133 sa29200.sh
134 scripts
135 sun3.sh
136 sun4.sh
137 vanilla.em
138 vanilla.sc-sh
139 vanilla.sh
140 vax.sh
141 z8ksim.em
142 z8ksim.sc-sh
143 z8ksim.sh
144
145 Do-last:
146
147 echo Looking for signs of \"v9\"...
148
149 # Don't try to clean directories here, as the 'mv' command will fail.
150 # Also, grep fails on NFS mounted directories.
151 if ( echo $* | grep keep\-v9 > /dev/null ) ; then
152 for i in * ; do
153 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
154 echo Keeping v9 stuff in $i
155 fi
156 done
157 else
158 for i in * ; do
159 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
160 echo Cleaning the \"v9\" out of $i...
161 cp $i new
162 sed '/start\-sanitize\-v9/,/end-\sanitize\-v9/d' < $i > new
163 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
164 echo Caching $i in .Recover...
165 mv $i .Recover
166 fi
167 mv new $i
168 fi
169 done
170 fi
171
172 # End of file.