Add TIc80 stuff keep/lose stuff.
authorFred Fish <fnf@specifix.com>
Sat, 28 Dec 1996 04:16:24 +0000 (04:16 +0000)
committerFred Fish <fnf@specifix.com>
Sat, 28 Dec 1996 04:16:24 +0000 (04:16 +0000)
bfd/.Sanitize

index e21a612af9e178f535e97fd3700dba3dfcd787ca..43de89a3f8e9cf6b540e6e9a4b1063f41dedaf73 100644 (file)
@@ -47,6 +47,14 @@ else
        lose_these_too="${v850_files} ${lose_these_too}"
 fi
 
+tic80_files="cpu-tic80.c coff-tic80.c"
+
+if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
+       keep_these_too="${tic80_files} ${keep_these_too}"
+else
+       lose_these_too="${tic80_files} ${lose_these_too}"
+fi
+
 # All files listed between the "Things-to-keep:" line and the
 # "Files-to-sed:" line will be kept.  All other files will be removed.
 # Directories listed in this section will have their own Sanitize
@@ -403,6 +411,34 @@ else
        done
 fi
 
+tic80_files="ChangeLog archures.c bfd-in2.h config.bfd configure configure.in targets.c"
+if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
+       for i in $tic80_files ; do
+               if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Keeping tic80 stuff in $i
+                       fi
+               fi
+       done
+else
+       for i in $tic80_files ; do
+               if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Removing traces of \"tic80\" from $i...
+                       fi
+                       cp $i new
+                       sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
+                       if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
+                               if [ -n "${verbose}" ] ; then
+                                       echo Caching $i in .Recover...
+                               fi
+                               mv $i .Recover
+                       fi
+                       mv new $i
+               fi
+       done
+fi
+
 gm_files="ChangeLog ChangeLog.2 config.bfd"
 if ( echo $* | grep keep\-gm > /dev/null ) ; then
        for i in $gm_files ; do