• Home
  • Raw
  • Download

Lines Matching refs:commands

23 and issues the commands to recompile them.
157 * Force Targets:: You can use a target without commands
187 * Commands/Search:: How to write shell commands that work together
200 * Echoing:: How to control when commands are echoed.
201 * Execution:: How commands are executed.
202 * Parallel:: How commands can be executed in parallel.
206 * Sequences:: Defining canned sequences of commands.
207 * Empty Commands:: Defining useful, do-nothing commands.
212 * Variables in Commands:: Using @code{make} variables in commands.
217 to run commands.
225 helps debug use of recursive @code{make} commands.
279 kind of thing to do with the commands
292 to get the commands for updating a file.
297 * Last Resort:: How to define commands for rules which
308 commands of implicit rules.
335 program need to be recompiled, and issues commands to recompile them.
365 in your program and provides commands for updating each file.
380 issues the commands recorded in the data base.
434 or unusual tools in your commands: you can almost always emulate what
435 such a tool would do with simple shell commands. Finally, be sure to
473 run miscellaneous commands when explicitly asked (for example, to remove
508 @cindex commands, introduction to
534 specifies commands for the target need not have prerequisites. For
540 the commands on the prerequisites to create or update the target. A
558 defining editing commands include @file{command.h}, and only low
627 prerequisites. These shell commands say how to update the target file.
630 mind that @code{make} does not know anything about how the commands
631 work. It is up to you to supply commands that will update the target
632 file properly. All @code{make} does is execute the commands in the rule
643 is to run the specified commands. Targets that do not refer to files
796 @cindex deducing commands (implicit rules)
800 It is not necessary to spell out the commands for compiling the individual
805 @file{main.o}. We can therefore omit the commands from the rules for the
810 the @samp{.c} files from the prerequisites, provided we omit the commands.
963 may also give commands to use to create or update the targets.
971 with a name similar to the target and gives commands to create or
1419 commands but no prerequisites, that file will always be remade
1421 double-colon rule with commands but no prerequisites will be remade every
1427 with commands but no prerequisites.@refill
1454 and then print the commands to update @file{foo} and its prerequisites
1455 without running them. The commands printed for @file{foo} will be those
1465 @file{mfile}, print the commands needed to update it without actually
1466 running them, and then print the commands needed to update @file{foo}
1467 without running them. The commands for @file{foo} will be those
1478 However, if the two makefiles give different commands for the same
1505 commands from the pattern rule: @samp{make -f Makefile bar}. If
1512 prerequisite @file{force}, to guarantee that the commands will be run even
1514 commands to prevent @code{make} from searching for an implicit rule to
1601 and the commands used to construct the target are always deferred. This
1817 @dfn{commands} to use to create or update the target.
1843 * Force Targets:: You can use a target without commands
1924 @cindex commands
1925 @cindex tab character (in commands)
1962 How to update is specified by @var{commands}. These are lines to be
1980 execution of build commands: any commands necessary to build any of a
1981 target's prerequisites will be fully executed before any commands
2037 targets and in prerequisites. In commands the shell is responsible
2056 Wildcards can be used in the commands of a rule, where they are expanded
2243 * Commands/Search:: How to write shell commands that work together
2470 @cindex directory search (@code{VPATH}), and shell commands
2473 this cannot change the commands of the rule; they will execute as written.
2474 Therefore, you must write the commands with care so that they will look for
2496 want to mention in the commands. The automatic variable @samp{$<} is
2526 The commands of implicit rules normally use automatic variables as a
2598 name for some commands to be executed when you make an explicit request.
2602 If you write a rule whose commands will not create the target file, the
2603 commands will be executed every time the target comes up for remaking.
2623 commands would not be executed. To avoid this problem, you can explicitly
2632 Once this is done, @samp{make clean} will run the commands regardless of
2673 overcome by adding shell commands to note the error and exit, but then
2704 is, its commands are run every time @code{make} goes to update that
2706 target, the phony target commands will be executed only when the phony
2759 @cindex rule, no commands or prerequisites
2761 If a rule has no prerequisites or commands, and the target of the rule
2764 depending on this one will always have their commands run.
2777 target @file{clean} that depends on it is forced to run its commands.
2795 commands for an action that you request explicitly from time to time.
2800 last-modification time, when the rule's commands were last executed. It
2801 does so because one of the commands is a @code{touch} command to update the
2806 commands are executed if any prerequisite is more recent than the target;
2839 @code{make} will run its commands unconditionally, regardless of
2853 The commands specified for @code{.DEFAULT} are used for any target for
2855 @xref{Last Resort}. If @code{.DEFAULT} commands are specified, every
2857 these commands executed on its behalf. @xref{Implicit Rule Search,
2867 execution of their commands, the target is not deleted.
2918 changed and its commands exit with a nonzero exit status, just as it
2925 ignore errors in execution of the commands run for those particular
2926 files. The commands for @code{.IGNORE} are not meaningful.
2929 ignore errors in execution of commands for all files. This usage of
2933 commands. @xref{Errors, ,Errors in Commands}.
2939 @command{make} assumes that these files are created by commands that
2940 generate low resolution time stamps. The commands for
2946 resolution file time stamp, so commands like @samp{cp -p} that
2975 not print the commands to remake those particular files before executing
2976 them. The commands for @code{.SILENT} are not meaningful.
2979 to print any commands before executing them. This usage of
2981 recommend you use the more selective ways to silence specific commands.
2982 @xref{Echoing, ,Command Echoing}. If you want to silence all commands
3022 one target, and all identical aside from that. The same commands apply to
3031 You want just prerequisites, no commands. For example:
3042 Similar commands work for all the targets. The commands do not need
3045 commands (@pxref{Automatic Variables}). For example:
3074 much as the variable @samp{$@@} allows you to vary the commands.
3089 the commands are executed.
3091 There can only be one set of commands to be executed for a file. If
3092 more than one rule gives commands for the same file, @code{make} uses
3097 useful to have the same target invoke multiple commands which are
3135 If none of the explicit rules for a target has commands, then @code{make}
3136 searches for an applicable implicit rule to find some commands
3167 @var{commands}
3282 but it @emph{does} apply only when the target has no commands otherwise
3290 rules apply, and both have commands, that's an error.
3323 of them is independent of the others. Each double-colon rule's commands
3325 If there are no prerequisites for that rule, its commands are always
3335 sense are those where the order of executing the commands would not matter.
3342 Each double-colon rule should specify commands; if it does not, an
3489 @cindex commands, how to write
3490 @cindex rule commands
3491 @cindex writing rule commands
3493 The commands of a rule consist of one or more shell command lines to
3495 result of executing these commands is that the target of the rule is
3498 Users use many different shell programs, but commands in makefiles are
3504 * Echoing:: How to control when commands are echoed.
3505 * Execution:: How commands are executed.
3506 * Parallel:: How commands can be executed in parallel.
3510 * Sequences:: Defining canned sequences of commands.
3511 * Empty Commands:: Defining useful, do-nothing commands.
3517 @cindex syntax of commands
3521 (@pxref{Makefiles, ,Writing Makefiles}). However, commands are meant to be
3542 @cindex comments, in commands
3543 @cindex commands, comments in
3544 @cindex @code{#} (comments), in commands
3565 * Variables in Commands:: Using @code{make} variables in commands.
3570 @cindex commands, splitting
3571 @cindex splitting commands
3572 @cindex commands, backslash (@code{\}) in
3573 @cindex commands, quoting newlines in
3574 @cindex backslash (@code{\}), in commands
3575 @cindex @code{\} (backslash), in commands
3576 @cindex quoting newline, in commands
3577 @cindex newline, quoting, in commands
3611 consists of four separate shell commands where the output is:
3697 @cindex variable references in commands
3698 @cindex commands, using variables in
3700 The other way in which @code{make} processes commands is by expanding
3704 commands for targets which are not rebuilt are never expanded.
3706 Variable and function references in commands have identical syntax and
3749 @cindex echoing of commands
3751 @cindex @code{@@} (in commands)
3752 @cindex commands, echoing
3753 @cindex printing of commands
3757 are typing the commands yourself.
3774 it only echoes commands, it won't execute them. @xref{Options Summary,
3776 commands starting with @samp{@@} are printed. This flag is useful for
3777 finding out which commands @code{make} thinks are necessary without
3785 flag to @code{make} prevents all echoing, as if all commands
3793 @cindex commands, execution
3794 @cindex execution, of commands
3798 When it is time to execute commands to update a target, they are
3804 @cindex shell variables, setting in commands
3805 @cindex commands setting shell variables
3807 invoking shell commands such as @code{cd} that set a context local to
3830 to run commands.
3852 is @emph{not} exported in the environment to commands that @code{make}
3857 environment to commands.
3934 @cindex commands, execution in parallel
3941 GNU @code{make} knows how to execute several commands at once.
3944 @samp{--jobs} option tells @code{make} to execute many commands
3951 commands to execute at once; this is called the number of @dfn{job slots}.
3956 One unpleasant consequence of running several commands simultaneously is
3957 that output generated by the commands appears whenever each command
3958 sends it, so messages from different commands may be interspersed.
3980 all commands.
4028 @cindex errors (in commands)
4029 @cindex commands, errors in
4045 @cindex @code{-} (in commands)
4067 flag, errors are ignored in all commands of all rules. A rule in the
4080 commands will be executed for these targets, since their preconditions
4183 You can write recursive @code{make} commands just by copying this example,
4187 @code{make} commands as @samp{.PHONY} (for more discussion on when
4207 helps debug use of recursive @code{make} commands.
4215 Recursive @code{make} commands should always use the variable @code{MAKE},
4232 @cindex +, and commands
4233 As a special feature, using the variable @code{MAKE} in the commands of
4246 any commands; see @ref{Instead of Execution}.) Following the usual
4251 commands.@refill
4260 flag that causes most commands not to be run. The usual
4264 commands, is propagated to the subsystem.@refill
4422 have variables exported for some commands and not for others. The last
4442 commands to use additional makefiles. The value of @code{MAKEFILES} is
4640 @cindex sequences of commands
4641 @cindex commands, sequences of
4643 When the same sequence of commands is useful in making various targets, you
4649 Here is an example of defining a canned sequence of commands:
4662 commands. The @code{define} directive does not expand variable references
4674 To use the canned sequence, substitute the variable into the commands of a
4692 commands based on the file names involved
4727 does not echo @emph{any} commands.
4732 @cindex empty commands
4733 @cindex commands, empty
4735 It is sometimes useful to define commands which do nothing. This is done
4748 @findex .DEFAULT@r{, and empty commands}
4751 from getting implicit commands (from implicit rules or the
4780 substituted by explicit request into targets, prerequisites, commands,
4786 read, except for the shell commands in rules, the right-hand sides of
4848 commands, most directives, and new variable values. Here is an
5638 both canned sequences of commands
5680 since two commands separated by semicolon behave much like two separate
5681 shell commands. However, note that using two separate lines means
5879 commands at the time of execution.@refill
6143 conditionals because they are not defined until commands are run
6189 the files to operate on or the commands to use. You use a function in a
7207 execution of the commands for each rule
7298 @cindex commands, expansion
7315 The commands run by calls to the @code{shell} function are run when the
7439 kind of thing to do with the commands
7536 Another use of specifying a goal is to run the commands associated with
7575 for commands; copy any auxiliary files that the executable uses into
7610 @cindex commands, instead of executing
7627 ``No-op''. The activity is to print what commands would be used to make
7648 are up to date already; but execute no commands in either case. In other
7669 With the @samp{-n} flag, @code{make} prints the commands that it would
7672 With the @samp{-t} flag, @code{make} ignores the commands in the rules
7679 commands, but the exit status code it returns is zero if and only if the
7706 executing commands, the @samp{-W} flag can direct @code{make} to act
7734 commands in the rules, but rather to mark the target up to date by
7834 gives up immediately, returning a nonzero status. No further commands are
7852 after failed shell commands, @samp{make -k} will continue as much as
7983 Ignore all errors in commands executed to remake files.
7999 Specifies the number of jobs (commands) to run simultaneously. With no
8003 for more information on how commands are run.
8021 Specifies that no new jobs (commands) should be started if there are
8046 Print the commands that would be executed, but do not execute them.
8080 ``Question mode''. Do not run any commands, or print anything; just
8119 Silent operation; do not print the commands as they are executed.
8143 instead of running their commands. This is used to pretend that the
8144 commands were done, in order to fool future invocations of
8160 from complicated nests of recursive @code{make} commands.
8220 The built-in implicit rules use several variables in their commands so
8242 to get the commands for updating a file.
8247 * Last Resort:: How to define commands for rules which
8260 all you have to do is refrain from specifying commands yourself. Either
8277 If an implicit rule is found, it can supply both commands and one or
8306 for each double-colon rule, that has no commands. A file that is mentioned
8329 commands, you can give that target empty commands by writing a semicolon
8619 However, the commands in built-in implicit rules actually use
8621 @code{PREPROCESS.S}, whose values contain the commands listed above.
8646 The commands in built-in implicit rules make liberal use of certain
8971 commands of implicit rules.
9028 commands. If a pattern rule has multiple targets, @code{make} knows that
9029 the rule's commands are responsible for making all of the targets. The
9030 commands are executed only once to make all the targets. When searching
9033 @code{make} worries only about giving commands and prerequisites to the file
9034 presently in question. However, when this file's commands are run, the
9146 rule's commands to be run.
9159 The name of the first prerequisite. If the target got its commands from
9191 primarily useful for use in linking commands where it is meaningful to
9425 considered. These dummy rules have no prerequisites and no commands, and
9446 prerequisites, but different commands. When the new rule is defined, the
9451 same target and prerequisites, but no commands. For example, the following
9467 commands are used for all targets and prerequisites that have no commands
9483 You can instead define commands to be used for targets for which there
9484 are no rules at all, even ones which don't specify commands. You do
9486 commands are used for all prerequisites which do not appear as targets in
9490 If you use @code{.DEFAULT} with no commands or prerequisites:
9497 the commands previously stored for @code{.DEFAULT} are cleared.
9500 If you do not want a target to get the commands from a match-anything
9501 pattern rule or @code{.DEFAULT}, but you also do not want any commands
9502 to be run for the target, you can give it empty commands (@pxref{Empty
9571 Suffix rules with no commands are also meaningless. They do not remove
9572 previous rules as do pattern rules with no commands (@pxref{Canceling
9617 rule with no commands, for each target of ordinary rules none of which have
9618 commands, and for each prerequisite that is not the target of any rule. It
9647 Remove from the list all rules with no commands.
9697 applies. In that case, give @var{t} the same commands that
9698 @code{.DEFAULT} has. Otherwise, there are no commands for @var{t}.
9704 until the commands to remake the target file @var{t} are executed. After
9705 these commands are executed, each of these stored file names are entered
9709 When the commands of a pattern rule are executed for @var{t}, the automatic
9743 commands! Most programs that you might use in commands do not support this
9746 Therefore, valid commands to update an archive member target probably must
9801 commands to be run, even without a makefile:
9880 If multiple @code{ar} commands run at the same time on the same archive
9884 circumvent this problem by serializing all commands that operate on the
9994 Execution of recursive commands to run @code{make} via the variable
10007 commands is retained when the commands are printed, so they appear as
10243 @emph{all} targets, not just those without commands. This means you can
10268 no commands, and it is treated as if it had empty commands
10278 We feel that it is cleaner for a rule without commands to always simply
10514 Evaluate @var{text} then read the results as makefile commands.
10602 commands. @xref{Execution, ,Command Execution}. The @code{SHELL}
10615 Using this variable in commands has special meaning.
10706 @item commands commence before first target. Stop.
10707 @itemx missing rule before commands. Stop.
10743 @item warning: overriding commands for target `@var{xxx}'
10744 @itemx warning: ignoring old commands for target `@var{xxx}'
10745 GNU @code{make} allows commands to be specified only once per target
10746 (except for double-colon rules). If you give commands for a target
10747 which already has been defined to have commands, this warning is issued
10748 and the second set of commands will overwrite the first set.