[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Canned Command Sequences and set -e
From: |
Nicolas Fleury |
Subject: |
Canned Command Sequences and set -e |
Date: |
Wed, 20 Mar 2002 11:14:49 -0500 |
With make 3.79.1, on both IRIX and Linux x86, canned command sequences
are not verbose; even commands not preceded by @ are not shown.
For example:
define run-yacc
yacc $(firstword $^)
mv y.tab.c $@
endef
%.c: %.y
$(run-yacc)
is not the same thing (for output) as
$.c: %.y
yacc $(firstword $^)
mv y.tab.c $@
Also, in make documentation (Generate Prerequisites Automatically
section) there's a use of "set -e" so that "command1 | command2" would
return the exit code of command1, but it seems that set -e doesn't do
that exactly. "set -e" is used when "command1; command2" should stop if
command1 returns a non-zero exit code. This seems to be an error in
documentation, not make. (I'm still wondering how to get exit code of
first command in a pipeline; right now I use a temp file)
For Example:
%.c: %.y
set -e; exit 1 | exit 0
the latest rule would always succeed.
Thank you
Nicolas Fleury
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Canned Command Sequences and set -e,
Nicolas Fleury <=