|
From: | Thomas Dickey |
Subject: | Re: including autoconf paths in source |
Date: | Fri, 12 Dec 2008 06:22:00 -0500 (EST) |
On Thu, 11 Dec 2008, Jan Engelhardt wrote:
On Thursday 2008-12-11 21:38, Monty Taylor wrote:Hey all, I'm wondering if there is a best practice for getting paths such as locaeldir or datadir into source code. As it stands now in the Makefile I've got: prefix= /usr/local datarootdir= ${prefix}/share localedir = ${datarootdir}/locale To get localedir into a source file, I've got a section in Makefile.am like: DEFS = -DLOCALEDIR="\"$(localedir)\"" @DEFS@This is the preferred solution indeed. Not that I see a need for @DEFS@ though:
One of the problems with the "preferred solution" is that it's not trivialto pass the flags through a script (for example, a wrapper for a compiler, or test-application). Putting them in the generated config.h
doesn't run into that problem. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net
[Prev in Thread] | Current Thread | [Next in Thread] |