Commit | Line | Data |
---|---|---|
8ddef552 DM |
1 | # .Sanitize for devo/ld/config |
2 | ||
3 | # Each directory to survive its way into a release will need a file | |
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 | |
14 | # done in this directory. | |
15 | ||
16 | Do-first: | |
17 | ||
d51be0a9 RH |
18 | beos_files="beos.em" |
19 | if ( echo $* | grep keep\-beos > /dev/null ) ; then | |
20 | keep_these_too="${beos_files} ${keep_these_too}" | |
21 | else | |
22 | lose_these_too="${beos_files} ${lose_these_too}" | |
23 | fi | |
24 | ||
8ddef552 DM |
25 | |
26 | # All files listed between the "Things-to-keep:" line and the | |
27 | # "Do-last:" line will be kept. All other files will be removed. | |
28 | # Directories listed in this section will have their own Sanitize | |
29 | # called. Directories not listed will be removed in their entirety | |
30 | # with rm -rf. | |
31 | ||
32 | Things-to-keep: | |
33 | ||
34 | README | |
b5f076d4 | 35 | aix.em |
796daf20 | 36 | armcoff.em |
2a9fa50c | 37 | elf32.em |
8ddef552 DM |
38 | generic.em |
39 | gld960.em | |
7009748c | 40 | gld960c.em |
6cc2ced1 | 41 | hppaelf.em |
08f20f66 | 42 | linux.em |
8ddef552 | 43 | lnk960.em |
dc5df17b | 44 | mipsecoff.em |
eb7f87c5 | 45 | pe.em |
3f38a017 | 46 | stringify.sed |
ed601bea | 47 | sunos.em |
8ddef552 DM |
48 | vanilla.em |
49 | ||
50 | Things-to-lose: | |
51 | ||
52 | # The lines between the "Do-last:" line and the end of the file | |
53 | # are executed as a /bin/sh shell script after everything else is | |
54 | # done. | |
55 | ||
56 | Do-last: | |
57 | ||
bf86ea82 DE |
58 | sky_files="elf32.em" |
59 | if ( echo $* | grep keep\-sky > /dev/null ) ; then | |
60 | for i in $sky_files ; do | |
61 | if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then | |
62 | if [ -n "${verbose}" ] ; then | |
63 | echo Keeping sky stuff in $i | |
64 | fi | |
65 | fi | |
66 | done | |
67 | else | |
68 | for i in $sky_files ; do | |
69 | if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then | |
70 | if [ -n "${verbose}" ] ; then | |
71 | echo Removing traces of \"sky\" from $i... | |
72 | fi | |
73 | cp $i new | |
74 | sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new | |
75 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
76 | if [ -n "${verbose}" ] ; then | |
77 | echo Caching $i in .Recover... | |
78 | fi | |
79 | mv $i .Recover | |
80 | fi | |
81 | mv new $i | |
82 | fi | |
83 | done | |
84 | fi | |
85 | ||
86 | for i in * ; do | |
87 | if test ! -d $i && (grep sanitize $i > /dev/null) ; then | |
88 | echo '***' Some mentions of Sanitize are still left in $i! 1>&2 | |
89 | fi | |
90 | done |