+2025-02-04 Bruno Haible <bruno@clisp.org>
+
+ gnulib-tool: Fix the result of --create-testdir (regression yesterday).
+ * gnulib-tool.sh (func_emit_lib_Makefile_am): If $for_test, revert to
+ the previous code.
+ * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): If for_test, revert
+ to the previous code.
+
2025-02-04 Bruno Haible <bruno@clisp.org>
*vasnprintf: Add a stricter runtime check.
fi
# Here we use $(LIBOBJS), not @LIBOBJS@. The value is the same. However,
# automake during its analysis looks for $(LIBOBJS), not for @LIBOBJS@.
- echo "${libname}_${libext}_LIBADD = \$(${macro_prefix}_${libname}_${perhapsLT}LIBOBJS)"
- echo "${libname}_${libext}_DEPENDENCIES = \$(${macro_prefix}_${libname}_${perhapsLT}LIBOBJS)"
+ if ! $for_test; then
+ # When there is a ${libname}_${libext}_CFLAGS or ${libname}_${libext}_CPPFLAGS
+ # definition, Automake emits rules for creating object files prefixed with
+ # "${libname}_${libext}-".
+ echo "${libname}_${libext}_LIBADD = \$(${macro_prefix}_${libname}_${perhapsLT}LIBOBJS)"
+ echo "${libname}_${libext}_DEPENDENCIES = \$(${macro_prefix}_${libname}_${perhapsLT}LIBOBJS)"
+ else
+ echo "${libname}_${libext}_LIBADD = \$(${macro_prefix}_${perhapsLT}LIBOBJS)"
+ echo "${libname}_${libext}_DEPENDENCIES = \$(${macro_prefix}_${perhapsLT}LIBOBJS)"
+ fi
echo "EXTRA_${libname}_${libext}_SOURCES ="
if test "$libtool" = true; then
echo "${libname}_${libext}_LDFLAGS = \$(AM_LDFLAGS)"
# Extend the 'distclean' rule.
echo "distclean-local: distclean-gnulib-libobjs"
echo "distclean-gnulib-libobjs:"
- echo " -rm -f @${macro_prefix}_${libname}_LIBOBJDEPS@"
+ if ! $for_test; then
+ # When there is a ${libname}_${libext}_CFLAGS or ${libname}_${libext}_CPPFLAGS
+ # definition, Automake emits rules for creating object files prefixed with
+ # "${libname}_${libext}-".
+ echo " -rm -f @${macro_prefix}_${libname}_LIBOBJDEPS@"
+ else
+ echo " -rm -f @${macro_prefix}_LIBOBJDEPS@"
+ fi
# Extend the 'maintainer-clean' rule.
echo "maintainer-clean-local: distclean-gnulib-libobjs"
rm -f "$tmp"/allsnippets
emit += '%s_%s_CFLAGS = $(AM_CFLAGS) $(GL_CFLAG_GNULIB_WARNINGS) $(GL_CFLAG_ALLOW_WARNINGS)\n' % (libname, libext)
# Here we use $(LIBOBJS), not @LIBOBJS@. The value is the same. However,
# automake during its analysis looks for $(LIBOBJS), not for @LIBOBJS@.
- emit += '%s_%s_LIBADD = $(%s_%s_%sLIBOBJS)\n' % (libname, libext, macro_prefix, libname, perhapsLT)
- emit += '%s_%s_DEPENDENCIES = $(%s_%s_%sLIBOBJS)\n' % (libname, libext, macro_prefix, libname, perhapsLT)
+ if not for_test:
+ # When there is a {libname}_{libext}_CFLAGS or {libname}_{libext}_CPPFLAGS
+ # definition, Automake emits rules for creating object files prefixed with
+ # "{libname}_{libext}-".
+ emit += '%s_%s_LIBADD = $(%s_%s_%sLIBOBJS)\n' % (libname, libext, macro_prefix, libname, perhapsLT)
+ emit += '%s_%s_DEPENDENCIES = $(%s_%s_%sLIBOBJS)\n' % (libname, libext, macro_prefix, libname, perhapsLT)
+ else:
+ emit += '%s_%s_LIBADD = $(%s_%sLIBOBJS)\n' % (libname, libext, macro_prefix, perhapsLT)
+ emit += '%s_%s_DEPENDENCIES = $(%s_%sLIBOBJS)\n' % (libname, libext, macro_prefix, perhapsLT)
emit += 'EXTRA_%s_%s_SOURCES =\n' % (libname, libext)
if libtool:
emit += '%s_%s_LDFLAGS = $(AM_LDFLAGS)\n' % (libname, libext)
# Extend the 'distclean' rule.
emit += 'distclean-local: distclean-gnulib-libobjs\n'
emit += 'distclean-gnulib-libobjs:\n'
- emit += '\t-rm -f @%s_%s_LIBOBJDEPS@\n' % (macro_prefix, libname)
+ if not for_test:
+ # When there is a {libname}_{libext}_CFLAGS or {libname}_{libext}_CPPFLAGS
+ # definition, Automake emits rules for creating object files prefixed with
+ # "{libname}_{libext}-".
+ emit += '\t-rm -f @%s_%s_LIBOBJDEPS@\n' % (macro_prefix, libname)
+ else:
+ emit += '\t-rm -f @%s_LIBOBJDEPS@\n' % (macro_prefix)
# Extend the 'maintainer-clean' rule.
emit += 'maintainer-clean-local: distclean-gnulib-libobjs\n'
return emit