[Top][All Lists]

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

In-tree datafiles

From: David Sveningsson
Subject: In-tree datafiles
Date: Sun, 14 Sep 2008 22:24:34 +0200
User-agent: Thunderbird (X11/20080830)

Hi, my project has some datafiles that is installed into pkgdatadir. I
would however like to use the in-tree datafiles when I am developing the

My directory layout looks something like this


Autoheader generates config.h with the define DATADIR (which corresponds
to pkgdatadir) and when I load a datafile I prepend DATADIR to the path:

load(DATADIR "/data/foo.dat");

This works great after installing the application but while I develop
the application it is a bit annoying to install it after each make. I
don't feel like symlinking or any other hack either.

What is the normal way to handle such situations? I mean, I can't be the
first to have this problem.

I was thinking something like a flag to configure which would set
pkgdatadir to ${top_srcdir) but it doesn't seem to be available at that
time as it always turns out empty.


//*David Sveningsson [eXt]*

Freelance coder | Game Development Student

Thou shalt make thy program's purpose and structure clear to thy fellow
man by using the One True Brace Style, even if thou likest it not, for
thy creativity is better used in solving problems than in creating
beautiful new impediments to understanding.

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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