bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

make bug


From: Ralph Goers
Subject: make bug
Date: Mon, 2 Jul 2001 18:22:26 -0700

Back in April I sent the following message to address@hidden  I believe a
patch was developed although I don't have it. How can I get the patch?

    "The attached make file should echo the command "echo dummy compile"
when make is invoked as "make _ECHO=". It does not. As is noted by Mike
Evans below, if the @ on the first command in the defined macro is removed
then _ECHO= works properly. I am using make-3.79.1."


I am also experiencing an additional problem which may have been fixed by
this as it is also related to defined macros.  In my make files I have:


_CC=c89
_CC_OPT=-c -o $@

define _C_COMPILE
$(_ECHO)echo '$@($<)'
$(_ECHO)echo "$(_CC) $(_CC_OPT)" >$(_CC_LST)
$(_ECHO)$(_CC) $(_CC_OPT) $< >$(_CC_OUT) 2>&1
endef

The problem is that in some cases (not all) $@ is being substituted with
blanks in the expansion of $(_CC_OPT), although $@ is expanded correctly in
the first echo.  Also, things work fine if I change this to be as follows.

_CC_OPT=-c

define _C_COMPILE
$(_ECHO)echo '$@($<)'
$(_ECHO)echo "$(_CC) -o $@ $(_CC_OPT)" >$(_CC_LST)
$(_ECHO)$(_CC) -o $@ $(_CC_OPT) $< >$(_CC_OUT) 2>&1
endef










reply via email to

[Prev in Thread] Current Thread [Next in Thread]