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 | ||
10f1b597 SS |
18 | mpw_files="mpw-make.in mpw-config.in ChangeLog.mpw" |
19 | ||
747a47f2 | 20 | if ( echo $* | grep keep\-mpw > /dev/null ) ; then |
10f1b597 | 21 | keep_these_too="${mpw_files} ${keep_these_too}" |
747a47f2 | 22 | else |
10f1b597 | 23 | lose_these_too="${mpw_files} ${lose_these_too}" |
747a47f2 SS |
24 | fi |
25 | ||
26 | if ( echo $* | grep keep\-gm > /dev/null ) ; then | |
27 | keep_these_too="mpw-xconfig.in mpw-em.c ChangeLog.gm ${keep_these_too}" | |
28 | else | |
29 | lose_these_too="mpw-xconfig.in mpw-em.c ChangeLog.gm ${lose_these_too}" | |
30 | fi | |
31 | ||
86e4d6e4 RP |
32 | # All files listed between the "Things-to-keep:" line and the |
33 | # "Files-to-sed:" line will be kept. All other files will be removed. | |
34 | # Directories listed in this section will have their own Sanitize | |
35 | # called. Directories not listed will be removed in their entirety | |
36 | # with rm -rf. | |
37 | ||
38 | Things-to-keep: | |
87756e15 | 39 | |
5784123f | 40 | ChangeLog |
86e4d6e4 | 41 | Makefile.in |
bc3b479c | 42 | NEWS |
c3d97ef6 | 43 | README |
fbd74d07 | 44 | TODO |
917bffa7 PB |
45 | cdtest-foo.cc |
46 | cdtest-foo.h | |
7e16be78 | 47 | cdtest-bar.cc |
917bffa7 PB |
48 | cdtest-main.cc |
49 | cdtest.exp | |
86e4d6e4 | 50 | config |
5f1fec76 | 51 | config.h |
65aa3724 | 52 | configure.bat |
86e4d6e4 | 53 | configure.in |
f8083739 | 54 | dep-in.sed |
2b63dbfe DM |
55 | emulparams |
56 | emultempl | |
c3d97ef6 | 57 | genscripts.sh |
2412a768 | 58 | h8-doc.texi |
40ab8532 | 59 | ld.1 |
2412a768 | 60 | gen-doc.texi |
5f1fec76 SC |
61 | ld.h |
62 | ld.texinfo | |
ffa057ee | 63 | ldctor.c |
1cc27b5e | 64 | ldctor.h |
c3d97ef6 PB |
65 | ldemul.c |
66 | ldemul.h | |
5f1fec76 SC |
67 | ldexp.c |
68 | ldexp.h | |
69 | ldfile.c | |
5f1fec76 | 70 | ldfile.h |
5f1fec76 | 71 | ldgram.y |
4b91c519 | 72 | ldint.texinfo |
5f1fec76 SC |
73 | ldlang.c |
74 | ldlang.h | |
75 | ldlex.h | |
76 | ldlex.l | |
5f1fec76 SC |
77 | ldmain.c |
78 | ldmain.h | |
79 | ldmisc.c | |
80 | ldmisc.h | |
5f1fec76 SC |
81 | ldver.c |
82 | ldver.h | |
5f1fec76 SC |
83 | ldwrite.c |
84 | ldwrite.h | |
0cc6a796 | 85 | lexsup.c |
b11a9b28 | 86 | mri.c |
a586b5bc | 87 | mri.h |
2b63dbfe | 88 | scripttempl |
e2f9f0f6 | 89 | testsuite |
86e4d6e4 | 90 | |
87756e15 RP |
91 | Things-to-lose: |
92 | ||
86e4d6e4 RP |
93 | Do-last: |
94 | ||
747a47f2 SS |
95 | echo Looking for traces of \"mpw\"... |
96 | ||
97 | # Don't try to clean directories here, as the 'mv' command will fail. | |
98 | # Also, grep fails on NFS mounted directories. | |
99 | if ( echo $* | grep keep\-mpw > /dev/null ) ; then | |
100 | for i in * ; do | |
101 | if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then | |
102 | echo Keeping mpw traces in $i | |
103 | fi | |
104 | done | |
105 | else | |
106 | for i in * ; do | |
107 | if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then | |
108 | echo Removing traces of \"mpw\" out of $i... | |
109 | cp $i new | |
110 | sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new | |
111 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
112 | echo Caching $i in .Recover... | |
113 | mv $i .Recover | |
114 | fi | |
115 | mv new $i | |
116 | fi | |
117 | done | |
118 | fi | |
119 | ||
86e4d6e4 | 120 | # End of file. |