help-make
[Top][All Lists]
Advanced

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

how to serialize rule evaluation


From: Kevin Nomura
Subject: how to serialize rule evaluation
Date: Thu, 24 Jan 2002 17:29:58 -0800

I have a large makefile in which some header files are generated
as make runs.  But it is impractical to list those headers as
prerequisites of the source files which use them.  So there is a
race condition that I need to solve.  I'm using make 3.79.1 on
solaris, linux and osf1.

Say the header generation steps can be summarized by a single target,
.genheaders, while the object files are given in $(objs).  So this
will work:

================================
default:        .genheaders
        $(MAKE) -f Makefile.3 $(objs)

But it is too slow, because the Makefile is enormous and it gets
reparsed.  Is there some way to avoid that?

=================================

Alternatively it is too conservative to specify:

$(objs):        .genheaders

because that rebuilds the world if any header is generated.  Can I 
somehow specify precedence only, meaning to wait on evaluating $(objs)
until .genheaders is up-to-date?

Thanks for any advice.

Kevin Nomura
Network Appliance



reply via email to

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