Re: including autoconf paths in source

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

 



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 trivial
to 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


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux