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