81bcfd7e37c3b8ed53f97c54bc85fe1153d59962
[deliverable/binutils-gdb.git] / opcodes / .Sanitize
1 # .Sanitize for devo/opcodes
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
15
16 Do-first:
17
18 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
19 keep_these_too="mpw-make.in mpw-config.in ChangeLog.mpw"
20 else
21 lose_these_too="mpw-make.in mpw-config.in ChangeLog.mpw"
22 fi
23
24 if ( echo $* | grep keep\-gm > /dev/null ) ; then
25 keep_these_too="mpw-xconfig.in ChangeLog.gm ${keep_these_too}"
26 else
27 lose_these_too="mpw-xconfig.in ChangeLog.gm ${lose_these_too}"
28 fi
29
30 # All files listed between the "Things-to-keep:" line and the
31 # "Files-to-sed:" line will be kept. All other files will be removed.
32 # Directories listed in this section will have their own Sanitize
33 # called. Directories not listed will be removed in their entirety
34 # with rm -rf.
35
36 Things-to-keep:
37
38 ChangeLog
39 Makefile.in
40 alpha-dis.c
41 alpha-opc.h
42 a29k-dis.c
43 configure.in
44 dis-buf.c
45 h8300-dis.c
46 h8500-dis.c
47 h8500-opc.h
48 hppa-dis.c
49 i386-dis.c
50 i960-dis.c
51 m68k-dis.c
52 m88k-dis.c
53 mips-dis.c
54 mips-opc.c
55 ppc-dis.c
56 ppc-opc.c
57 sh-opc.h
58 sh-dis.c
59 sparc-dis.c
60 sparc-opc.c
61 z8k-dis.c
62 z8k-opc.h
63 z8kgen.c
64 alpha-opc.h
65 alpha-dis.c
66
67 Things-to-lose:
68
69
70 Do-last:
71
72 if ( echo $* | egrep verbose > /dev/null ) ; then
73 verbose=true
74 else
75 verbose=
76 fi
77
78 if ( echo $* | grep keep\-v9 > /dev/null ) ; then
79 if [ -n "${verbose}" ] ; then
80 echo Keeping v9 in sparc-opc.c
81 fi
82 else
83 if [ -n "${verbose}" ] ; then
84 echo Sanitizing v9 in sparc-opc.c
85 fi
86 rm -f new
87 grep -v v9 sparc-opc.c > new
88 if [ -n "${safe}" ] ; then
89 mv sparc-opc.c .Recover
90 else
91 rm sparc-opc.c
92 fi
93 mv new sparc-opc.c
94 fi
95
96
97 v9dirty="sparc-dis.c"
98
99 if ( echo $* | grep keep\-v9 > /dev/null ) ; then
100 if [ -n "${verbose}" ] ; then
101 echo Keeping v9 in ${v9dirty}
102 fi
103 else
104 for i in ${v9dirty} ; do
105 if [ -n "${verbose}" ] ; then
106 echo Sanitizing v9 in $i
107 fi
108 rm -f new
109 sed '/^#ifndef[ ]NO_V9/,/^#endif/d' < $i > new
110 if grep -s -i v9 new ; then
111 echo '***' SANITIZING V9 IN $i FAILED *****\a\a 1>&2
112 fi
113 if [ -n "${safe}" ] ; then
114 mv $i .Recover
115 else
116 rm $i
117 fi
118 mv new $i
119 done
120 fi
121 # End of file.
This page took 0.037418 seconds and 3 git commands to generate.