From a14c18884344d6cb757c2682d0f98fc28aff419e Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Mon, 19 Mar 2018 11:38:17 -0700 Subject: [PATCH] planetarium/mit-compile.sh: Output CREF warnings in Emacs format. --- src/planetarium/mit-compile.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/planetarium/mit-compile.sh b/src/planetarium/mit-compile.sh index 9572c49b2..17198bcf7 100755 --- a/src/planetarium/mit-compile.sh +++ b/src/planetarium/mit-compile.sh @@ -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 -- 2.25.1