Commit | Line | Data |
---|---|---|
5c8f1c01 DE |
1 | # Sanitize.in for sim/m32r |
2 | # $Id$ | |
3 | ||
4 | # Each directory to survive it's way into a release will need a file | |
5 | # like this one called "./.Sanitize". All keyword lines must exist, | |
6 | # and must exist in the order specified by this file. Each directory | |
7 | # in the tree will be processed, top down, in the following order. | |
8 | ||
9 | # Hash started lines like this one are comments and will be deleted | |
10 | # before anything else is done. Blank lines will also be squashed | |
11 | # out. | |
12 | ||
13 | # The lines between the "Do-first:" line and the "Things-to-keep:" | |
14 | # line are executed as a /bin/sh shell script before anything else is | |
15 | # done in this | |
16 | ||
17 | Do-first: | |
18 | ||
bb51b65d | 19 | m32rx_files="cpux.c cpux.h decodex.c decodex.h extractx.c m32rx.c mloopx.in modelx.c semx-switch.c" |
84af43e3 DE |
20 | if ( echo $* | grep keep\-m32rx > /dev/null ) ; then |
21 | keep_these_too="${m32rx_files} ${keep_these_too}" | |
22 | else | |
23 | lose_these_too="${m32rx_files} ${lose_these_too}" | |
24 | fi | |
25 | ||
5c8f1c01 DE |
26 | # All files listed between the "Things-to-keep:" line and the |
27 | # "Files-to-sed:" 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 | ||
646c6f2b DE |
34 | ChangeLog |
35 | Makefile.in | |
5c8f1c01 | 36 | README |
646c6f2b | 37 | TODO |
5da9ce07 | 38 | acconfig.h |
369fba30 DE |
39 | arch.c |
40 | arch.h | |
646c6f2b DE |
41 | config.in |
42 | configure | |
43 | configure.in | |
b8641a4d | 44 | cpu.c |
47d57be1 | 45 | cpu.h |
369fba30 | 46 | cpuall.h |
646c6f2b DE |
47 | decode.c |
48 | decode.h | |
b01a8697 | 49 | devices.c |
646c6f2b DE |
50 | extract.c |
51 | m32r-sim.h | |
52 | m32r.c | |
369fba30 | 53 | mloop.in |
646c6f2b | 54 | model.c |
646c6f2b | 55 | sem-switch.c |
369fba30 | 56 | sem.c |
646c6f2b DE |
57 | sim-if.c |
58 | sim-main.h | |
59 | tconfig.in | |
7e927218 | 60 | traps.c |
5c8f1c01 DE |
61 | |
62 | Things-to-lose: | |
63 | ||
64 | Do-last: | |
65 | ||
369fba30 DE |
66 | cygnus_files="ChangeLog Makefile.in" |
67 | if ( echo $* | grep keep\-cygnus > /dev/null ) ; then | |
68 | for i in $cygnus_files ; do | |
69 | if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then | |
70 | if [ -n "${verbose}" ] ; then | |
71 | echo Keeping cygnus stuff in $i | |
72 | fi | |
73 | fi | |
74 | done | |
75 | else | |
76 | for i in $cygnus_files ; do | |
77 | if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then | |
78 | if [ -n "${verbose}" ] ; then | |
79 | echo Removing traces of \"cygnus\" from $i... | |
80 | fi | |
81 | cp $i new | |
82 | sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new | |
83 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
84 | if [ -n "${verbose}" ] ; then | |
85 | echo Caching $i in .Recover... | |
86 | fi | |
87 | mv $i .Recover | |
88 | fi | |
89 | mv new $i | |
90 | fi | |
91 | done | |
92 | fi | |
93 | ||
d5426771 | 94 | m32rx_files="ChangeLog Makefile.in sim-if.c sim-main.h arch.h arch.c cpuall.h cpu.h m32r-sim.h tconfig.in" |
369fba30 DE |
95 | if ( echo $* | grep keep\-m32rx > /dev/null ) ; then |
96 | for i in $m32rx_files ; do | |
97 | if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then | |
98 | if [ -n "${verbose}" ] ; then | |
99 | echo Keeping m32rx stuff in $i | |
100 | fi | |
101 | fi | |
102 | done | |
103 | else | |
104 | for i in $m32rx_files ; do | |
105 | if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then | |
106 | if [ -n "${verbose}" ] ; then | |
107 | echo Removing traces of \"m32rx\" from $i... | |
108 | fi | |
109 | cp $i new | |
110 | sed '/start\-sanitize\-m32rx/,/end-\sanitize\-m32rx/d' < $i > new | |
111 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
112 | if [ -n "${verbose}" ] ; then | |
113 | echo Caching $i in .Recover... | |
114 | fi | |
115 | mv $i .Recover | |
116 | fi | |
117 | mv new $i | |
118 | fi | |
119 | done | |
120 | fi | |
121 | ||
5c8f1c01 | 122 | # End of file. |