gnulib-tool: Addendum to 2011-06-08 commit.
authorBruno Haible <bruno@clisp.org>
Mon, 13 Jun 2011 15:44:26 +0000 (17:44 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 13 Jun 2011 15:44:26 +0000 (17:44 +0200)
* gnulib-tool (func_emit_lib_Makefile_am): If options --makefile-name
and --witness-c-macro have been given, augment AM_CPPFLAGS.

ChangeLog
gnulib-tool

index 95a9a87..19a3dff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2011-06-13  Bruno Haible  <bruno@clisp.org>
 
+       gnulib-tool: Addendum to 2011-06-08 commit.
+       * gnulib-tool (func_emit_lib_Makefile_am): If options --makefile-name
+       and --witness-c-macro have been given, augment AM_CPPFLAGS.
+
+2011-06-13  Bruno Haible  <bruno@clisp.org>
+
        fseeko: Provide a non-inline replacement of fseek().
        * lib/stdio.in.h (fseek): Don't provide if module 'fseek' is not used.
        * modules/fseeko (Depends-on): Add fseek.
index 37073ed..2235cf9 100755 (executable)
@@ -3341,20 +3341,25 @@ func_emit_lib_Makefile_am ()
       fi
     fi
   done
+  if test -n "$witness_c_macro"; then
+    cppflags_part1=" -D$witness_c_macro=1"
+  else
+    cppflags_part1=
+  fi
+  if $for_test; then
+    cppflags_part2=" -DGNULIB_STRICT_CHECKING=1"
+  else
+    cppflags_part2=
+  fi
   if test -z "$makefile_name"; then
     echo
-    if $for_test; then
-      cppflags_part1=" -DGNULIB_STRICT_CHECKING=1"
-    else
-      cppflags_part1=
-    fi
-    if test -n "$witness_c_macro"; then
-      cppflags_part2=" -D$witness_c_macro=1"
-    else
-      cppflags_part2=
-    fi
     echo "AM_CPPFLAGS =$cppflags_part1$cppflags_part2"
     echo "AM_CFLAGS ="
+  else
+    if test -n "$cppflags_part1$cppflags_part2"; then
+      echo
+      echo "AM_CPPFLAGS +=$cppflags_part1$cppflags_part2"
+    fi
   fi
   echo
   if LC_ALL=C grep "^[a-zA-Z0-9_]*_${perhapsLT}LIBRARIES *+\{0,1\}= *$libname\\.$libext\$" "$tmp"/allsnippets > /dev/null \