Emit separators in lib/Makefile.am.
authorBruno Haible <bruno@clisp.org>
Fri, 15 Oct 2004 16:51:32 +0000 (16:51 +0000)
committerBruno Haible <bruno@clisp.org>
Fri, 15 Oct 2004 16:51:32 +0000 (16:51 +0000)
ChangeLog
gnulib-tool

index a2e6e794fc5ef61d9997ec43e6a58659690f1e8d..d5ebf22c909316abf04b8ffc101b9b31c3962fb0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-10-15  Bruno Haible  <bruno@clisp.org>
+
+       * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
+       the portions belonging to each module.
+       Suggested by Derek Robert Price <derek@ximbiot.com>.
+
 2004-10-15  Bruno Haible  <bruno@clisp.org>
 
        * gnulib-tool: Untabify. Initialize supplied_libname.
index 40e9efe299abb20761b90ec83ab1871326779fa0..6cfc7c067b89a7e0656dc4cbfa5a10df189d790d 100755 (executable)
@@ -22,7 +22,7 @@
 
 progname=$0
 package=gnulib
-cvsdatestamp='$Date: 2004-10-15 16:45:28 $'
+cvsdatestamp='$Date: 2004-10-15 16:51:32 $'
 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
 
@@ -450,13 +450,26 @@ func_emit_lib_Makefile_am ()
   echo "CLEANFILES ="
   echo "DISTCLEANFILES ="
   echo "MAINTAINERCLEANFILES ="
+  echo
   for module in $modules; do
     func_verify_module
     if test -n "$module"; then
-      func_get_automake_snippet "$module" | sed -e "s,lib_SOURCES,$libname"'_a_SOURCES,g' -e "s,lib_OBJECTS,$libname"'_a_OBJECTS,g'
-      if test "$module" = 'alloca'; then
-        echo "${libname}_${libext}_LIBADD += @{perhapsLT}ALLOCA@"
+      {
+        func_get_automake_snippet "$module" | sed -e "s,lib_SOURCES,$libname"'_a_SOURCES,g' -e "s,lib_OBJECTS,$libname"'_a_OBJECTS,g'
+        if test "$module" = 'alloca'; then
+          echo "${libname}_${libext}_LIBADD += @{perhapsLT}ALLOCA@"
+        fi
+      } > amsnippet.tmp
+      # Skip the contents if its entirely empty.
+      if grep '[^      ]' amsnippet.tmp > /dev/null ; then
+        echo "## begin gnulib module $module"
+        echo
+        cat amsnippet.tmp
+        echo
+        echo "## end   gnulib module $module"
+        echo
       fi
+      rm -f amsnippet.tmp
     fi
   done
 }