Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Dec 2009 14:50:25 +0300
From:      Yuri Pankov <yuri.pankov@gmail.com>
To:        Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Cc:        Scot Hetzel <swhetzel@gmail.com>, Yevgen Krapiva <ykrapiva@gmail.com>, freebsd-ports@freebsd.org
Subject:   Re: (no subject)
Message-ID:  <20091229115025.GA1654@darklight.org.ru>
In-Reply-To: </usblcMV/8PFi4OD7Eef21XnwjM@SNwcwk2DeGhgeFqjLEiQrEAOiKg>
References:  <790a9fff0912282328o35ba5abfg580c01ec851e6c95@mail.gmail.com> <20091229074002.GA3117@darklight.org.ru> </usblcMV/8PFi4OD7Eef21XnwjM@SNwcwk2DeGhgeFqjLEiQrEAOiKg>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 29, 2009 at 02:17:17PM +0300, Eygene Ryabinkin wrote:
> 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
>     {_.-``-'         {_/            #

Thanks for explanation. I just wonder how PREFIX is different from
LOCALBASE (i.e., devel/gettext uses .if exists(${PREFIX}/.....) without
including bsd.port.pre.mk).


Yuri



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091229115025.GA1654>