bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

automake 1.7.1 dependency tracking regression?


From: Matthias Andree
Subject: automake 1.7.1 dependency tracking regression?
Date: Thu, 28 Nov 2002 04:13:57 +0100
User-agent: Mutt/1.5.1i

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
existent.

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.

hen-and-egg-problem.

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
support this.

Thanks for your attention.

-- 
Matthias Andree
--- cut here -------------------------------------------------------------
#!/bin/sh
# 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
#
echo=echo
shar_tty= shar_n= shar_c='
'
mkdir _sh04932 || ( echo 'failed to create locking directory' '_sh04932'; exit 
1 )
# ============= 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 
create'; fi
fi
if test -f 'automake-bindir/Makefile.am' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'automake-bindir/Makefile.am' '(file already exists)'
else
  $echo 'x -' extracting 'automake-bindir/Makefile.am' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'automake-bindir/Makefile.am' &&
XAUTOMAKE_OPTIONS=1.7 foreign
Xnoinst_PROGRAMS=bindir
Xbindir_SOURCES=bindir.c
XBUILT_SOURCES=bindir.h
Xbindir.h:
X       echo >$@ "#define bindir \"@address@hidden""
SHAR_EOF
  : || $echo 'restore of' 'automake-bindir/Makefile.am' 'failed'
fi
# ============= 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)'
else
  $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.
X
XAC_PREREQ(2.56)
XAC_INIT(bindir, 0.1, address@hidden)
XAC_CONFIG_SRCDIR([bindir.c])
XAC_CONFIG_HEADER([config.h])
XAM_INIT_AUTOMAKE
X
X# Checks for programs.
XAC_PROG_CC
X
X# Checks for libraries.
X
X# Checks for header files.
X
X# Checks for typedefs, structures, and compiler characteristics.
X
X# Checks for library functions.
XAC_OUTPUT(Makefile)
SHAR_EOF
  : || $echo 'restore of' 'automake-bindir/configure.ac' 'failed'
fi
# ============= 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)'
else
  $echo 'x -' extracting 'automake-bindir/bindir.c' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'automake-bindir/bindir.c' &&
X#include <stdio.h>
X#include "bindir.h"
X
Xint main(int argc, char **argv)
X{
X    puts(bindir);
X    return 0;
X}
SHAR_EOF
  : || $echo 'restore of' 'automake-bindir/bindir.c' 'failed'
fi
$echo $shar_n 'x -' 'lock directory' "\`_sh04932': " $shar_c
if rm -fr _sh04932; then
  $echo 'removed'
else
  $echo 'failed to remove'
fi
exit 0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]