[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: multiple wildcards in a static pattern rule
From: |
Paul D. Smith |
Subject: |
Re: multiple wildcards in a static pattern rule |
Date: |
Thu, 30 Oct 2003 19:11:05 -0500 |
%% Noel Yap <address@hidden> writes:
ny> Hey, that's cool! How does it handle the situation if the 'cp'
ny> fails?
Same as if the shell that it would have run to invoke cp fails...
ny> Also, I'm not sure what you meant by "shell metacharacters". Does
ny> "&&" qualify as "shell metacharacters"?
Yes. Also "|", both double and single quotes, "$" (after expansion),
"~", etc. Note it doesn't parse shell syntax, it just looks for single
characters. So it might sometimes invoke a shell when it wasn't
strictly necessary but that doesn't hurt much.
Here's a complete list from the source: if any of these appear in the
command GNU make will invoke a shell. If none of them do, it will run
the command directly.
static char sh_chars[] = "#;\"*?[]&|<>(){}$`^~";
static char *sh_cmds[] = { "cd", "eval", "exec", "exit", "login",
"logout", "set", "umask", "wait", "while", "for",
"case", "if", ":", ".", "break", "continue",
"export", "read", "readonly", "shift", "times",
"trap", "switch", 0 };
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist