automake
[Top][All Lists]
Advanced

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

Re: Seeking simple example for "shallow" tree


From: Ian Pilcher
Subject: Re: Seeking simple example for "shallow" tree
Date: Fri, 12 Apr 2002 19:46:31 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020312

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);

address@hidden foo]$ autoheader
address@hidden foo]$ aclocal
address@hidden foo]$ autoconf
address@hidden foo]$ automake -a
automake: configure.in: installing `./install-sh'
automake: configure.in: installing `./mkinstalldirs'
automake: configure.in: installing `./missing'
address@hidden 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
address@hidden 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                                           address@hidden
========================================================================




reply via email to

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