Tom Tromey wrote:
> 
> This sounds like a bug.  Do you have a simpler example than your
> project?  Or could you describe it in more detail?
> 

Here is the simplest example I can come up with.

./configure.in:

    AC_INIT(foo.c)
    AM_INIT_AUTOMAKE(foobar, 0)
    AC_PROG_CC
    AC_OUTPUT(Makefile)

./foo.c:

    #include "foobar.h"

    int main(int argc, char *argv[])
    {
        return bar(argc, argc);
    }

./Makefile.am:

    AUTOMAKE_OPTIONS = foreign
    INCLUDES = -I./include
    bin_PROGRAMS = foobar
    foobar_SOURCES = foo.c bar/bar.c

./bar/bar.c:

    #include "foobar.h"

    int bar(int a, int b)
    {
        return a + b;
    }

./include/foobar.h

    extern int bar(int a, int b);

[pilcher@home foo]$ autoheader
[pilcher@home foo]$ aclocal
[pilcher@home foo]$ autoconf
[pilcher@home foo]$ automake -a
automake: configure.in: installing `./install-sh'
automake: configure.in: installing `./mkinstalldirs'
automake: configure.in: installing `./missing'
[pilcher@home foo]$ ./configure
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
[pilcher@home foo]$ make
gcc -DPACKAGE=\"foobar\" -DVERSION=\"0\"  -I. -I.  -I./include    -g -O2
-c foo.c
gcc -DPACKAGE=\"foobar\" -DVERSION=\"0\"  -I. -I.  -I./include    -g -O2
-c bar/bar.c
gcc  -g -O2  -o foobar  foo.o bar/bar.o
gcc: bar/bar.o: No such file or directory
make: *** [foobar] Error 1

> Also, what version of automake are you using?
> 

automake-1.4p5-2 on Red Hat 7.2.

Thanks!

-- 
========================================================================
Ian Pilcher                                           [EMAIL PROTECTED]
========================================================================


Reply via email to