From 58036ae4c9512e830c709bcf4f8839f40431767b Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 14 Aug 1997 19:34:58 +0000 Subject: Tidied up the sanitization. --- gas/config/.Sanitize | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) (limited to 'gas/config') diff --git a/gas/config/.Sanitize b/gas/config/.Sanitize index 1b810dd..3338e40 100644 --- a/gas/config/.Sanitize +++ b/gas/config/.Sanitize @@ -248,8 +248,17 @@ fi v850e_files="tc-v850.c tc-v850.h" if ( echo $* | grep keep\-v850e > /dev/null ) ; then + if ( echo $* | grep keep\-v850eq > /dev/null ) ; then + for i in $v850e_files ; do + if test ! -f $i && (grep sanitize-v850eq $i > /dev/null) ; then + if [ -n "${verbose}" ] ; then + echo Keeping v850e and v850eq stuff in $i + fi + fi + done + else for i in $v850e_files ; do - if test ! -d $i && (grep sanitize-v850eq $i > /dev/null) ; then + if test ! -r $i && (grep sanitize-v850eq $i > /dev/null) ; then if [ -n "${verbose}" ] ; then echo Removing traces of \"v850eq\" from $i... fi @@ -264,10 +273,11 @@ if ( echo $* | grep keep\-v850e > /dev/null ) ; then mv new $i fi done + fi else if ( echo $* | grep keep\-v850eq > /dev/null ) ; then for i in $v850e_files ; do - if test ! -d $i && (grep sanitize-v850eq $i > /dev/null) ; then + if test ! -f $i && (grep sanitize-v850eq $i > /dev/null) ; then if [ -n "${verbose}" ] ; then echo Keeping v850e and v850eq stuff in $i fi @@ -275,22 +285,33 @@ else done else for i in $v850e_files ; do - if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then + if test ! -r $i && (grep sanitize-v850e $i > /dev/null) ; then if [ -n "${verbose}" ] ; then echo Removing traces of \"v850e\" from $i... fi cp $i new sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new - cp new newer - sed '/start\-sanitize\-v850eq/,/end\-sanitize\-v850eq/d' < new > newer if [ -n "${safe}" -a ! -f .Recover/$i ] ; then if [ -n "${verbose}" ] ; then echo Caching $i in .Recover... fi mv $i .Recover fi - mv newer $i - rm new + mv new $i + fi + if test ! -r $i && (grep sanitize-v850eq $i > /dev/null) ; then + if [ -n "${verbose}" ] ; then + echo Removing traces of \"v850eq\" from $i... + fi + cp $i new + sed '/start\-sanitize\-v850eq/,/end\-sanitize\-v850eq/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 -- cgit v1.1