[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#72802: make fails to correctly echo commands
From: |
Manoj Srivastava |
Subject: |
Re: Bug#72802: make fails to correctly echo commands |
Date: |
30 Sep 2000 14:06:04 -0500 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 |
Hi,
[Please retain the CC to address@hidden so
that the Debian Bug Tracking system can record your input]
make 3.79.1 is not correctly echoing commands when they occur in
canned command sequences. Since this is the latest version of make, I
have downgraded to the version from Debian 2.1 (make 3.77), which
never gave me any problems.
Indeed, this contradicts node Sequences: in the info documentation,
which states:
======================================================================
In command execution, each line of a canned sequence is treated just
as if the line appeared on its own in the rule, preceded by a tab. In
particular, `make' invokes a separate subshell for each line. You can
use the special prefix characters that affect command lines (`@', `-',
and `+') on each line of a canned sequence. *Note Writing the Commands
in Rules: Commands. For example, using this canned sequence:
define frobnicate
@echo "frobnicating target $@"
frob-step-1 $< -o address@hidden
frob-step-2 address@hidden -o $@
endef
`make' will not echo the first line, the `echo' command. But it _will_
echo the following two command lines.
On the other hand, prefix characters on the command line that refers
to a canned sequence apply to every line in the sequence. So the rule:
frob.out: frob.in
@$(frobnicate)
does not echo _any_ commands. (*Note Command Echoing: Echoing, for a
full explanation of `@'.)
======================================================================
The makefile below demonstrates the problem ("true" should occur twice in the
output, but only occurs once):
manoj
---
should_not_be_echoed = true This should never be seen on screen
should_be_echoed = true This is correct
define canned_sequence
@$(should_not_be_echoed)
$(should_be_echoed)
endef
all : okay faulty
okay :
@echo "this will be okay"
@$(should_not_be_echoed)
$(should_be_echoed)
faulty :
@echo "this will fail to echo the second command in the canned sequence"
$(canned_sequence)
--
"Consequences, Schmonsequences, as long as I'm rich." Daffy Duck,
from Looney Tunes "Ali Baba Bunny" (1957, Chuck Jones)
Manoj Srivastava <address@hidden> <http://www.debian.org/%7Esrivasta/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C