From owner-cvs-all Wed Jan 9 2: 6:59 2002 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 892D037B404; Wed, 9 Jan 2002 02:06:53 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id VAA22519; Wed, 9 Jan 2002 21:06:50 +1100 Date: Wed, 9 Jan 2002 21:07:35 +1100 (EST) From: Bruce Evans X-X-Sender: To: John Baldwin Cc: Alexey Zelkin , , , Sheldon Hearn Subject: Re: cvs commit: src/usr.bin/colldef Makefile In-Reply-To: Message-ID: <20020109205650.I7942-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 8 Jan 2002, John Baldwin wrote: > 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. One reason is that '.' isn't ${.CURDIR} except in the degenerate case where ${.OBJDIR} is ${.CURDIR}. '.' is ${.OBJDIR}. > > 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. Right. > 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. I find that it helps grokking the necessary -I's :-). It's very easy to confuse '.' with ${.CURDIR} if you don't think about it. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message