Date: Tue, 08 Jan 2002 09:42:01 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Alexey Zelkin <phantom@ark.cris.net> Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Sheldon Hearn <sheldonh@starjuice.net> Subject: Re: cvs commit: src/usr.bin/colldef Makefile Message-ID: <XFMail.020108094201.jhb@FreeBSD.org> In-Reply-To: <20020108152405.A83902@ark.cris.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 08-Jan-02 Alexey Zelkin wrote:
> On Tue, Jan 08, 2002 at 03:14:06PM +0200, Sheldon Hearn wrote:
>>
>>
>> On Tue, 08 Jan 2002 03:08:20 PST, John Baldwin wrote:
>>
>> > Modified files:
>> > usr.bin/colldef Makefile
>> > Log:
>> > Replace -I${.OBJDIR} with -I. and split the CFLAGS line up into two
>> > lines.
>>
>> Why '.' and not '${.CURDIR}'? I'm sure I'm not the only one who'd
>> benefit from an explanation.
>
> Because -I${.CURDIR} is already in CFLAGS (see previous revision)
> and since colldef is using automatically generated .h file it requires
> -I${.OBJDIR} or -I. to find pregenerated y.tab.h.
>
> Looks like this commit is a style fix.
Basically. -I. is -I${.OBJDIR} since make runs commands with ${.OBJDIR} as the
current directory (AFAICT) rather than ${.CURDIR} in the case that there is an
object directory. (If there isn't one, ${.OBJDIR} == ${.CURDIR}). Given that,
-I. is a lot shorter and easier on the eyes then -I${.OBJDIR}, although I
personally find it a bit more cryptic since it relies on you grokking the make
behavior of changing the current directroy to make object directories work.
--
John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.020108094201.jhb>
