[Top][All Lists]

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

Re: Recompiling all sources when the makefile changes

From: R. Diez
Subject: Re: Recompiling all sources when the makefile changes
Date: Thu, 9 Oct 2014 20:07:27 +0100

First of all, thanks for your e-mail.

> If "configure" is changing something, an easy and reliable option is 
> to
> ensure that it changes config.h (or some other configuration header),
> which will naturally cause a rebuild of files that include the header.

This is not as straightforward as it sounds. My project currently does not even 
have a config.h file, and even if it had one, there is no reliable way to make 
sure that all sources end up including that file. It may also be a different 
compiler flag that has no effect on the config.h file whatsoever. It is safer 
if all the object files depend on the makefile.

> It's not documented in the manual, but there are automake variables
> that can help you add prerequisites to your object files.  They have
> the form mumble_OBJECTS and contain the list of object files for a
> particular program or library, corresponding to mumble_SOURCES.

Thanks, that looks promising, I'll give it a go.

The fact that is not documented makes me worry that it may change in the future 
without further notice.

Rebuilding all sources after a makefile changes is a basic requirement. Is 
there any chance for somebody from the Automake team to either document this 
mumble_OBJECTS variable, or add some way to trigger this kind of rebuild 
automatically? Or at least add a PROGRAM_OBJECTS_EXTRA_DEPENDENCIES option.

> The object filenames are reliable as long as you don't change any
> settings (like subdir-objects, but also other things).  So it is
> safer to use mumble_OBJECTS in my opinion.

I am not sure what you mean here. Do you mean that, if I turn on subdir-objects 
or some other option, then mumble_OBJECTS may not work any more?

Please copy me on any answers, as I am not subscribed to this list.

Thanks in advance,

reply via email to

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