The patch series that follows is intended to improve (hopefully replace) the existing macro AX_ADD_AM_MACRO. The purpose being to address the fact that this macro does _not_ create rules for Automake but rather writes a file to be included by Make itself. The first patch in the series includes the real meat of the change. The second and third patches modify other existing macros to make use of the changes, and hopefully illustrate the nature of the changes.
I'm CCing the Automake list on this series so that they can offer their input on the potential pros and cons. The only thing that's been modified since the first iteration is how AX_DIST_RPM and AX_INSTALL_FILES clean up after themselves. Also I'm considering using AS_ESCAPE to reduce/eliminate the amount of quotation required for Automake snippets. (Or maybe I could just use single quotes.) There shouldn't be any need for shell variables to be expanded anymore (since they should really be using AC_SUBST anyway). And of course that should substantially increase the legibility. Cheers, Allan