Article View: comp.unix.programmer
Article #3696Re: -I vs relative includes
From: Ron Mayer
Date: Wed, 07 Jul 1993 22:34
Date: Wed, 07 Jul 1993 22:34
23 lines
1795 bytes
1795 bytes
In article <21cukd$lbq@truffula.fp.trw.com> awick@truffula.fp.trw.com (Andy Wick) writes:
>
>What are the pros and cons of -I's vs relative includes?
>
>[lots of include files spread over many directories]
>
>[What's better:]
> [(a) have #include statements contain relative paths to each file]
> [(b) use -I option to specify each directory include files may appear]
I just started using another option; creating a separate project/include
directory and putting a mechanism in each source directory's makefile to
"install" the include files there; and can then access all of them
with a single -I option. The advantage is that if I am developing a
newer version of the software which needs changes to the include files
I can simply put them somewhere like myhomedirectory/include, and
access them with a single additional -I option. The disadvantage is
that you need to do a "make install_includes" in each directory before
compilation will work on a new source tree.
Ron Mayer
mayer@acuson.com
Technical Details
Message-ID:
<MAYER.93Jul7143421@orthanc.sono.uucp>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!darwin.sura.net!sgiblab!sono!orthanc!mayerReferences:
<21cukd$lbq@truffula.fp.trw.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,cb9385093343e73 X-Google-Attributes: gid11318c,public X-Google-Thread: fc89c,cb9385093343e73 X-Google-Attributes: gidfc89c,public X-Google-ArrivalTime: 1993-07-09 22:19:26 PST Newsgroups: comp.unix.programmer,gnu.gcc.help Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!darwin.sura.net!sgiblab!sono!orthanc!mayer From: mayer@sono.uucp (Ron Mayer) Subject: Re: -I vs relative includes In-Reply-To: awick@truffula.fp.trw.com's message of 6 Jul 1993 18: 33:49 -0400 Message-ID: <MAYER.93Jul7143421@orthanc.sono.uucp> Sender: mayer@acuson.com (Ron Mayer) Organization: Acuson; Mountain View, California References: <21cukd$lbq@truffula.fp.trw.com> Date: Wed, 7 Jul 1993 22:34:21 GMT Lines: 23