any simpler option to overlaying header file dirs than funionfs?

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

 



  a project i was recently introduced to uses, quite heavily, the
notion of overlaying header file directories with the now-obsolete gcc
"-I-" option, and i'm curious if there are equivalent solutions that
don't use that feature.

  summary: sizable C (and possibly, not sure, some C++) code base
contains numerous, quote-surrounded header file includes of the form:

h1.h;
#include "h2.h"
... etc etc ...

where the header file "h2.h" is frequently in the same directory as
"h1.h" *but* it may not be the one that should be included.

  instead, the build system is currently replete with gcc build
commands of the form:

  $ gcc -I- -Id1/ -Id2/ -Id3/ ... and so on and so on ...

and "-I-" is used to force the preprocessor to resolve references to
"headerfile.h" not by looking in the current directory first, but by
scanning a list of "overlay" directories to see if someone has
registered a "higher-priority" header file by that name. it's not the
most intuitive build structure i've ever seen but it's been around for
quite some time and it works and its users really don't want to have
to mess with it.

[SIDE NOTE: the current usage of "-I-" in this project is not so much
to "split" the header file search path as that option is used right at
the *beginning* of all the "-I" options, so its use is to simply
refuse to look locally for header files and immediately start scanning
the "-I" directories. but that doesn't really change the problem to be
solved.]

  predictably, now that gcc 5 has obsoleted the "-I-" option, one
would like to find an alternative that doesn't require a wholesale
reworking of the build system. since the build system runs on centos,
my current thought is to use "funionfs" to unionize those overlay
directories in the same priority sequence.

  i just tried a trivial funionfs example and it seems to work, but is
there a simpler solution? the gcc folks, in deprecating, then
obsoleting, the "-I-" option, insist that one can use "-iquote"
instead, but that is clearly incorrect -- the requirement here is that
resolving a preprocessor include of the form:

  #include "rday.h"

*must* *not* look in the current directory first. if there is some way
to get that effect without "-I-" and without some sort of unionfs, i'd
like to know what it is.

  thank you kindly.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
http://lists.fedoraproject.org/admin/lists/users@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux