[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't repeat build.
From: |
Ralf Wildenhues |
Subject: |
Re: Can't repeat build. |
Date: |
Wed, 21 Jan 2009 22:39:29 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello Dan,
* Dan Smithers wrote on Wed, Jan 21, 2009 at 03:19:06PM CET:
> I have configure.ac in the top directories and Makefile.am in all source
> directories and top directories.
>
> I use a sequence
>
> autoreconf --install
> cd build
> ../configure <options>
> make
>
> Sometime this works fine. On other occasions I get an error
>
> automake-1.10: no Automake input file found for
> `activation_analyser/src/Makefile.in'
> automake-1.10: no input file among supplied arguments.
Can you post the command that caused this error, including the 'make'
sequence leading up to it, please?
> sometime this happens because I have edited a Makefile.am without
> clearing out the build directory and repeating the autoreconf step. Is
> this the wrong way to use autotools?
No, it should work fine.
Are you using AM_MAINTAINER_MODE by the way?
> Also, I am a bit confused about when to use $(srcdir) and $(top_builddir).
Well, imagine instead of
cd build
../configure
I would do
mkdir /dev/shm/build
cd /dev/shm/build
/path/to/configure <options>
then everything that is below /dev/shm should be part of the build tree,
thus referenced using relative paths or $(top_builddir). Everything in
the source tree may be referenced using $(srcdir) or $(top_srcdir). The
choice between the latter two can be based upon taste or convenience
sometimes, typically done so that it can be easily reused elsewhere.
It does have some consequences though: when the file is used as target
or dependency, 'make' will typically not identify paths like ../sub/file
and ./file (and most non-GNU will not even identify the latter file
plain file).
> I have several related executables and libraries.
> In Makefile.am I use
> AM_CPPFLAGS=$(srcdir)/../include
Did you mean
AM_CPPFLAGS=-I$(srcdir)/../include
here?
> to get the exported header files for the current target
>
> $(srcdir)/../../libname/include to get exported header files for library
> name.
> bin_PROGRAM=exec
> exec_SOURCES=exec.c
> exec_LDADD=$(top_builddir)/../libname/src/.libs -lname
Please replace this line with
exec_LDADD=$(top_builddir)/../libname/src/libname.la
but I do wonder: $(top_builddir)/.. points outside of the build tree.
Is that an error or on purpose?
Cheers,
Ralf
Re: Can't repeat build., Ralf Wildenhues, 2009/01/24