Contents|Index|Previous|Next
Command execution

When it is time to execute commands to update a target, they are executed by making a new subshell for each line. (In practice, make may take shortcuts that do not affect the results.) If you would like to split a single shell command into multiple lines of text, you must use a backslash at the end of all but the last subline. Such a sequence of lines is combined into a single line, by deleting the backslash-newline sequences, before passing it to the shell. Thus, the following is equivalent to the preceding example. The program used as the shell is taken from the variable, SHELL. By default, the program ‘/bin/sh’ is used.

Unlike most variables, SHELL is never set from the environment. This is because the SHELL environment variable is used to specify your personal choice of shell program for interactive use.

It would be very bad for personal choices like this to affect the functioning of makefiles. See Variables from the environment.


Top|Contents|Index|Previous|Next