automake
[Top][All Lists]
Advanced

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

Statically compiled binaries not re-linked as expected.


From: Seb James
Subject: Statically compiled binaries not re-linked as expected.
Date: Fri, 08 May 2009 08:54:27 +0100

Hello,

Adam Mercer's email entitled "rebuilding following a change in prefix?"
reminded me of this problem I have with an autotools-managed project
(automake 1.9, make 3.8, autoconf 2.59).

This project tree is arranged like this:

project/configure.ac
project/Makefile.am
project/mainprog.cpp
project/project/Makefile.am
project/project/libcodefiles.cpp

The Makefile.ams are written so that this builds a binary and a library:

mainprog and libproject(.a, .so)

If the project is configured with default options, then a change to code
in libcodefiles.cpp will lead to a re-compilation of libcodefiles.cpp
and mainprog.cpp.

However, if I reconfigure like this:

./configure --enable-static --disable-shared

Then make clean && make will generate a mainprog with libproject
statically linked into the executable. So far so good.

However, if I change libcodefiles.cpp and re-call make, libproject is
recompiled, but the executable mainprog is not re-linked.

Is this expected behaviour, or have I likely got something wrong in the
Makefile.am?

best regards,

Seb James










reply via email to

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