* guile-snarf.awk.in: Tweak to work with Sun/HP awk, removed some
authorGreg J. Badros <gjb@cs.washington.edu>
Thu, 10 Feb 2000 19:45:10 +0000 (19:45 +0000)
committerGreg J. Badros <gjb@cs.washington.edu>
Thu, 10 Feb 2000 19:45:10 +0000 (19:45 +0000)
dead code.  Patch from Michael Livshin.

* guile-doc-snarf.in: Tweak to work with Sun/HP sh.  Patch from
Michael Livshin.

libguile/guile-doc-snarf.in
libguile/guile-snarf.awk.in

index ab9dc6e..26c1b20 100755 (executable)
@@ -12,14 +12,15 @@ filename=`basename $fullfilename`
 #  because the makefile redirects output to the .x file
 #  which creates the file before the inclusion occurs)
 # --12/12/99 gjb
-dot_x=${filename%.*}.x
-touch --date=01/01/70 $dot_x
+no_ext=`echo $filename | /bin/sed 's/\.[^.]*$//g'`
+dot_doc=${no_ext}.doc
 
 temp="/tmp/snarf.$$"
 trap "rm -f $temp" 0 1 2 15
 
-## Let the user override the preprocessor autoconf found.
+## Let the user override the preprocessor & awk autoconf found.
 test -n "${CPP+set}" || CPP="@CPP@"
+test -n "${AWK+set}" || AWK="@AWK@"
 
 ## Must run guile-func-name-check on the unpreprocessed source
 guile-func-name-check "$fullfilename"
@@ -27,4 +28,4 @@ guile-func-name-check "$fullfilename"
 ## We must use a temporary file here, instead of a pipe, because we
 ## need to know if CPP exits with a non-zero status.
 ${CPP} -DSCM_MAGIC_SNARFER "$@" > ${temp} || exit $?
-< ${temp} awk -f `dirname $0`/guile-snarf.awk "$filename"
+< ${temp} ${AWK} -f `dirname $0`/guile-snarf.awk `basename ${dot_doc}`
index da20af4..e99ed18 100644 (file)
@@ -1,12 +1,10 @@
-#!/usr/bin/awk -f
 # Written by Greg J. Badros, <gjb@cs.washington.edu>
 # 12-Dec-1999
 
 BEGIN { FS="|"; 
-        filename = ARGV[1]; ARGV[1] = ""; 
-        dot_x_file = filename; dot_doc_file = filename;
-       sub(/\..*$/,".x",dot_x_file);
-       sub(/\..*$/,".doc",dot_doc_file); 
+        dot_doc_file = ARGV[1]; ARGV[1] = "";
+        ARGC = 0;
+        std_err = "/dev/stderr";
         # be sure to put something in the files to help make out
         print "";
         printf "" > dot_doc_file;
@@ -51,7 +49,7 @@ BEGIN { FS="|";
                 # now args is an array of the arguments
                 # args[1] is the formal name of the first argument, etc.
                 if (numargs != numactuals && !registering) 
-                  { print location ":*** `" copy "' is improperly registered as having " numactuals " arguments" > /dev/stderr; }
+                  { print location ":*** `" copy "' is improperly registered as having " numactuals " arguments" > std_err; }
                 print "\f\n" copy (registering?")":"") > dot_doc_file ; }
 
 /@@@/,/@!!!.*$/ { copy = $0;