automake
[Top][All Lists]
Advanced

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

Where to place include files


From: Julio Merino
Subject: Where to place include files
Date: Fri, 28 Sep 2001 19:15:23 +0200
User-agent: Mutt/1.3.22i

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: http://www.jmmv.f2s.com/ept

Julio Merino <address@hidden> ICQ: 18961975

Attachment: pgpLvVGE7o20R.pgp
Description: PGP signature


reply via email to

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