On November 15, 2005, Ralf wrote: > First idea: In the directory, where aclocal searches by > default ($prefix/share/aclocal, usually), edit/create the > file `dirlist' to point to the directory your macros are in. > Then, #2 will work without any ACLOCAL_AMFLAGS.
I could see this working, but then I need an absolute path to the directory where my macros are...My reflex is still for each person who grabs files from revision control to have his/her own copy of the scripts, so someone working on them doesn't break them for everyone else. > OTOH having one file per macro is much nicer: Why not > mkdir m4 > add `ACLOCAL_AMFLAGS = -I m4' to Makefile.am > add `AC_CONFIG_MACRO_DIR([m4])' to configure.ac? I don't see how this is one file per macro. Also, I'm not using AC_CONFIG_MACRO_DIR at the moment, but things seem to work. Can someone enlighten me here? > Then, with Automake <= 1.9.6 you can add a > cp /my/macros/*.m4 m4/ > to your bootstrap script (the one that executes automake etc,) I don't have a bootstrap script at the moment. $ autoreconf -fvi is enough. I was hoping to keep it that way. > and with CVS Automake you could simplify that to > aclocal --install -I m4 > (or add `ACLOCAL_AMFLAGS = -I m4 --install' to Makefile.am and have > autoreconf run it for you). This last suggestion seems pretty similar to the way I've got it working now, except that instead of getting the autotools to copy the macros for me, I copy them myself. I agree it's cleaner to have them in an m4 directory instead of as part of aclocal.m4, but not cleaner enough to make it worth maintaining a bootstrap script...or at least it doesn't seem so at the moment. > > The other small downside to this solution is that instead of > > just sharing the macros as they are in the tree of files > > from revision control, they get compiled into aclocal.m4 in > > each project that uses them. > > Yes. I'd not put them in revision control, though. But > this issue (whether to store generated files there) is > controversial, and there are arguments for both sides. I also try to avoid storing generated files in revision control. I'm not sure what files you mean though. My macros foo.m4, etc. aren't generated files as far as I can tell. Thanks for your help. -DB