]>
Commit | Line | Data |
---|---|---|
764eb349 | 1 | # .Sanitize for devo/ld. |
86e4d6e4 | 2 | |
747a47f2 | 3 | # Each directory to survive its way into a release will need a file |
86e4d6e4 RP |
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 | |
747a47f2 | 14 | # done in this directory. |
86e4d6e4 RP |
15 | |
16 | Do-first: | |
17 | ||
d9c2980f DE |
18 | if ( echo $* | grep keep\-v9 > /dev/null ) ; then |
19 | keep_these_too="" | |
20 | fi | |
86e4d6e4 | 21 | |
747a47f2 | 22 | if ( echo $* | grep keep\-mpw > /dev/null ) ; then |
764eb349 | 23 | keep_these_too="mpw-config.in mpw-make.in ChangeLog.mpw ${keep_these_too}" |
747a47f2 | 24 | else |
764eb349 | 25 | lose_these_too="mpw-config.in mpw-make.in ChangeLog.mpw ${lose_these_too}" |
747a47f2 SS |
26 | fi |
27 | ||
28 | if ( echo $* | grep keep\-gm > /dev/null ) ; then | |
29 | keep_these_too="mpw-xconfig.in mpw-em.c ChangeLog.gm ${keep_these_too}" | |
30 | else | |
31 | lose_these_too="mpw-xconfig.in mpw-em.c ChangeLog.gm ${lose_these_too}" | |
32 | fi | |
33 | ||
86e4d6e4 RP |
34 | # All files listed between the "Things-to-keep:" line and the |
35 | # "Files-to-sed:" line will be kept. All other files will be removed. | |
36 | # Directories listed in this section will have their own Sanitize | |
37 | # called. Directories not listed will be removed in their entirety | |
38 | # with rm -rf. | |
39 | ||
40 | Things-to-keep: | |
87756e15 | 41 | |
5784123f | 42 | ChangeLog |
86e4d6e4 | 43 | Makefile.in |
bc3b479c | 44 | NEWS |
c3d97ef6 | 45 | README |
fbd74d07 | 46 | TODO |
917bffa7 PB |
47 | cdtest-foo.cc |
48 | cdtest-foo.h | |
49 | cdtest-func.cc | |
50 | cdtest-main.cc | |
51 | cdtest.exp | |
86e4d6e4 | 52 | config |
5f1fec76 | 53 | config.h |
65aa3724 | 54 | configure.bat |
86e4d6e4 | 55 | configure.in |
f8083739 | 56 | dep-in.sed |
2b63dbfe DM |
57 | emulparams |
58 | emultempl | |
c3d97ef6 | 59 | genscripts.sh |
2412a768 | 60 | h8-doc.texi |
40ab8532 | 61 | ld.1 |
2412a768 | 62 | gen-doc.texi |
5f1fec76 SC |
63 | ld.h |
64 | ld.texinfo | |
ffa057ee | 65 | ldctor.c |
1cc27b5e | 66 | ldctor.h |
c3d97ef6 PB |
67 | ldemul.c |
68 | ldemul.h | |
5f1fec76 SC |
69 | ldexp.c |
70 | ldexp.h | |
71 | ldfile.c | |
5f1fec76 | 72 | ldfile.h |
5f1fec76 | 73 | ldgram.y |
4b91c519 | 74 | ldint.texinfo |
5f1fec76 SC |
75 | ldlang.c |
76 | ldlang.h | |
77 | ldlex.h | |
78 | ldlex.l | |
5f1fec76 SC |
79 | ldmain.c |
80 | ldmain.h | |
81 | ldmisc.c | |
82 | ldmisc.h | |
5f1fec76 SC |
83 | ldver.c |
84 | ldver.h | |
5f1fec76 SC |
85 | ldwrite.c |
86 | ldwrite.h | |
0cc6a796 | 87 | lexsup.c |
b11a9b28 | 88 | mri.c |
a586b5bc | 89 | mri.h |
2b63dbfe | 90 | scripttempl |
e2f9f0f6 | 91 | testsuite |
86e4d6e4 | 92 | |
87756e15 RP |
93 | Things-to-lose: |
94 | ||
86e4d6e4 RP |
95 | Do-last: |
96 | ||
d9c2980f DE |
97 | echo Looking for signs of \"v9\"... |
98 | ||
99 | # Don't try to clean directories here, as the 'mv' command will fail. | |
100 | # Also, grep fails on NFS mounted directories. | |
101 | if ( echo $* | grep keep\-v9 > /dev/null ) ; then | |
102 | for i in * ; do | |
103 | if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then | |
104 | echo Keeping v9 stuff in $i | |
105 | fi | |
106 | done | |
107 | else | |
108 | for i in * ; do | |
109 | if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then | |
110 | echo Cleaning the \"v9\" out of $i... | |
111 | cp $i new | |
112 | sed '/start\-sanitize\-v9/,/end-\sanitize\-v9/d' < $i > new | |
113 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
114 | echo Caching $i in .Recover... | |
115 | mv $i .Recover | |
116 | fi | |
117 | mv new $i | |
118 | fi | |
119 | done | |
120 | fi | |
86e4d6e4 | 121 | |
747a47f2 SS |
122 | echo Looking for traces of \"mpw\"... |
123 | ||
124 | # Don't try to clean directories here, as the 'mv' command will fail. | |
125 | # Also, grep fails on NFS mounted directories. | |
126 | if ( echo $* | grep keep\-mpw > /dev/null ) ; then | |
127 | for i in * ; do | |
128 | if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then | |
129 | echo Keeping mpw traces in $i | |
130 | fi | |
131 | done | |
132 | else | |
133 | for i in * ; do | |
134 | if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then | |
135 | echo Removing traces of \"mpw\" out of $i... | |
136 | cp $i new | |
137 | sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new | |
138 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
139 | echo Caching $i in .Recover... | |
140 | mv $i .Recover | |
141 | fi | |
142 | mv new $i | |
143 | fi | |
144 | done | |
145 | fi | |
146 | ||
c361ce46 ILT |
147 | echo Looking for PowerPC NetWare... |
148 | ppcfiles="configure.in" | |
149 | if ( echo $* | grep keep\-powerpc\-netware > /dev/null ) ; then | |
150 | if [ -n "${verbose}" ] ; then | |
151 | echo Keeping PowerPC NetWare stuff in $ppcfiles. | |
152 | fi | |
153 | else | |
154 | if [ -n "${verbose}" ]; then | |
155 | echo -n Removing PowerPC NetWare in `pwd`: | |
156 | fi | |
157 | for f in $ppcfiles ; do | |
158 | if [ -n "${verbose}" ] ; then | |
159 | echo -n " " $f | |
160 | fi | |
161 | sed '/start\-sanitize\-powerpc\-netware/,/end\-sanitize\-powerpc\-netware/d' < $f > new | |
162 | if [ -n "${safe}" ] ; then | |
163 | mv $f .Recover | |
164 | fi | |
165 | mv new $f | |
166 | done | |
167 | fi | |
168 | ||
86e4d6e4 | 169 | # End of file. |