| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: make.1,v 1.245 2015/04/09 18:22:08 sjg Exp $ | | 1 | .\" $NetBSD: make.1,v 1.246 2015/04/10 08:43:16 wiz Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 1990, 1993 | | 3 | .\" Copyright (c) 1990, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | | 4 | .\" The Regents of the University of California. All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" Redistribution and use in source and binary forms, with or without | | 6 | .\" Redistribution and use in source and binary forms, with or without |
7 | .\" modification, are permitted provided that the following conditions | | 7 | .\" modification, are permitted provided that the following conditions |
8 | .\" are met: | | 8 | .\" are met: |
9 | .\" 1. Redistributions of source code must retain the above copyright | | 9 | .\" 1. Redistributions of source code must retain the above copyright |
10 | .\" notice, this list of conditions and the following disclaimer. | | 10 | .\" notice, this list of conditions and the following disclaimer. |
11 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 11 | .\" 2. Redistributions in binary form must reproduce the above copyright |
12 | .\" notice, this list of conditions and the following disclaimer in the | | 12 | .\" notice, this list of conditions and the following disclaimer in the |
13 | .\" documentation and/or other materials provided with the distribution. | | 13 | .\" documentation and/or other materials provided with the distribution. |
14 | .\" 3. Neither the name of the University nor the names of its contributors | | 14 | .\" 3. Neither the name of the University nor the names of its contributors |
| @@ -471,46 +471,46 @@ or | | | @@ -471,46 +471,46 @@ or |
471 | the command is treated specially. | | 471 | the command is treated specially. |
472 | A | | 472 | A |
473 | .Ql Ic @ | | 473 | .Ql Ic @ |
474 | causes the command not to be echoed before it is executed. | | 474 | causes the command not to be echoed before it is executed. |
475 | A | | 475 | A |
476 | .Ql Ic + | | 476 | .Ql Ic + |
477 | causes the command to be executed even when | | 477 | causes the command to be executed even when |
478 | .Fl n | | 478 | .Fl n |
479 | is given. | | 479 | is given. |
480 | This is similar to the effect of the .MAKE special source, | | 480 | This is similar to the effect of the .MAKE special source, |
481 | except that the effect can be limited to a single line of a script. | | 481 | except that the effect can be limited to a single line of a script. |
482 | A | | 482 | A |
483 | .Ql Ic \- | | 483 | .Ql Ic \- |
484 | in compatibility mode | | 484 | in compatibility mode |
485 | causes any non-zero exit status of the command line to be ignored. | | 485 | causes any non-zero exit status of the command line to be ignored. |
486 | .Pp | | 486 | .Pp |
487 | When | | 487 | When |
488 | .Nm | | 488 | .Nm |
489 | is run in jobs mode with | | 489 | is run in jobs mode with |
490 | .Fl j Ar max_jobs , | | 490 | .Fl j Ar max_jobs , |
491 | the entire script for the target is fed to a | | 491 | the entire script for the target is fed to a |
492 | single instance of the shell. | | 492 | single instance of the shell. |
493 | In compatibility (non-jobs) mode, each command is run in a separate process. | | 493 | In compatibility (non-jobs) mode, each command is run in a separate process. |
494 | If the command contains any shell meta characters | | 494 | If the command contains any shell meta characters |
495 | .Pq Ql #=|^(){};&<>*?[]:$`\e\en | | 495 | .Pq Ql #=|^(){};&<>*?[]:$`\e\en |
496 | it will be passed to the shell; otherwise | | 496 | it will be passed to the shell; otherwise |
497 | .Nm | | 497 | .Nm |
498 | will attempt direct execution. | | 498 | will attempt direct execution. |
499 | If a line starts with | | 499 | If a line starts with |
500 | .Ql Ic \- | | 500 | .Ql Ic \- |
501 | and the shell has ErrCtl enabled then failure of the command line | | 501 | and the shell has ErrCtl enabled then failure of the command line |
502 | will be ignored as in compatibility mode. | | 502 | will be ignored as in compatibility mode. |
503 | Otherwise | | 503 | Otherwise |
504 | .Ql Ic \- | | 504 | .Ql Ic \- |
505 | affects the entire job; | | 505 | affects the entire job; |
506 | the script will stop at the first command line that fails, | | 506 | the script will stop at the first command line that fails, |
507 | but the target will not be deemed to have failed. | | 507 | but the target will not be deemed to have failed. |
508 | .Pp | | 508 | .Pp |
509 | Makefiles should be written so that the mode of | | 509 | Makefiles should be written so that the mode of |
510 | .Nm | | 510 | .Nm |
511 | operation does not change their behavior. | | 511 | operation does not change their behavior. |
512 | For example, any command which needs to use | | 512 | For example, any command which needs to use |
513 | .Dq cd | | 513 | .Dq cd |
514 | or | | 514 | or |
515 | .Dq chdir | | 515 | .Dq chdir |
516 | without potentially changing the directory for subsequent commands | | 516 | without potentially changing the directory for subsequent commands |