Index: en_US.ISO8859-1/books/pmake/basics/chapter.xml =================================================================== --- en_US.ISO8859-1/books/pmake/basics/chapter.xml +++ en_US.ISO8859-1/books/pmake/basics/chapter.xml @@ -723,41 +723,35 @@
Parallelism - PMake was specifically designed - to re-create several targets at once, when possible. You do not - have to do anything special to cause this to happen (unless - PMake was configured to not act in - parallel, in which case you will have to make use of the + PMake is designed + to simultaneously re-create many targets. + This can be disabled by configuring + PMake to not act in + parallel, using the and flags (see below)), - but you do have to be careful at times. + but doing so can create some issues. - There are several problems you are likely to encounter. One - is that some makefiles (and programs) are written in such a way - that it is impossible for two targets to be made at once. The - program xstr, for example, always + Several problems can appear when using PMake to re-create multiple targets. One + issue is some makefiles (and programs) are written in a way + that prevents two targets building simultaneously. For example, the + program xstr always modifies the files strings and - x.c. There is no way to change it. Thus - you cannot run two of them at once without something being - trashed. Similarly, if you have commands in the makefile that - always send output to the same file, you will not be able to - make more than one target at once unless you change the file you - use. You can, for instance, add a $$$$ to - the end of the file name to tack on the process ID of the shell - executing the command (each $$ expands to a - single $, thus giving you the shell variable - $$). Since only one shell is used for all - the commands, you will get the same file name for each command - in the script. + x.c. Because of this, running two + instances of xstr will result in a + break in the files. + Similarly, commands in a makefile that + always send output to the same file will be unable to + make more than one target at once unless the output file is changed. - The other problem comes from improperly-specified - dependencies that worked in Make + Another issue comes from improperly specified + dependencies. Many dependencies previously worked in Make because of its sequential, depth-first way of examining them. - While I do not want to go into depth on how - PMake works (look in if you are interested), I will warn you that - files in two different levels of the dependency tree may be - examined in a different order in + However, files in two different levels of the dependency tree + may be examined in a different order in PMake than they were in - Make. + Make. If interested, see for a detailed examination of + PMake's functionality. For example, given the makefile: a : @@ -767,22 +761,23 @@ PMake will examine the targets in the order c, d, b, - a. If the makefile's author expected - PMake to abort before making - c if an error occurred while making - b, or if b - needed to exist before c was made, - (s)he will be sorely disappointed. The dependencies are + a. Because of the build order, + PMake will continue making + c, even if an error occurred while making + b, also if b + needed to exist before c was made. + The dependencies are incomplete, since in both these cases, c would depend on - b. So watch out. + b. - Another problem you may face is that, while - PMake is set up to handle the output - from multiple jobs in a graceful fashion, the same is not so for - input. It has no way to regulate input to different jobs, so if - you use the redirection from /dev/tty I - mentioned earlier, you must be careful not to run two of the + One final issue with + PMake is its problem handling input + from multiple jobs. + It has no way to regulate input to different jobs, which can + lead to build errors. If + using the redirection from /dev/tty + mentioned earlier, avoid running two of the jobs at once.