[Top][All Lists]

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

Re: obsd build include trouble

From: John Darrington
Subject: Re: obsd build include trouble
Date: Mon, 27 Mar 2006 08:44:21 +0800
User-agent: Mutt/1.5.9i

On Sat, Mar 25, 2006 at 12:29:08PM -0800, Ben Pfaff wrote:
     PSPP didn't ever use -I- or -isystem, so I don't see how this
     change would affect us.  

True.  It probably won't affect us.

     I don't know what a "virtual view path"
     is, unless it's a VPATH (I didn't know that was what VPATH stands
     for--is it?).

Yes it's related. What I call a "virtual view path", is a means of
achieving the same effect as operating systems which support a {union,
translucent, stacking} filesystem (different vendors use different
names for the same thing).  GNU/Linux doesn't have such thing
(GNU/Hurd does), but using a combination of VPATH and a carefully
crafted set of INCLUDEFLAGS one can achieve the same effect.  It's not
uncommon to see Makefiles which do this, to define their INCLUDEFLAGS
in terms of VPATH (usually with some $(patsubst ...) magic.

Again, we don't actually do this with PSPP, but the use of $builddir
vs. $srcdir introduces some problems which are similar --- We look for
*.h in $builddir and then in $srcdir if it's not found.

     Did you use <> instead of "" for libpspp #includes for some
     related reason?  I am a little puzzled by that choice.

Well yes.  Because of the problems inhibiting the current directory
inclusion for "", some people advocate never using #include "". 

There's no formal standard which dictates when <> should be 
prefered over "".  ANSI C says it's implementation dependent.  We've
all been taught since 1st year undergrads, that <> is for 'system
files' and "" is for everything else.  Unfortunately noone has ever
been able to satisfactorily explain what a 'system file' is.  

I don't have any strong opinions on what we should consider our
'system' to be.  However, the rule which I've found has led to fewest
complications over the years is that "" is used only for including
files which are never intended to be public (ie #included by files
which reside in the same directory).  Everything else uses <>.


PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature

reply via email to

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