[Top][All Lists]

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

Re: Dependency issues after adding new sources.

From: Xochitl Lunde
Subject: Re: Dependency issues after adding new sources.
Date: Fri, 11 Sep 2009 10:59:15 -0500

address@hidden wrote on 09/11/2009 
10:24:58 AM:

> Please excuse my ignorance, but my search fu is weak, and I think the
> authors of tfm are conspiring to bewilder me.  I have read several 
> and discussions on how to use the autotools, but to be honest my
> understanding of them is extremely limited at best.
> I have this problem with several of my programs, but it's most 
> with my current program, which at the moment has a flat directory 
>  The program in question is developed little by little, so from time to 
> I need to add new source files to the program's _SOURCES in 
> was under the impression that after doing so, running make from the 
> directory would magically figure everything out and build the program
> correctly.  What happens instead is the Makefile appears to be 
> but my new sources are not included in it.  I have tried multiple 
methods to
> fix this, most of them to no avail.  Currently, the new sources are 
> and are linked into the executable, but most of the old sources aren't 
> rebuilt when a common header is changed.  The only thing that fixes all 
> issues is to start with an empty build directory and re-run the 
> script.  I doubt that it's really necessary to create a new build 
> every time I add a new class.  So what could I be doing wrong?  I will
> gladly share any information about my build environment that may help a
> diagnosis, but I'd prefer to keep the code private.

Sometimes just 'make' will figure it out for you and sometimes not.  I'm 
sorry I don't know the specifics, but for example, if you add source file 
to '', and forget the trailing '\' to append the next source 
file then it will not regenerate correctly for you until you fix the 
problem and re-run the whole shebang.  If you make interesting changes in or, it's most reliable to just run the whole 
build again from the command line in the directory where your 
is stored.

$> aclocal;autoconf;automake --add-missing;./configure <your-options-here>

If it turns out you are still missing some needed build files after doing 
this, you can try running 'autoreconf --force --install', which does help 
me sometimes on certain systems after a fresh source checkout.  Then after 
all that you should be good to run 'make'.  If you edit '' or 
'', then you want to run that command line again with 
aclocal;autoconf;automake and configure.  Sometimes you have to do it, and 
sometimes not. It sort of depends on what you change whether or not you 
can get away with just running 'make' again.  Note that if you are 
changing code, you don't have to do this, only if you are changing 
'' or ''.  If you are only changing code then you 
can run 'make clean' and 'make' as much as you like without redoing the 

Your new source files might end up missing, because I think 'automake' 
command is responsible for translating '' into ''. 
Then './configure' will create all the Makefiles listed in AC_OUTPUT from 
all ''.  If you typed 'make' and automake tried to regenerate 
the '', but there was a mistake in '', then you are 
stuck until you fix '' and run that long command line again.

reply via email to

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