[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: missing dependencies [Re: inline.m4: use compiler, not cpp
From: |
Bruno Haible |
Subject: |
Re: missing dependencies [Re: inline.m4: use compiler, not cpp |
Date: |
Mon, 13 Nov 2006 14:33:31 +0100 |
User-agent: |
KMail/1.9.1 |
Jim Meyering wrote:
> It sounds like the recent trend to remove uses of AC_LIBSOURCE
> (in favor of listing source file names in each module-file Files: section)
> is the reason for at least some of my missing dependencies.
The removal of AC_LIBSOURCE was indeed a major change - for the better
(more flexibility - don't rely on hardcoded short-sighted automake built-in
magic).
I fixed the missing dependencies:
2006-11-12 Bruno Haible <address@hidden>
* gnulib-tool (func_get_automake_snippet): Synthesize also an
EXTRA_lib_SOURCES augmentation.
(func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
*** gnulib-20061108/gnulib-tool.bak 2006-11-07 01:19:05.000000000 +0100
--- gnulib-20061108/gnulib-tool 2006-11-12 20:44:34.000000000 +0100
***************
*** 939,944 ****
--- 939,961 ----
echo "EXTRA_DIST +=" $extra_files
echo
fi
+ # Synthesize also an EXTRA_lib_SOURCES augmentation.
+ # This is necessary so that automake can generate the right list of
+ # dependency rules.
+ # A possible approach would be to use autom4te --trace of the redefined
+ # AC_LIBOBJ and AC_REPLACE_FUNCS macros when creating the Makefile.am
+ # (use autom4te --trace, not just grep, so that AC_LIBOBJ invocations
+ # inside autoconf's built-in macros are not missed).
+ # But it's simpler and more robust to do it here, based on the file
list.
+ # If some .c file exists and is not used with AC_LIBOBJ - for example,
+ # a .c file is preprocessed into another .c file for BUILT_SOURCES -,
+ # automake will generate a useless dependency; this is harmless.
+ sed_extract_c_files='/\.c$/p'
+ extra_files=`echo "$extra_files" | sed -n -e "$sed_extract_c_files"`
+ if test -n "$extra_files"; then
+ echo "EXTRA_lib_SOURCES +=" $extra_files
+ echo
+ fi
;;
esac
}
***************
*** 1186,1191 ****
--- 1203,1209 ----
# automake during its analyses looks for $(LIBOBJS), not for @address@hidden
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
- inline.m4: use compiler, not cpp, Jim Meyering, 2006/11/10
- Re: [bug-gnulib] inline.m4: use compiler, not cpp, Bruno Haible, 2006/11/10
- Re: inline.m4: use compiler, not cpp, Jim Meyering, 2006/11/10
- Re: inline.m4: use compiler, not cpp, Ralf Wildenhues, 2006/11/10
- missing dependencies [Re: inline.m4: use compiler, not cpp, Jim Meyering, 2006/11/10
- Re: missing dependencies [Re: inline.m4: use compiler, not cpp, Bruno Haible, 2006/11/10
- Re: missing dependencies [Re: inline.m4: use compiler, not cpp,
Bruno Haible <=
- Re: missing dependencies [Re: inline.m4: use compiler, not cpp, Jim Meyering, 2006/11/13
- Re: missing dependencies [Re: inline.m4: use compiler, not cpp, Bruno Haible, 2006/11/13
- Re: missing dependencies [Re: inline.m4: use compiler, not cpp, Jim Meyering, 2006/11/14
- Re: missing dependencies, Ralf Wildenhues, 2006/11/14
- Re: missing dependencies, Bruno Haible, 2006/11/13
- Re: missing dependencies, Ralf Wildenhues, 2006/11/14
- Re: missing dependencies, Jim Meyering, 2006/11/14
Re: inline.m4: use compiler, not cpp, Eric Blake, 2006/11/11