| 1 | # .Sanitize for devo/binutils |
| 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 | |
| 19 | # All files listed between the "Things-to-keep:" line and the |
| 20 | # "Do-last:" line will be kept. All other files will be removed. |
| 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 | |
| 25 | Things-to-keep: |
| 26 | |
| 27 | ChangeLog |
| 28 | Makefile.am |
| 29 | Makefile.in |
| 30 | NEWS |
| 31 | README |
| 32 | acconfig.h |
| 33 | acinclude.m4 |
| 34 | aclocal.m4 |
| 35 | addr2line.1 |
| 36 | addr2line.c |
| 37 | ar.1 |
| 38 | ar.c |
| 39 | arlex.l |
| 40 | arparse.y |
| 41 | arsup.c |
| 42 | arsup.h |
| 43 | binutils.texi |
| 44 | bucomm.c |
| 45 | bucomm.h |
| 46 | budbg.h |
| 47 | coffdump.c |
| 48 | coffgrok.c |
| 49 | coffgrok.h |
| 50 | config.in |
| 51 | configure |
| 52 | configure.bat |
| 53 | configure.com |
| 54 | configure.in |
| 55 | cxxfilt.man |
| 56 | debug.c |
| 57 | debug.h |
| 58 | deflex.l |
| 59 | defparse.y |
| 60 | dep-in.sed |
| 61 | dlltool.c |
| 62 | dlltool.h |
| 63 | dllwrap.c |
| 64 | dyn-string.c |
| 65 | dyn-string.h |
| 66 | filemode.c |
| 67 | ieee.c |
| 68 | is-ranlib.c |
| 69 | is-strip.c |
| 70 | mac-binutils.r |
| 71 | makefile.vms-in |
| 72 | maybe-ranlib.c |
| 73 | maybe-strip.c |
| 74 | mpw-config.in |
| 75 | mpw-make.sed |
| 76 | nlmconv.1 |
| 77 | nlmconv.c |
| 78 | nlmconv.h |
| 79 | nlmheader.y |
| 80 | nm.1 |
| 81 | nm.c |
| 82 | not-ranlib.c |
| 83 | not-strip.c |
| 84 | objcopy.1 |
| 85 | objcopy.c |
| 86 | objdump.1 |
| 87 | objdump.c |
| 88 | po |
| 89 | prdbg.c |
| 90 | ranlib.1 |
| 91 | ranlib.sh |
| 92 | rclex.l |
| 93 | rcparse.y |
| 94 | rdcoff.c |
| 95 | rddbg.c |
| 96 | readelf.c |
| 97 | resbin.c |
| 98 | rescoff.c |
| 99 | resrc.c |
| 100 | resres.c |
| 101 | sanity.sh |
| 102 | size.1 |
| 103 | size.c |
| 104 | srconv.c |
| 105 | stabs.c |
| 106 | stamp-h.in |
| 107 | strings.1 |
| 108 | strings.c |
| 109 | strip.1 |
| 110 | sysdump.c |
| 111 | sysinfo.y |
| 112 | syslex.l |
| 113 | sysroff.info |
| 114 | testsuite |
| 115 | version.c |
| 116 | windres.c |
| 117 | windres.h |
| 118 | winduni.c |
| 119 | winduni.h |
| 120 | wrstabs.c |
| 121 | |
| 122 | Things-to-lose: |
| 123 | |
| 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 | |
| 130 | Do-last: |
| 131 | |
| 132 | v850e_files="readelf.c" |
| 133 | if ( 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 |
| 141 | else |
| 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 |
| 158 | fi |
| 159 | |
| 160 | m32rx_files="readelf.c" |
| 161 | if ( 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 |
| 169 | else |
| 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 |
| 186 | fi |
| 187 | |
| 188 | # This must come after all other sanitizations. Re-sanitize the .pot |
| 189 | # file. |
| 190 | if [ -n "${verbose}" ]; then |
| 191 | echo Re-computing files for gettext ... |
| 192 | fi |
| 193 | |
| 194 | if [ -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 |
| 199 | fi |
| 200 | find . -name '*.[ch]' | sed -e 's,^\./,,' > po/POTFILES.in |
| 201 | |
| 202 | if [ -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 |
| 207 | fi |
| 208 | # If this fails, Sanitization must fail. |
| 209 | xgettext -c -k_ -kN_ -f po/POTFILES.in -o po/binutils.pot || exit 1 |
| 210 | |
| 211 | # eof |