automake
[Top][All Lists]
Advanced

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

Recompiling all sources when the makefile changes


From: R. Diez
Subject: Recompiling all sources when the makefile changes
Date: Thu, 9 Oct 2014 14:53:09 +0100

Hi there:

I have the following open-source project that cross-compiles to an embedded 
target:

https://github.com/rdiez/JtagDue

I am using Ubuntu 14.04, which comes with autoconf 2.69 and automake 1.14.1. I 
am building out of the source tree.

I noticed that, if I change the version number in the top-level configure.ac by 
amending the call to AC_INIT(), running "make" in the build directory 
automatically regenerates the 'configure' script and re-runs it. However, the 
C++ source files are not rebuilt, because everything is up to date. So it looks 
like the Autotools get the job only partially done.

I searched the Internet and found a number of people asking similar questions, 
like how to rebuild all sources if the compiler flags change. However, I have 
not found yet an easy or reliable way to achieve this with Automake.

I tried the "maintainer mode", but whatever it actually does, it does not help.

There is a variable called EXTRA_<program name>_DEPENDENCIES, but it triggers a 
re-link only, not a full C++ recompile.

I could try to make all object files depend on the makefile, which may not be 
completely accurate if the makefile includes other files, but it would probably 
be enough. However, I did not find a way to add an extra dependency to all .o 
files.

I could try to manually guess the .o filenames from the .cpp filenames, but 
those .o filenames may change in the future, especially in the face of 
subdir-objects .

Is there some Automake variable that lists all the object files for a given 
program?

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

Thanks in advance,
  rdiez




reply via email to

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