New file used for rebuilding dependencies.
[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
32 ChangeLog
33 Makefile.in
34 NEWS
35 README
36 TODO
37 cdtest-foo.cc
38 cdtest-foo.h
39 cdtest-func.cc
40 cdtest-main.cc
41 cdtest.exp
42 config
43 config.h
44 configure.bat
45 configure.in
46 dep-in.sed
47 emulparams
48 emultempl
49 genscripts.sh
50 h8-doc.texi
51 ld.1
52 gen-doc.texi
53 ld.h
54 ld.texinfo
55 ldctor.c
56 ldctor.h
57 ldemul.c
58 ldemul.h
59 lderror.c
60 lderror.h
61 ldexp.c
62 ldexp.h
63 ldfile.c
64 ldfile.h
65 ldgram.y
66 ldindr.c
67 ldindr.h
68 ldint.texinfo
69 ldlang.c
70 ldlang.h
71 ldlex.h
72 ldlex.l
73 ldmain.c
74 ldmain.h
75 ldmisc.c
76 ldmisc.h
77 ldsym.c
78 ldsym.h
79 ldver.c
80 ldver.h
81 ldwarn.c
82 ldwarn.h
83 ldwrite.c
84 ldwrite.h
85 lexsup.c
86 mri.c
87 mri.h
88 relax.c
89 relax.h
90 scripttempl
91
92 Things-to-lose:
93
94 Do-last:
95
96 echo Looking for signs of \"v9\"...
97
98 # Don't try to clean directories here, as the 'mv' command will fail.
99 # Also, grep fails on NFS mounted directories.
100 if ( echo $* | grep keep\-v9 > /dev/null ) ; then
101 for i in * ; do
102 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
103 echo Keeping v9 stuff in $i
104 fi
105 done
106 else
107 for i in * ; do
108 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
109 echo Cleaning the \"v9\" out of $i...
110 cp $i new
111 sed '/start\-sanitize\-v9/,/end-\sanitize\-v9/d' < $i > new
112 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
113 echo Caching $i in .Recover...
114 mv $i .Recover
115 fi
116 mv new $i
117 fi
118 done
119 fi
120
121 # End of file.