[MontelLUG] cambiare directory in un Makefile
cesco
webmonster a apf.it
Gio 30 Dic 2004 11:33:32 CET
> magari su "info make" c'e' anche qualche giustificazione al fatto, ma
> spero di non dover mai leggere la documentazione completa del make,
> saranno 2000 pagine :(
pero' sono ben organizzate :)
pare che esegua una shell per ogni riga perche' e' possibili far eseguire
le diverse righe in parallelo col parametro -j...
quanto al cd c'e' spiegato tutto...
be' non gli si puo' dir niente :)
ciao ciao,
cesco
----
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.)
*Please note:* this implies that shell commands such as `cd' that
set variables local to each process will not affect the following
command lines. (1) If you want to use `cd' to affect the next command,
put the two on a single line with a semicolon between them. Then
`make' will consider them a single command and pass them, together, to
a shell which will execute them in sequence. For example:
foo : bar/lose
cd bar; gobble lose > ../foo
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:
foo : bar/lose
cd bar; \
gobble lose > ../foo
---
More information about the montellug
mailing list