]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool: improve GNU Make debugging
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 15 May 2017 14:41:10 +0000 (07:41 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 15 May 2017 14:43:11 +0000 (07:43 -0700)
* gnulib-tool (func_emit_lib_Makefile_am): Omit unnecessary echo.
Report autoconf diagnostics when it fails, in the output makefile.

ChangeLog
gnulib-tool

index cab8f6301d2b555b9f19af85b0d72304ac14a050..481a0f4c18e9dde58f031e4d636e195dda5e3a98 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-05-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       gnulib-tool: improve GNU Make debugging
+       * gnulib-tool (func_emit_lib_Makefile_am): Omit unnecessary echo.
+       Report autoconf diagnostics when it fails, in the output makefile.
+
 2017-05-14  Bruno Haible  <bruno@clisp.org>
 
        stat-time tests: Improve comment.
index d5c290267fb6e6a0e560fdd8c9550558e370dcdf..5dd77f7f155e13554f3a967493ba2279944dce5d 100755 (executable)
@@ -3571,9 +3571,18 @@ func_emit_lib_Makefile_am ()
   fi
   if $gnu_make; then
     echo "# Start of GNU Make output."
-    echo 'gl_EARLY;gl_INIT' \
-      | ${AUTOCONF} -t 'AC_SUBST:$1 = @$1@' "$configure_ac" \
-      | LC_ALL=C sort -u
+
+    # Put autoconf output into a temporary file, so that its exit status
+    # can be checked from the shell.  Signal any error by putting a
+    # syntax error into the output makefile.
+    ${AUTOCONF} -t 'AC_SUBST:$1 = @$1@' "$configure_ac" \
+                >"$tmp"/makeout 2>"$tmp"/makeout2 &&
+      LC_ALL=C sort -u "$tmp"/makeout || {
+        echo "== gnulib-tool GNU Make output failed as follows =="
+        sed 's/^/# stderr: /' "$tmp"/makeout2
+      }
+    rm -f "$tmp"/makeout "$tmp"/makeout2
+
     echo "# End of GNU Make output."
   else
     echo "# No GNU Make output."