[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Options: `--dry-run' should prevent `--touch' from touching
From: |
Philip Guenther |
Subject: |
Re: [PATCH] Options: `--dry-run' should prevent `--touch' from touching |
Date: |
Tue, 8 Mar 2011 14:11:22 -0800 |
On Tue, Mar 8, 2011 at 1:37 PM, Michael Witten <address@hidden> wrote:
> The `--dry-run' flag is supposed to be safe in that nothing
> in the file system is actually modified.
That's not actually true. To quote the docs:
`-n'
`--just-print'
`--dry-run'
`--recon'
"No-op". The activity is to print what recipe would be used to
make the targets up to date, but not actually execute it. Some
recipes are still executed, even with this flag (*note How the
`MAKE' Variable Works: MAKE Variable.).
and then later on the same page:
The `-n', `-t', and `-q' options do not affect recipe lines that
begin with `+' characters or contain the strings `$(MAKE)' or
`${MAKE}'. Note that only the line containing the `+' character or the
strings `$(MAKE)' or `${MAKE}' is run regardless of these options.
Other lines in the same rule are not run unless they too begin with `+'
or contain `$(MAKE)' or `${MAKE}' (*Note How the `MAKE' Variable Works:
MAKE Variable.)
At least part of that behavior is required by the POSIX specification
and has a few decades of history behind it.
Philip