Learned (i.e., finally implemented) a few things today...
- As part of a continuning discussion with the guy responsible for the LAM RPM in RedHat, he suggested that I move some of the LAM data files from $(pkgdatadir) to $(sysconfdir). I resisted for a while, because $(pkgdatadir) resolves to
${prefix}/share/lam, which is nicely its own directory. $(sysconfdir) resolves to${prefix}/etc, which means that we may have some name conflicts with files that are already in that dir. Harumph.We discussed/argued this for a little while, but then he played the Linux FHS card, with which I really couldn't argue. So I bit the bullet, renamed our config files to have a "lam-" prefix to guarantee a lack of name conflicts, and changed all the
Makefile.am's to usesysconf_DATAinstead ofpkgdata_DATA. Bummer. - But here's the interesting part: one of his points was that he wanted to be able to do "
make sysconfdir=/foo/bar all˙˙˙˙" and change various directories at "make" time, not just at ./configure time. This was problematic because I was usingAC_DEFINEto set these things in the centrallam_config.hat ./configure time.My reasoning for this was that this clears up the compile command line a lot -- no additional
-Dflags are necessary, and various tranlational units can just use the symbolic constants that are inlam_config.h. I still think that I'm right. :-)However, there is strength in being able to change such directories at compile time, especially since such behavior is documented in the autoconf docs (arf!). So I removed the relevant
AC_DEFINE's fromconfigure.inandacconfig.hand added the appropriate-Dswitches to all the relevantMakefile.am's.
(Typing this, I noticed that I tend to type an ">" automatically after ".h". This is problematic when you're composing in ˙˙˙˙HTML... does this say something Freudian about my mother?)
So I think that I realized this a few days ago when I had my last e-mail with the RedHat guy, but didn't want to admit it ('cause damnit, I'm still right!). But you really can't argue with the Linux FHS, 'cause everyone uses it...
Additionally, I guess this will influence how I hard-code all directory names in future code. <sigh>