This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: 'DATA' is an anachronism
- To: david at carter dot net
- Subject: Re: 'DATA' is an anachronism
- From: Tom Tromey <tromey at redhat dot com>
- Date: 17 Aug 2001 20:27:26 -0600
- Cc: akim at epita dot fr, automake at gnu dot org
- List-Id: Discussion list for automake <automake.gnu.org>
- References: <20010817143836.3753.cpmta@c000.snv.cp.net>
- Reply-To: tromey at redhat dot com
>>>>> "David" == david <david@carter.net> writes:
David> I also went back to the goatbook, and found that this was
David> documented correctly there, but not explained in an explicit
David> manner. (At least not explicitly enough for a beginner like
David> me.)
Sorry about that.
David> This does, however, bring up another question:
David> I'm now using something like this in Makefile.am:
David> CXXFLAGS += -DDATA_DIR=$(pkgdatadir) -Wall -g -O3
Don't do this. Use AM_CXXFLAGS instead.
Actually, I would remove `-g -O3' entirely, and only use -Wall if
configure detected gcc.
David> pkgdata_DATA = my.data
David> EXTRA_DIST = $(pkgdata_DATA)
David> This works fine once the package is installed, but does not
David> work when running the program from the build dir. Is there a
David> better way to do this?
One approach is to give the program a command-line option which can be
used to tell it where to find the files it needs. This is what
automake does. Another plausible approach is an environment variable.
This sort of thing is really out of Automake's area, though.
Tom