Hi,

We are trying to convert existing (and large) 'makefiles' to take advantage of new 
hardware with multiple CPUs. From the manual and man pages, I found our that we can 
activate parallel execution using the '-J' option, and disable it with '.NOTPARALLEL'. 
I was hoping that there are some suggestion on how to enable (or disable) the parallel 
build for specific targets.

For example, we have targets like:

release: pre-compile compile install     # Must be executed serially

and

OBJECTS = file1.o file2.o file3.o

program: $(OBJECTS)                            # can be parallelized
    $(CC) -o program $(OBJECTS)

One possibility is to modify the 'release' target is to expand the dependency (as 
below). I was hoping that there are easier solutions that will reduce the amount of 
rewrites for exisitng makefiles. A good solution will make it possible to mark 
specific targets as "parallel", i.e.:

.NOTPARALLEL: %
.PARALLEL: program

Expanded solution:
release: install

install: compile
    <do install>

compile: pre-compile
    <Do compilation>

Thanks
Yair Lenga



_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to