planetarium/mit-compile.sh: Output CREF warnings in Emacs format.
authorMatt Birkholz <matt@birchwood-abbey.net>
Mon, 19 Mar 2018 18:38:17 +0000 (11:38 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Mon, 19 Mar 2018 18:38:17 +0000 (11:38 -0700)
src/planetarium/mit-compile.sh

index 9572c49b2d83b6f47691a1e2112add6a1a65eed6..17198bcf725629a7e0924fe5398582132501ff83 100755 (executable)
@@ -81,9 +81,13 @@ ${MIT_SCHEME_EXE} --batch-mode <<\EOF
        (cref/generate-constructors "mit-3d")))
   )
 EOF
-SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \
+suffix=`echo "(display (microcode-id/operating-system-suffix))" \
        | ${MIT_SCHEME_EXE} --batch-mode`
-REPORT=mit-$SUFFIX.crf
-if [ -s "$REPORT" ]; then echo "$REPORT:1: warning: not empty"; fi
-REPORT=mit-3d-$SUFFIX.crf
-if [ -s "$REPORT" ]; then echo "$REPORT:1: warning: not empty"; fi
+report=mit-$suffix.crf
+if [ -s "$report" ]; then
+    awk "{printf \"$report:%d: %s\\n\",NR,\$0}" $report
+fi
+report=mit-3d-$suffix.crf
+if [ -s "$report" ]; then
+    awk "{printf \"$report:%d: %s\\n\",NR,\$0}" $report
+fi