]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - binutils/testsuite/lib/.Sanitize
* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[thirdparty/binutils-gdb.git] / binutils / testsuite / lib / .Sanitize
CommitLineData
5e351ee1
RS
1# .Sanitize for devo/binutils/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 directory.
15
16Do-first:
17
18# All files listed between the "Things-to-keep:" line and the
19# "Do-last:" line will be kept. All other files will be removed.
20# Directories listed in this section will have their own Sanitize
21# called. Directories not listed will be removed in their entirety
22# with rm -rf.
23
24Things-to-keep:
25
26utils-lib.exp
27
28Things-to-lose:
29
30# The lines between the "Do-last:" line and the end of the file
31# are executed as a /bin/sh shell script after everything else is
32# done.
33
34Do-last:
35
36if [ -n "${verbose}" ] ; then
37 echo Thawing away the \"chill\"...
38fi
39
40# Don't try to clean directories here, as the 'mv' command will fail.
41# Also, grep fails on NFS mounted directories.
42if ( echo $* | grep keep\-chill > /dev/null ) ; then
43 for i in * ; do
44 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
45 if [ -n "${verbose}" ] ; then
46 echo Keeping chill stuff in $i
47 fi
48 fi
49 done
50else
51 for i in * ; do
52 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
53 if [ -n "${verbose}" ] ; then
54 echo Thawing the \"chill\" out of $i...
55 fi
56 cp $i new
57 sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new
58 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
59 if [ -n "${verbose}" ] ; then
60 echo Caching $i in .Recover...
61 fi
62 mv $i .Recover
63 fi
64 mv new $i
65 fi
66 done
67fi