(no subject)

Eygene Ryabinkin rea-fbsd at codelabs.ru
Tue Dec 29 11:17:31 UTC 2009


Tue, Dec 29, 2009 at 10:40:02AM +0300, Yuri Pankov wrote:
> On Tue, Dec 29, 2009 at 01:28:46AM -0600, Scot Hetzel wrote:
> > dv8t01# make do-check
> > File /usr/local/etc/rc.d/motd exists
> > File /usr/local/etc/rc.d/hald doesnt exist
> > 
> > This Makefile fails due to LOCALBASE is not defined at the time that
> > the exists check is run.
> 
> How come that ${DATADIR} (and ${LOCALBASE}) are correctly expanded in
> ${ECHO_MSG} then?

.if and .for are unrolled and evaluated while parsing the makefile
and make transforms it to bare "@${ECHO_MSG} ..." lines with the
content that depends on the if-else-endif evaluation.  LOCALBASE
isn't defined at that time

And targets are executed after the whole Makefile was read, so
LOCALBASE is here.  Actually, the found "/usr/local/etc/rc.d/motd"
is really an "/etc/rc.d/motd".
-- 
Eygene
 _                ___       _.--.   #
 \`.|\..----...-'`   `-._.-'_.-'`   #  Remember that it is hard
 /  ' `         ,       __.--'      #  to read the on-line manual
 )/' _/     \   `-_,   /            #  while single-stepping the kernel.
 `-'" `"\_  ,_.-;_.-\_ ',  fsc/as   #
     _.-'_./   {_.'   ; /           #    -- FreeBSD Developers handbook
    {_.-``-'         {_/            #


More information about the freebsd-ports mailing list