ce96c0354c0ae76770c2e892fd88be0d3d913bbc
[binutils-gdb.git] / gdb / config / v850 / .Sanitize
1 # .Sanitize for devo/gdb/config/v850.
2
3 # Each directory to survive its 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 directory.
15
16 Do-first:
17
18 v850_files="tm-v850.h v850.mt"
19
20 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
21 keep_these_too="${v850_files} ${keep_these_too}"
22 if [ -n "${verbose}" ] ; then
23 echo Keeping ${v850_files}
24 fi
25 else
26 lose_these_too="${v850_files} ${lose_these_too}"
27 if [ -n "${verbose}" ] ; then
28 echo Deleting ${v850_files}
29 fi
30 fi
31
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:
39
40 Things-to-lose:
41
42
43 Do-last:
44
45 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
46 for i in * ; do
47 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
48 if [ -n "${verbose}" ] ; then
49 echo Keeping v850 stuff in $i
50 fi
51 fi
52 done
53 else
54 for i in * ; do
55 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
56 if [ -n "${verbose}" ] ; then
57 echo Removing traces of \"v850\" from $i...
58 fi
59 cp $i new
60 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
61 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
62 if [ -n "${verbose}" ] ; then
63 echo Caching $i in .Recover...
64 fi
65 mv $i .Recover
66 fi
67 mv new $i
68 fi
69 done
70 fi
71
72 # End of file.