This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc and include dirs -> do we need a /etc/includes.conf?


On Friday 28 February 2003 01:19 am, Gerold J. Wucherpfennig wrote:
> I've installed many packages into /opt to
> get rid of "put everything into /usr/bin".
>
> Now my CFLAGS and CXXFLAGS lines are _really_ long,
> because I have to include the include dir of each /opt dir.
> ( -I/opt/package/include ...)
>
> Is there any chance to get a "includes.conf" file in /etc ?
> This should be a kind of ld.so.conf and list all include directories
> which gcc should include at compile time.
>
> Maybe a /etc/includes.conf can even let some distributors put some things
> out of /usr/bin...  that would be _really_ good :-)
>
>
> Please CC me
>
> Gerold
Try it this way (If ASCII art still works)

/opt/<product><release>/{bin, lib, include, man, infc, ...}
 - - - -
/opt/<product><release>/{bin, lib, include, man, info, ...}

For every product-release your have. (Which I understand is what you
have already done.)

Then "fake" a unified installation with:

/opt/bin {ln -s /opt/<product><release>/bin/* . } (The period counts)
/opt/lib {ln -s /opt/<product><release>/lib/* . } (The period counts)
/opt/include {ln -s /opt/<product><release>/include/* . } (The period counts)
/opt/man {ln -s /opt/<product><release>/man/* . } (The period counts)

Then to get the new stuff first in path: export PATH=/opt/bin:$PATH

Tell ld.so about them, by putting "/opt/lib" in ld.so.conf and running
ldconfig.  Which leaves the ld.so cache pointing into /opt/lib/<library>
which is really a link to the actual product's location - but I expect that
it will work.

I am not sure if everything in the world will follow the /opt/include/*=>link
but I do expect some version of this scheme to work.

If I run into problems with this scheme (I am building a personal distro),
I'll post a follow-up -- so consider this an untested suggestion.

Mike

Mike


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]