* Makefile.in: Change definition of $(tooldir) to match FSF.
[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 h8300hms.em
60 h8300hms.sc-sh
61 h8300hms.sh
62 h8500hms.em
63 h8500hms.sc-sh
64 h8500hms.sh
65 i386aout.sh
66 i386bsd.sh
67 i386coff.sc-sh
68 i386coff.sh
69 i960.sc-sh
70 ld.h
71 ld.texinfo
72 ldctor.c
73 ldctor.h
74 ldemul.c
75 ldemul.h
76 lderror.c
77 lderror.h
78 ldexp.c
79 ldexp.h
80 ldfile.c
81 ldfile.h
82 ldgram.y
83 ldindr.c
84 ldindr.h
85 ldint.texinfo
86 ldlang.c
87 ldlang.h
88 ldlex.h
89 ldlex.l
90 ldmain.c
91 ldmain.h
92 ldmisc.c
93 ldmisc.h
94 ldsym.c
95 ldsym.h
96 ldver.c
97 ldver.h
98 ldwarn.c
99 ldwarn.h
100 ldwrite.c
101 ldwrite.h
102 lexsup.c
103 lnk960.em
104 lnk960.sh
105 m68kcoff.sc-sh
106 m68kcoff.sh
107 m88kbcs.sc-sh
108 m88kbcs.sh
109 mips.sc-sh
110 mipsbig.sh
111 mipsbsd.sh
112 mipsidt.sh
113 mipslit.sh
114 mri.c
115 mri.h
116 go32.sh
117 mkscript.c
118 news.sh
119 relax.c
120 relax.h
121 sh.em
122 sh.sc-sh
123 sh.sh
124 st2000.em
125 st2000.sc-sh
126 st2000.sh
127 sa29200.sc-sh
128 sa29200.sh
129 scripts
130 sun3.sh
131 sun4.sh
132 vanilla.em
133 vanilla.sc-sh
134 vanilla.sh
135 vax.sh
136 z8ksim.em
137 z8ksim.sc-sh
138 z8ksim.sh
139
140 Do-last:
141
142 echo Looking for signs of \"v9\"...
143
144 # Don't try to clean directories here, as the 'mv' command will fail.
145 # Also, grep fails on NFS mounted directories.
146 if ( echo $* | grep keep\-v9 > /dev/null ) ; then
147 for i in * ; do
148 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
149 echo Keeping v9 stuff in $i
150 fi
151 done
152 else
153 for i in * ; do
154 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
155 echo Cleaning the \"v9\" out of $i...
156 cp $i new
157 sed '/start\-sanitize\-v9/,/end-\sanitize\-v9/d' < $i > new
158 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
159 echo Caching $i in .Recover...
160 mv $i .Recover
161 fi
162 mv new $i
163 fi
164 done
165 fi
166
167 # End of file.