changeset 7701:c59b96cb52c7

Fix double initialization of noinst_LTLIBRARIES.
author Bruno Haible <bruno@clisp.org>
date Wed, 29 Nov 2006 14:30:01 +0000
parents 0355b2b4c7f9
children 81bd0d34cbbe
files ChangeLog gnulib-tool
diffstat 2 files changed, 28 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-11-29  Bruno Haible  <bruno@clisp.org>
+
+	* gnulib-tool (func_emit_lib_Makefile_am): Initialize also
+	noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
+	using +=.
+	Reported by Simon Josefsson <simon@josefsson.org>.
+
 2006-11-28  James Youngman <jay@gnu.org>
 
 	* README: Advise users that they might find the bug-gnulib@gnu.org
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -22,7 +22,7 @@
 
 progname=$0
 package=gnulib
-cvsdatestamp='$Date: 2006-11-27 14:22:11 $'
+cvsdatestamp='$Date: 2006-11-29 14:30:01 $'
 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
 nl='
@@ -1236,26 +1236,9 @@
     echo "AUTOMAKE_OPTIONS = 1.5 gnits${subdir_options}"
   fi
   echo
-  if grep "^[a-zA-Z0-9_]*_${perhapsLT}LIBRARIES *= *$libname\\.$libext\$" allsnippets.tmp > /dev/null; then
-    # One of the snippets already specifies an installation location for the
-    # library. Don't confuse automake by saying it should not be installed.
-    :
-  else
-    # By default, the generated library should not be installed.
-    echo "noinst_${perhapsLT}LIBRARIES $assign $libname.$libext"
-  fi
-  echo
-  echo "${libname}_${libext}_SOURCES ="
-  # Here we use $(LIBOBJS), not @LIBOBJS@. The value is the same. However,
-  # automake during its analyses looks for $(LIBOBJS), not for @LIBOBJS@.
-  echo "${libname}_${libext}_LIBADD = \$(${macro_prefix}_${perhapsLT}LIBOBJS)"
-  echo "${libname}_${libext}_DEPENDENCIES = \$(${macro_prefix}_${perhapsLT}LIBOBJS)"
-  echo "EXTRA_${libname}_${libext}_SOURCES ="
-  if test "$libtool" = true; then
-    echo "${libname}_${libext}_LDFLAGS = \$(AM_LDFLAGS)"
-  fi
   if test -z "$makefile_name"; then
     echo "noinst_HEADERS ="
+    echo "noinst_LIBRARIES ="
     echo "noinst_LTLIBRARIES ="
     # Automake versions < 1.9b create an empty pkgdatadir at installation time
     # if you specify pkgdata_DATA to empty. This is a workaround.
@@ -1276,6 +1259,25 @@
     echo "AM_CPPFLAGS ="
   fi
   echo
+  if grep "^[a-zA-Z0-9_]*_${perhapsLT}LIBRARIES *= *$libname\\.$libext\$" allsnippets.tmp > /dev/null; then
+    # One of the snippets already specifies an installation location for the
+    # library. Don't confuse automake by saying it should not be installed.
+    :
+  else
+    # By default, the generated library should not be installed.
+    echo "noinst_${perhapsLT}LIBRARIES += $libname.$libext"
+  fi
+  echo
+  echo "${libname}_${libext}_SOURCES ="
+  # Here we use $(LIBOBJS), not @LIBOBJS@. The value is the same. However,
+  # automake during its analyses looks for $(LIBOBJS), not for @LIBOBJS@.
+  echo "${libname}_${libext}_LIBADD = \$(${macro_prefix}_${perhapsLT}LIBOBJS)"
+  echo "${libname}_${libext}_DEPENDENCIES = \$(${macro_prefix}_${perhapsLT}LIBOBJS)"
+  echo "EXTRA_${libname}_${libext}_SOURCES ="
+  if test "$libtool" = true; then
+    echo "${libname}_${libext}_LDFLAGS = \$(AM_LDFLAGS)"
+  fi
+  echo
   cat allsnippets.tmp \
     | sed -e 's|\$(top_srcdir)/build-aux/|$(top_srcdir)/'"$auxdir"'/|g'
   echo