From 73b84519bdb31007e4e761577b8eaae4eda84087 Mon Sep 17 00:00:00 2001
From: Matt Birkholz <matt@birchwood-abbey.net>
Date: Sat, 17 Mar 2018 11:28:26 -0700
Subject: [PATCH] compile.sh: Output CREF warnings in compilation warning
 format.

---
 src/cairo/compile.sh      | 8 +++++---
 src/devops/compile.sh     | 4 +++-
 src/edwin/compile.sh      | 8 +++++---
 src/gl/compile.sh         | 8 +++++---
 src/glib/compile.sh       | 8 +++++---
 src/gtk-screen/compile.sh | 8 +++++---
 src/gtk/compile.sh        | 8 +++++---
 src/imail/compile.sh      | 8 +++++---
 src/pango/compile.sh      | 8 +++++---
 src/x11-screen/compile.sh | 8 +++++---
 src/x11/compile.sh        | 8 +++++---
 11 files changed, 53 insertions(+), 31 deletions(-)

diff --git a/src/cairo/compile.sh b/src/cairo/compile.sh
index c98d763e5..7a423c1c7 100755
--- a/src/cairo/compile.sh
+++ b/src/cairo/compile.sh
@@ -49,7 +49,9 @@ ${MIT_SCHEME_EXE} --prepend-library . --batch-mode <<\EOF
   (cref/generate-constructors "cairo")
   )
 EOF
-SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \
+suffix=`echo "(display (microcode-id/operating-system-suffix))" \
 	| ${MIT_SCHEME_EXE} --batch-mode`
-REPORT=cairo-$SUFFIX.crf
-if [ -s "$REPORT" ]; then echo "$REPORT:1: warning: not empty"; fi
+report=cairo-$suffix.crf
+if [ -s "$report" ]; then
+    awk "{printf \"$report:%d:%s \\n\",NR,\$0}" $report
+fi
diff --git a/src/devops/compile.sh b/src/devops/compile.sh
index f3a20b2a6..78872e75c 100755
--- a/src/devops/compile.sh
+++ b/src/devops/compile.sh
@@ -17,4 +17,6 @@ EOF
 suffix=`echo "(display (microcode-id/operating-system-suffix))" \
 	| ${MIT_SCHEME_EXE} --batch-mode`
 report=devops-$suffix.crf
-if [ -s "$report" ]; then echo "$report:1: warning: not empty"; fi
+if [ -s "$report" ]; then
+    awk "{printf \"$report:%02d:%s\\n\",NR,\$0}" $report
+fi
diff --git a/src/edwin/compile.sh b/src/edwin/compile.sh
index 78220ce2b..e3c468824 100755
--- a/src/edwin/compile.sh
+++ b/src/edwin/compile.sh
@@ -33,7 +33,9 @@ ${MIT_SCHEME_EXE} --batch-mode <<\EOF
   (load "edwin.sf")
   (load "edwin.cbf"))
 EOF
-SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \
+suffix=`echo "(display (microcode-id/operating-system-suffix))" \
 	| ${MIT_SCHEME_EXE} --batch-mode`
-REPORT=edwin-$SUFFIX.crf
-if [ -s "$REPORT" ]; then echo "$REPORT:1: warning: not empty"; fi
+report=edwin-$suffix.crf
+if [ -s "$report" ]; then
+    awk "{printf \"$report:%d:%s \\n\",NR,\$0}" $report
+fi
diff --git a/src/gl/compile.sh b/src/gl/compile.sh
index 82a113650..b3e668fb0 100755
--- a/src/gl/compile.sh
+++ b/src/gl/compile.sh
@@ -54,7 +54,9 @@ ${MIT_SCHEME_EXE} --prepend-library . --batch-mode <<\EOF
   (cref/generate-constructors "gl")
   )
 EOF
-SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \
+suffix=`echo "(display (microcode-id/operating-system-suffix))" \
 	| ${MIT_SCHEME_EXE} --batch-mode`
-REPORT=gl-$SUFFIX.crf
-if [ -s "$REPORT" ]; then echo "$REPORT:1: warning: not empty"; fi
+report=gl-$suffix.crf
+if [ -s "$report" ]; then
+    awk "{printf \"$report:%d:%s \\n\",NR,\$0}" $report
+fi
diff --git a/src/glib/compile.sh b/src/glib/compile.sh
index cf6db26b6..660653a5b 100755
--- a/src/glib/compile.sh
+++ b/src/glib/compile.sh
@@ -58,7 +58,9 @@ ${MIT_SCHEME_EXE} --prepend-library . --batch-mode <<\EOF
   (cref/generate-constructors "glib")
   )
 EOF
-SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \
+suffix=`echo "(display (microcode-id/operating-system-suffix))" \
 	| ${MIT_SCHEME_EXE} --batch-mode`
-REPORT=glib-$SUFFIX.crf
-if [ -s "$REPORT" ]; then echo "$REPORT:1: warning: not empty"; fi
+report=glib-$suffix.crf
+if [ -s "$report" ]; then
+    awk "{printf \"$report:%d:%s \\n\",NR,\$0}" $report
+fi
diff --git a/src/gtk-screen/compile.sh b/src/gtk-screen/compile.sh
index fbf33dcc9..d56ee7fd0 100755
--- a/src/gtk-screen/compile.sh
+++ b/src/gtk-screen/compile.sh
@@ -47,7 +47,9 @@ ${MIT_SCHEME_EXE} --batch-mode <<\EOF
   (cref/generate-constructors "gtk-screen")
   )
 EOF
-SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \
+suffix=`echo "(display (microcode-id/operating-system-suffix))" \
 	| ${MIT_SCHEME_EXE} --batch-mode`
-REPORT=gtk-screen-$SUFFIX.crf
-if [ -s "$REPORT" ]; then echo "$REPORT:1: warning: not empty"; fi
+report=gtk-screen-$suffix.crf
+if [ -s "$report" ]; then
+    awk "{printf \"$report:%d:%s \\n\",NR,\$0}" $report
+fi
diff --git a/src/gtk/compile.sh b/src/gtk/compile.sh
index c67d11639..b18029ee8 100755
--- a/src/gtk/compile.sh
+++ b/src/gtk/compile.sh
@@ -67,7 +67,9 @@ ${MIT_SCHEME_EXE} --prepend-library . --batch-mode <<\EOF
   (cref/generate-constructors "gtk")
   )
 EOF
-SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \
+suffix=`echo "(display (microcode-id/operating-system-suffix))" \
 	| ${MIT_SCHEME_EXE} --batch-mode`
-REPORT=gtk-$SUFFIX.crf
-if [ -s "$REPORT" ]; then echo "$REPORT:1: warning: not empty"; fi
+report=gtk-$suffix.crf
+if [ -s "$report" ]; then
+    awk "{printf \"$report:%d:%s \\n\",NR,\$0}" $report
+fi
diff --git a/src/imail/compile.sh b/src/imail/compile.sh
index 68eccb8e5..c51525d41 100755
--- a/src/imail/compile.sh
+++ b/src/imail/compile.sh
@@ -36,7 +36,9 @@ ${MIT_SCHEME_EXE} --batch-mode <<\EOF
   (load "compile.scm")
   )
 EOF
-SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \
+suffix=`echo "(display (microcode-id/operating-system-suffix))" \
 	| ${MIT_SCHEME_EXE} --batch-mode`
-REPORT=imail-$SUFFIX.crf
-if [ -s "$REPORT" ]; then echo "$REPORT:1: warning: not empty"; fi
+report=imail-$suffix.crf
+if [ -s "$report" ]; then
+    awk "{printf \"$report:%d:%s \\n\",NR,\$0}" $report
+fi
diff --git a/src/pango/compile.sh b/src/pango/compile.sh
index e9392a153..2921a6d0b 100755
--- a/src/pango/compile.sh
+++ b/src/pango/compile.sh
@@ -45,7 +45,9 @@ ${MIT_SCHEME_EXE} --prepend-library . --batch-mode <<\EOF
   (cref/generate-constructors "pango")
   )
 EOF
-SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \
+suffix=`echo "(display (microcode-id/operating-system-suffix))" \
 	| ${MIT_SCHEME_EXE} --batch-mode`
-REPORT=pango-$SUFFIX.crf
-if [ -s "$REPORT" ]; then echo "$REPORT:1: warning: not empty"; fi
+report=pango-$suffix.crf
+if [ -s "$report" ]; then
+    awk "{printf \"$report:%d:%s \\n\",NR,\$0}" $report
+fi
diff --git a/src/x11-screen/compile.sh b/src/x11-screen/compile.sh
index 5424ee5fe..53c364891 100755
--- a/src/x11-screen/compile.sh
+++ b/src/x11-screen/compile.sh
@@ -49,7 +49,9 @@ ${MIT_SCHEME_EXE} --batch-mode <<\EOF
   (cref/generate-constructors "x11-screen")
   )
 EOF
-SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \
+suffix=`echo "(display (microcode-id/operating-system-suffix))" \
 	| ${MIT_SCHEME_EXE} --batch-mode`
-REPORT=x11-screen-$SUFFIX.crf
-if [ -s "$REPORT" ]; then echo "$REPORT:1: warning: not empty"; fi
+report=x11-screen-$suffix.crf
+if [ -s "$report" ]; then
+    awk "{printf \"$report:%d:%s \\n\",NR,\$0}" $report
+fi
diff --git a/src/x11/compile.sh b/src/x11/compile.sh
index 96233bbf8..47351e52e 100755
--- a/src/x11/compile.sh
+++ b/src/x11/compile.sh
@@ -43,7 +43,9 @@ ${MIT_SCHEME_EXE} --prepend-library . --batch-mode <<\EOF
   (cref/generate-constructors "x11")
   )
 EOF
-SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \
+suffix=`echo "(display (microcode-id/operating-system-suffix))" \
 	| ${MIT_SCHEME_EXE} --batch-mode`
-REPORT=x11-$SUFFIX.crf
-if [ -s "$REPORT" ]; then echo "$REPORT:1: warning: not empty"; fi
+report=x11-$suffix.crf
+if [ -s "$report" ]; then
+    awk "{printf \"$report:%d:%s \\n\",NR,\$0}" $report
+fi
-- 
2.25.1