Make dos.m4 preserve comments.
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 24 Aug 1992 15:18:30 +0000 (15:18 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 24 Aug 1992 15:18:30 +0000 (15:18 +0000)
v7/src/microcode/s/dos.m4

index 4810d033c82f889aae7e2159d6269dd4094ad99e..902b1c3a847a438eb1bf6e61b64891116488a099 100755 (executable)
@@ -1,11 +1,14 @@
 #!/bin/csh -f
-# $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/s/Attic/dos.m4,v 1.2 1992/03/06 00:28:03 jinx Exp $
-# Postprocessing to get valid dos assembly language from cmpaux-i386.m4
+###    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/s/Attic/dos.m4,v 1.3 1992/08/24 15:18:30 jinx Exp $
+###    Copyright (c) 1992 Massachusetts Institute of Technology
+
+####   Postprocessing to get valid dos assembly language from cmpaux-i386.m4
 
 set tmpfil = "m4.tmp"
 set seen_input = 0
 rm -f "$tmpfil"
 
+echo changecom\(\`\;\'\) >> "$tmpfil"
 echo "define(DOS,1)" >> "$tmpfil"
 while ($#argv != 0)
   if ("$argv[1]" == "-P") then
@@ -13,12 +16,12 @@ while ($#argv != 0)
     shift
   else
     set seen_input = 1
-    sed -e '/^#/D' < "$argv[1]" >> "$tmpfil"
+    sed -e '/#/;/g' < "$argv[1]" >> "$tmpfil"
   endif
   shift
 end
 if ($seen_input == 0) then
-  sed -e '/^#/D' >> "$tmpfil"
+  sed -e 's/#/;/g' >> "$tmpfil"
 endif
-m4 < "$tmpfil" | sed -e 's/#/;/g' -e 's/^\f$//' | sed -n -e '/^..*/p'
+m4 < "$tmpfil" | sed -e 's/^\f$//' | sed -n -e '/^..*/p'
 rm -f "$tmpfil"