Skip to contentSkip to conversation

include/ and -I

DISCUSSION Dan Mick 2 participants 3 messages Nov 2, 2012 – Nov 3, 2012

lore
Share & tools
lore

Dan Mick

author
#0 lore raw

I was somewhat surprised to note that we don't build with -I include, so that files that userland programs would find with relative-to-/usr/include paths have to be modified for building in the tree.

Was this conscious, or does anyone else think it would be smoother to -I include/ so that outside-the-tree and inside-the-tree #includes are more similar?

author
#1 lore raw
Quoted 8 lines · Dan Mick

I was somewhat surprised to note that we don't build with -I include, so that files that userland programs would find with relative-to-/usr/include paths have to be modified for building in the tree.

Was this conscious, or does anyone else think it would be smoother to -I include/ so that outside-the-tree and inside-the-tree #includes are more similar?

(and Mr. Lang points out that, of course, I really mean something like -I $(srcdir)/include, of course)

#2 lore raw
In reply to Dan Mick
Quoted 7 lines · Dan Mick

I was somewhat surprised to note that we don't build with -I include, so that files that userland programs would find with relative-to-/usr/include paths have to be modified for building in the tree.

Was this conscious, or does anyone else think it would be smoother to -I include/ so that outside-the-tree and inside-the-tree #includes are more similar?

This was not deliberate. However, we should be careful that our include/ files don't mask ones in /usr/include (e.g., types.h).

sage>