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 | ||
b8641a4d | 19 | m32rx_files="cpux.c cpux.h decodex.c decodex.h m32rx.c mloopx.in modelx.c readx.c semx.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 |
369fba30 DE |
38 | arch.c |
39 | arch.h | |
646c6f2b DE |
40 | config.in |
41 | configure | |
42 | configure.in | |
b8641a4d | 43 | cpu.c |
47d57be1 | 44 | cpu.h |
369fba30 | 45 | cpuall.h |
646c6f2b DE |
46 | decode.c |
47 | decode.h | |
48 | extract.c | |
49 | m32r-sim.h | |
50 | m32r.c | |
369fba30 | 51 | mloop.in |
646c6f2b | 52 | model.c |
646c6f2b | 53 | sem-switch.c |
369fba30 | 54 | sem.c |
646c6f2b DE |
55 | sim-if.c |
56 | sim-main.h | |
57 | tconfig.in | |
5c8f1c01 DE |
58 | |
59 | Things-to-lose: | |
60 | ||
61 | Do-last: | |
62 | ||
369fba30 DE |
63 | cygnus_files="ChangeLog Makefile.in" |
64 | if ( echo $* | grep keep\-cygnus > /dev/null ) ; then | |
65 | for i in $cygnus_files ; do | |
66 | if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then | |
67 | if [ -n "${verbose}" ] ; then | |
68 | echo Keeping cygnus stuff in $i | |
69 | fi | |
70 | fi | |
71 | done | |
72 | else | |
73 | for i in $cygnus_files ; do | |
74 | if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then | |
75 | if [ -n "${verbose}" ] ; then | |
76 | echo Removing traces of \"cygnus\" from $i... | |
77 | fi | |
78 | cp $i new | |
79 | sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new | |
80 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
81 | if [ -n "${verbose}" ] ; then | |
82 | echo Caching $i in .Recover... | |
83 | fi | |
84 | mv $i .Recover | |
85 | fi | |
86 | mv new $i | |
87 | fi | |
88 | done | |
89 | fi | |
90 | ||
d5426771 | 91 | 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 |
92 | if ( echo $* | grep keep\-m32rx > /dev/null ) ; then |
93 | for i in $m32rx_files ; do | |
94 | if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then | |
95 | if [ -n "${verbose}" ] ; then | |
96 | echo Keeping m32rx stuff in $i | |
97 | fi | |
98 | fi | |
99 | done | |
100 | else | |
101 | for i in $m32rx_files ; do | |
102 | if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then | |
103 | if [ -n "${verbose}" ] ; then | |
104 | echo Removing traces of \"m32rx\" from $i... | |
105 | fi | |
106 | cp $i new | |
107 | sed '/start\-sanitize\-m32rx/,/end-\sanitize\-m32rx/d' < $i > new | |
108 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
109 | if [ -n "${verbose}" ] ; then | |
110 | echo Caching $i in .Recover... | |
111 | fi | |
112 | mv $i .Recover | |
113 | fi | |
114 | mv new $i | |
115 | fi | |
116 | done | |
117 | fi | |
118 | ||
5c8f1c01 | 119 | # End of file. |