[EXIM] The Exim Makefile

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: exim-users
Sujet: [EXIM] The Exim Makefile
On Thu, 8 Oct 1998, I wrote:

> I am considering revamping the makefile so that it
> will be mandatory to use two commands...


For General Information:

When I actually started to look at it, I found I could retain the
single call to "make" at the top level, but without the need for running
the "make" program from within itself. The feature that is lost is that
if you run "make" from within the build directory, it is incapable of
rebuilding the makefile (but it tells you it needs doing). I don't
suppose many people other than me ever did this.

Warning: nitty-gritty follows; skip if you are not interested.

I have also arranged that the rebuilding properties are now the same on
IRIX as on other systems (at least on the IRIX 6.5 release, which is
where I was testing). For those that like to know details of such
things, the IRIX "make" program behaves differently in cases like

X:  Y
    commands to build X, using Y


FORCE:

Y:  FORCE
    run something that might or might not rebuild Y


On all systems the "something" gets run (when building Exim it's the
sub-make of the lookups, directors, routers, transports, libident, and
pcre). However, on Solaris 2 (and others), if the "something" does not
actually rebuild Y, then X does not get rebuilt. However on IRIX, it
does rebuild X, unnecessarily. What you see with Exim is that if you run
another "make" after you have built it, it adjusts the compile number
and re-links it, every time. It seems to be predicating the rebuild of X
on running the target Y rather than the timestamp on Y.

I tried re-organizing this as

X:  Z Y
    commands to build X, using Y


Z:; run something that might or might not rebuild Y

which again works on Solaris, but not on IRIX. What happens is that if
it does rebuild Y, it doesn't rebuild X (but will do so if you run
"make" again.) Looks as if it's picking up the timestamp of Y before
running the Z target.

Anyway, since the building of Exim is actually a combination of "make"
and scripts, I was able to move some of the logic from the makefile into
some of the scripts, and end up with a scheme that is tidy in both
worlds. It always runs the sub-makes for the components, but only
rebuilds at the top level if anything actually changed.

I hope this will do away with the strange problems some people have had
while building Exim.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



--
*** Exim information can be found at http://www.exim.org/ ***