This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 'DATA' is an anachronism


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]