[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
About .NOTPARALLEL
From: |
Peng Yu |
Subject: |
About .NOTPARALLEL |
Date: |
Sun, 17 Apr 2011 16:44:30 -0500 |
Hi,
`.NOTPARALLEL'
If `.NOTPARALLEL' is mentioned as a target, then this invocation
of `make' will be run serially, even if the `-j' option is given.
Any recursively invoked `make' command will still run recipes in
parallel (unless its makefile also contains this target). Any
prerequisites on this target are ignored.
According to the above explanation form the manual, it seems that the
behavior of the following makefile should be that all the four .txt
files should be generated in series when -j is used.
#################
.PHONY: all clean
all: a.txt b.txt c.txt d.txt
.NOTPARALLEL:
%.txt:
sleep 2; touch $@
clean:
$(RM) *.txt
##################
However, I think the syntax of .NOTPARALLEL can be improved a little.
For example, I'd like the a.txt and b.txt are not generated in
parallel with anything other .txt files, but c.txt and d.txt be
generated in parallel, when '-j' option is used. Currently the
following Makefile is essentially the same as the above one. May I
suggest to add this syntax to make?
##################
.PHONY: all clean
all: a.txt b.txt c.txt d.txt
.NOTPARALLEL: a.txt b.txt
%.txt:
sleep 2; touch $@
clean:
$(RM) *.txt
###############
--
Regards,
Peng
- About .NOTPARALLEL,
Peng Yu <=