sanitize keep-cygnus cgen generation
authorDoug Evans <dje@google.com>
Tue, 20 Jan 1998 02:36:21 +0000 (02:36 +0000)
committerDoug Evans <dje@google.com>
Tue, 20 Jan 1998 02:36:21 +0000 (02:36 +0000)
sim/common/.Sanitize
sim/common/ChangeLog
sim/common/Make-common.in

index fc5d179..a939e15 100644 (file)
 
 Do-first:
 
+cygnus_files="cgen.sh"
+if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
+        keep_these_too="${cygnus_files} ${keep_these_too}"
+else
+        lose_these_too="${cygnus_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
@@ -28,7 +35,6 @@ Make-common.in
 Makefile.in
 aclocal.m4
 callback.c
-cgen.sh
 cgen-mem.h
 cgen-ops.h
 cgen-scache.c
@@ -140,4 +146,32 @@ else
         done
 fi
 
+cygnus_files="ChangeLog Make-common.in"
+if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
+        for i in $cygnus_files ; do
+                if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
+                        if [ -n "${verbose}" ] ; then
+                                echo Keeping cygnus stuff in $i
+                        fi
+                fi
+        done
+else
+        for i in $cygnus_files ; do
+                if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
+                        if [ -n "${verbose}" ] ; then
+                                echo Removing traces of \"cygnus\" from $i...
+                        fi
+                        cp $i new
+                        sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/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
+
 # End of file.
index 59408c3..24c83fe 100644 (file)
@@ -1,7 +1,9 @@
 Mon Jan 19 12:45:45 1998  Doug Evans  <devans@seba.cygnus.com>
 
+start-sanitize-cygnus
        * Make-common.in (cgen-{arch,cpu,decode}): New targets.
        * cgen.sh: New file.
+end-sanitize-cygnus
        * cgen-scache.h: Deleted.
        * cgen-scache.c: Only compile contents if WITH_SCACHE.
        (scache_init): Use runtime computed size of SCACHE.
index 9ed1bb3..874aa09 100644 (file)
@@ -479,6 +479,8 @@ stamp-h: config.in config.status
 .gdbinit: # config.status $(srccom)/gdbinit.in
        CONFIG_FILES=$@:../common/gdbinit.in CONFIG_HEADERS= $(SHELL) ./config.status
 
+# start-sanitize-cygnus
+
 # CGEN support
 
 SCHEME = @SCHEME@
@@ -526,4 +528,6 @@ cgen-decode: force
                $(srccgen) $(CGEN_VERBOSE) \
                $(arch) "$(FLAGS)" $(cpu) $(mach) "$(SUFFIX)" ignored
 
+# end-sanitize-cygnus
+
 ## End COMMON_POST_CONFIG_FRAG