tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Question about bmake in parallel mode
Hi. I'm developing an application with bmake as a build system.
The simplified version of Makefile is below.
The problem in it is that it doesn't work with -jN because
order of build "realdelete" and "/tmp/first" (both they are dependencies
for "delete")
is not specified regardless phony target /tmp/first is a
prerequisite for phony target "delete".
In general I often want to do the following. A target "first" is
a prerequisite for phony target "last" which in turn has a number of
prerequisites, and I want to build "first" before any prerequisite for
"last"
and "last" itself.
In this simple Makefile uncommenting the first .ORDER line solves the
problem.
But in general I have to track all dependencies for the target "delete"
and use something like
.ORDER: all_prerequisites_for(delete) realdelete
This is the second commented line in Makefile. It is possible in bmake?
Is there any "cleverer" alternatives?
Manually tracking dependencies for "delete" is a bad solution because
I have no control over other programmer's needs and code.
Any help?
=============================
.PHONY: all delete realdelete
all: delete
delete: /tmp/first
#.ORDER: /tmp/first realdelete
#.ORDER: all_prerequisites_for(delete) realdelete
delete: realdelete
realdelete:
rm /tmp/first
/tmp/first:
touch /tmp/first
=============================
Home |
Main Index |
Thread Index |
Old Index