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