[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
automake 1.7.1 dependency tracking regression?
automake 1.7.1 dependency tracking regression?
Thu, 28 Nov 2002 04:13:57 +0100
Dear automake maintainers,
I have a regression with the new inline "gcc3" dependency tracking for
BUILT_SOURCES, and I am enclosing sources to reproduce below, refined
from a more complex example in "bogofilter" (bogofilter.sourceforge.net).
Scenario: we have a .h file in BUILT_SOURCES but not in our
program_SOURCES, and try to make a particular target, not "all".
In the test case, "make bindir" (which is the only target) on the cold
directory (without any make commands) will fail, unless someone types
make alone or make bindir.h first, but "make" alone will do the job
(it drags itself out by building BUILT_SOURCES first).
Prerequisites for the test code below:
autoconf 2.56, automake 1.7.1, gcc 3.2
Unpack the shar below, then run "autoconf -si && ./configure -C"
Then type "make bindir" -> it will fail, because bindir.h is not
The problem is two-fold:
1. make does not know about the bindir dependency, because
depfiles and config.status rely on "dependencies as side effects".
2. gcc fails the compile because a requested include file is missing.
The workaround is: list the generated header files in _SOURCES, but
that's not the meaning of dependency tracking, and older versions of
automake -- while taking longer -- could resolve this issue, and I
believe pre-3.0 gcc don't fall prey to this behavour either.
Please find the test case as shar below my signature -- I was unsure if
your bug report address handled attachments, so I've gone for shar.
I'd like to be more helpful, suggesting a good way out, but I cannot see
any right now. Either, built sources need more special handling, or the
dependency tracking must somehow catch the gcc3 failure case when an
include file is missing. I'm not sure how gcc has to be changed to
Thanks for your attention.
--- cut here -------------------------------------------------------------
# This is a shell archive (produced by GNU sharutils 4.2c).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
# Made on 2002-11-28 04:01 CET by <address@hidden>.
# Source directory was `/home/emma'.
# Existing files will *not* be overwritten unless `-c' is specified.
# This format requires very little intelligence at unshar time.
# "if test", "echo", "mkdir", and "sed" may be needed.
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 149 -rw-r--r-- automake-bindir/Makefile.am
# 474 -rw-r--r-- automake-bindir/configure.ac
# 108 -rw-r--r-- automake-bindir/bindir.c
shar_tty= shar_n= shar_c='
mkdir _sh04932 || ( echo 'failed to create locking directory' '_sh04932'; exit
# ============= automake-bindir/Makefile.am ==============
if test ! -d 'automake-bindir'; then
$echo $echo_n 'x -' 'automake-bindir: '$echo_c
if mkdir 'automake-bindir'; then $echo 'created'; else $echo 'failed to
if test -f 'automake-bindir/Makefile.am' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'automake-bindir/Makefile.am' '(file already exists)'
$echo 'x -' extracting 'automake-bindir/Makefile.am' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'automake-bindir/Makefile.am' &&
X echo >$@ "#define bindir \"@address@hidden""
: || $echo 'restore of' 'automake-bindir/Makefile.am' 'failed'
# ============= automake-bindir/configure.ac ==============
if test -f 'automake-bindir/configure.ac' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'automake-bindir/configure.ac' '(file already exists)'
$echo 'x -' extracting 'automake-bindir/configure.ac' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'automake-bindir/configure.ac' &&
X# -*- Autoconf -*-
X# Process this file with autoconf to produce a configure script.
XAC_INIT(bindir, 0.1, address@hidden)
X# Checks for programs.
X# Checks for libraries.
X# Checks for header files.
X# Checks for typedefs, structures, and compiler characteristics.
X# Checks for library functions.
: || $echo 'restore of' 'automake-bindir/configure.ac' 'failed'
# ============= automake-bindir/bindir.c ==============
if test -f 'automake-bindir/bindir.c' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'automake-bindir/bindir.c' '(file already exists)'
$echo 'x -' extracting 'automake-bindir/bindir.c' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'automake-bindir/bindir.c' &&
Xint main(int argc, char **argv)
X return 0;
: || $echo 'restore of' 'automake-bindir/bindir.c' 'failed'
$echo $shar_n 'x -' 'lock directory' "\`_sh04932': " $shar_c
if rm -fr _sh04932; then
$echo 'failed to remove'
- automake 1.7.1 dependency tracking regression?,
Matthias Andree <=