1999-01-13 Jason Molenda (jsm@bugshack.cygnus.com)
[deliverable/binutils-gdb.git] / sim / testsuite / .Sanitize
CommitLineData
00729fe3
AC
1# .Sanitize for devo/sim/testsuite
2
3# Each directory to survive it's 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
15
16Do-first:
17
bfebf1a5 18r5900_files="mips64r5900-elf"
7cf0d795
AC
19if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
20 keep_these_too="${r5900_files} ${keep_these_too}"
21else
22 lose_these_too="${r5900_files} ${lose_these_too}"
23fi
24
bd85beb9 25v850e_files="v850e-elf"
61c550e0 26if ( echo $* | grep keep\-v850e > /dev/null ) ; then
bd85beb9 27 keep_these_too="${v850e_files} ${keep_these_too}"
e1625ed2 28else
bd85beb9 29 lose_these_too="${v850e_files} ${lose_these_too}"
e1625ed2
FL
30fi
31
00729fe3
AC
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
38Things-to-keep:
39
40ChangeLog
41Makefile.in
e9b53280 42common
761784f0 43config
00729fe3
AC
44configure
45configure.in
88770c1c 46d10v-elf
965f5327 47d30v-elf
b83dc7fc 48fr30-elf
761784f0 49lib
6dc224fb 50m32r-elf
2fee67ae 51mips64el-elf
761784f0 52sim
00729fe3
AC
53
54Things-to-lose:
55
3971886a 56tic80-coff
2bc779d7 57README
7ec396d2 58
00729fe3
AC
59Do-last:
60
7cf0d795
AC
61r5900_files="configure configure.in ChangeLog Makefile.in"
62if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
63 for i in $r5900_files ; do
64 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
65 if [ -n "${verbose}" ] ; then
66 echo Keeping r5900 stuff in $i
67 fi
68 fi
69 done
70else
71 for i in $r5900_files ; do
72 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
73 if [ -n "${verbose}" ] ; then
74 echo Removing traces of \"r5900\" from $i...
75 fi
76 cp $i new
77 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
78 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
79 if [ -n "${verbose}" ] ; then
80 echo Caching $i in .Recover...
81 fi
82 mv $i .Recover
83 fi
84 mv new $i
85 fi
86 done
87fi
88
559eba20
FCE
89sky_files="configure configure.in ChangeLog"
90if ( echo $* | grep keep\-sky > /dev/null ) ; then
91 for i in $sky_files ; do
92 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
93 if [ -n "${verbose}" ] ; then
94 echo Keeping sky stuff in $i
95 fi
96 fi
97 done
98else
99 for i in $sky_files ; do
100 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
101 if [ -n "${verbose}" ] ; then
102 echo Removing traces of \"sky\" from $i...
103 fi
104 cp $i new
105 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
106 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
107 if [ -n "${verbose}" ] ; then
108 echo Caching $i in .Recover...
109 fi
110 mv $i .Recover
111 fi
112 mv new $i
113 fi
114 done
115fi
116
bd85beb9
AC
117m32rx_files="configure configure.in ChangeLog"
118if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
119 for i in $m32rx_files ; do
120 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
121 if [ -n "${verbose}" ] ; then
122 echo Keeping m32rx stuff in $i
123 fi
124 fi
125 done
126else
127 for i in $m32rx_files ; do
128 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
129 if [ -n "${verbose}" ] ; then
130 echo Removing traces of \"m32rx\" from $i...
131 fi
132 cp $i new
133 sed '/start\-sanitize\-m32rx/,/end-\sanitize\-m32rx/d' < $i > new
134 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
135 if [ -n "${verbose}" ] ; then
136 echo Caching $i in .Recover...
137 fi
138 mv $i .Recover
139 fi
140 mv new $i
141 fi
142 done
143fi
144
00729fe3
AC
145for i in * ; do
146 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
147 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
148 fi
149done
150
151# End of file.
This page took 0.08535 seconds and 4 git commands to generate.