PR17074 - ignore line terminator characters found inside strings.
[deliverable/binutils-gdb.git] / binutils / .Sanitize
CommitLineData
7d2ac701 1# .Sanitize for devo/binutils
86e4d6e4 2
5fd51993 3# Each directory to survive its way into a release will need a file
86e4d6e4
RP
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
42d11afa 14# done in this directory.
86e4d6e4
RP
15
16Do-first:
17
7d2ac701 18
86e4d6e4 19# All files listed between the "Things-to-keep:" line and the
7d2ac701 20# "Do-last:" line will be kept. All other files will be removed.
86e4d6e4
RP
21# Directories listed in this section will have their own Sanitize
22# called. Directories not listed will be removed in their entirety
23# with rm -rf.
24
25Things-to-keep:
26
27ChangeLog
d467c30d 28Makefile.am
86e4d6e4 29Makefile.in
9c994225 30NEWS
5a77e916 31README
5ab6ca68 32acconfig.h
d467c30d 33acinclude.m4
5ab6ca68 34aclocal.m4
fb38844d
ILT
35addr2line.1
36addr2line.c
05b47bfb 37ar.1
5a77e916 38ar.c
c0cc6912 39arlex.l
aef3999f 40arparse.y
c0cc6912
SC
41arsup.c
42arsup.h
c83497f5 43binutils.texi
86e4d6e4 44bucomm.c
5a77e916 45bucomm.h
e1c14599 46budbg.h
e52e2acd
SC
47coffdump.c
48coffgrok.c
49coffgrok.h
320d4f29 50config.in
5ab6ca68 51configure
0ce51ae9 52configure.bat
e72afe26 53configure.com
86e4d6e4 54configure.in
c6474837 55cxxfilt.man
e1c14599
ILT
56debug.c
57debug.h
765e60a9 58deflex.l
7d2ac701
ILT
59defparse.y
60dep-in.sed
61dlltool.c
62dlltool.h
d7a198b6
GN
63dllwrap.c
64dyn-string.c
65dyn-string.h
86e4d6e4 66filemode.c
f5167986 67ieee.c
5a77e916
SC
68is-ranlib.c
69is-strip.c
108d499e 70mac-binutils.r
66d45014 71makefile.vms-in
5a77e916
SC
72maybe-ranlib.c
73maybe-strip.c
162bcd89 74mpw-config.in
108d499e 75mpw-make.sed
3883531f 76nlmconv.1
d130c9c5
ILT
77nlmconv.c
78nlmconv.h
79nlmheader.y
5a77e916 80nm.1
86e4d6e4 81nm.c
5a77e916
SC
82not-ranlib.c
83not-strip.c
3ac620d4 84objcopy.1
df14d957 85objcopy.c
5a77e916 86objdump.1
86e4d6e4 87objdump.c
7d2ac701 88po
e1c14599 89prdbg.c
5a77e916 90ranlib.1
06a97fbd 91ranlib.sh
1d371d35
ILT
92rclex.l
93rcparse.y
7d2ac701
ILT
94rdcoff.c
95rddbg.c
76466873 96readelf.c
662cc41e 97resbin.c
e4486bdf 98rescoff.c
1d371d35 99resrc.c
9b6b08c2 100resres.c
aef3999f 101sanity.sh
5a77e916 102size.1
86e4d6e4 103size.c
e52e2acd 104srconv.c
e1c14599 105stabs.c
d467c30d 106stamp-h.in
ba7c8e29
DM
107strings.1
108strings.c
5a77e916 109strip.1
e52e2acd
SC
110sysdump.c
111sysinfo.y
112syslex.l
113sysroff.info
fdee1696 114testsuite
86e4d6e4 115version.c
1d371d35 116windres.c
7d2ac701 117windres.h
72574626
ILT
118winduni.c
119winduni.h
5a52c5f8 120wrstabs.c
86e4d6e4 121
87756e15
RP
122Things-to-lose:
123
7d2ac701
ILT
124
125
126# The lines between the "Do-last:" line and the end of the file
127# are executed as a /bin/sh shell script after everything else is
128# done.
129
86e4d6e4 130Do-last:
7d2ac701 131
76466873
NC
132v850e_files="readelf.c"
133if ( echo $* | grep keep\-v850e > /dev/null ) ; then
134 for i in $v850e_files ; do
135 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
136 if [ -n "${verbose}" ] ; then
137 echo Keeping v850e stuff in $i
138 fi
139 fi
140 done
141else
142 for i in $v850e_files ; do
143 if test -r $i && (grep sanitize-v850e $i > /dev/null) ; then
144 if [ -n "${verbose}" ] ; then
145 echo Removing traces of \"v850e\" from $i...
146 fi
147 cp $i new
148 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
149 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
150 if [ -n "${verbose}" ] ; then
151 echo Caching $i in .Recover...
152 fi
153 mv $i .Recover
154 fi
155 mv new $i
156 fi
157 done
158fi
159
a09db9ba
MM
160m32rx_files="readelf.c"
161if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
162 for i in $m32rx_files ; do
163 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
164 if [ -n "${verbose}" ] ; then
165 echo Keeping m32rx stuff in $i
166 fi
167 fi
168 done
169else
170 for i in $m32rx_files ; do
171 if test -r $i && (grep sanitize-m32rx $i > /dev/null) ; then
172 if [ -n "${verbose}" ] ; then
173 echo Removing traces of \"m32rx\" from $i...
174 fi
175 cp $i new
176 sed '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' < $i > new
177 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
178 if [ -n "${verbose}" ] ; then
179 echo Caching $i in .Recover...
180 fi
181 mv $i .Recover
182 fi
183 mv new $i
184 fi
185 done
186fi
187
3d96e9b4
TT
188# This must come after all other sanitizations. Re-sanitize the .pot
189# file.
190if [ -n "${verbose}" ]; then
191 echo Re-computing files for gettext ...
192fi
193
194if [ -n "${safe}" -a ! -f po/.Recover/POTFILES.in ]; then
195 if [ -n "${verbose}" ]; then
196 echo Caching po/POTFILES.in in .Recover...
197 fi
198 mv po/POTFILES.in po/.Recover
199fi
200find . -name '*.[ch]' | sed -e 's,^\./,,' > po/POTFILES.in
201
202if [ -n "${safe}" -a ! -f po/.Recover/binutils.pot ]; then
203 if [ -n "${verbose}" ]; then
204 echo Caching po/binutils.pot in .Recover...
205 fi
206 mv po/binutils.pot po/.Recover
207fi
d6f3da9b 208# If this fails, Sanitization must fail.
ee66b572 209xgettext -c -k_ -kN_ -f po/POTFILES.in -o po/binutils.pot || exit 1
3d96e9b4 210
7d2ac701 211# eof
This page took 0.235833 seconds and 4 git commands to generate.