[Top][All Lists]

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

Re: Where to place include files

From: Julio Merino
Subject: Re: Where to place include files
Date: Fri, 28 Sep 2001 20:33:56 +0200
User-agent: Mutt/1.3.22i

On Fri, Sep 28, 2001 at 07:45:25PM +0200, Guido Draheim wrote:
> I never had problems with letting header and source files
> be in the same subdir which has the name of the project itself.
> Instead it gets easier to build different-named subprojects
> together at the same time. W.r.t. to a "prodesk" I'd simply
> bind all *.h and *.c into a subdir prodesk/prodesk, there
> is just one SUBDIR=prodesk in the toplevel prodesk/ dir, 
> and the subdir /prodesk makefile contains just "-I$(srcdir)/.."

Ok, but I changed its name for this message, just to make things
a bit clearer in my explanation. Sorry.

I'm currently working on: /home/juli/src/prodesk/libs
And this directory is the one that contains: "core" and

> btw, that way it's damn easy to have a "gdk/" and "gtk/" subdir
> side-by-side under the same toplevel makefile and get to the
> headers from each subproject - there's  really no need to split 
> them into different tarballs/rpms for distribution. But that
> may be a different story...

Yeah, I've think that, but I want to make the library as a single
file, so avoiding "dependancy" problems in the future.


> Julio Merino wrote:
> > 
> > Hi all,
> > 
> > I'm wondering about how to organize the header (.h) files on my project.
> > The structure is like the following: the directory "prodesk", which is
> > the toplevel directory, contains a subdirectory named "core", and another
> > one named "include", both hanging from the topdir.
> > 
> > In my header files, I need to do some #include's of other .h files I've
> > written. These files are all placed in prodesk/core subdirectory.
> > I want to put these files when they are installed on
> > /usr/include/prodesk. And here, the problem arises.
> > 
> > I include headers from headers like: (for example)
> > #include <prodesk/string.h>
> > 
> > As you may notice, there is the "prodesk/" directory preceding the header
> > file, so this will work when it gets installed.
> > 
> > But, to solve the include problems because missing files if the package
> > is not yet installed I've done the following. I've created a subdirectory
> > in prodesk/include, that is called prodesk itself. So, I try to shadow
> > the real include's dir layout.
> > 
> > Then, I've populated that directory with symlinks:
> > (wherever I am)/prodesk/include/prodesk $ ln -s ../../core/*.h .
> > 
> > This way, when building the library, it can include the files fine, and
> > when is installed I guess that it will work fine.
> > 
> > Do you think this is a "logical" way to do this?? Or this is weird?
> > 
> > Thanks! (And sorry for this so long message)
> > 
> > --
> > Make a better partition table:
> > 
> > Julio Merino <address@hidden> ICQ: 18961975
> > 
> >   
> > --------------------------------------------------------------------------------------------------------------------------------
> >    Part 1.2Type: application/pgp-signature
> -- guido                            Edel sei der Mensch, hilfreich und gut
> GCS/E/S/P C++$++++ ULHS L++w- N++@ d(+-) s+a- r+@>+++ y++ 5++X- (geekcode)

Make a better partition table:

Julio Merino <address@hidden> ICQ: 18961975

Attachment: pgpPIOueDfijn.pgp
Description: PGP signature

reply via email to

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