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]

Improved 'Parsing' of configure.in


One of the problems that I ran across in messing with automake is that
it does not always accurately parse M4 constructs.  For example, if I
define an m4 function as so:

define([AM_MY_INIT_AUTOMAKE],[AM_INIT_AUTOMAKE([$1],[$2],[$3])])
AM_MY_INIT_AUTOMAKE([foo],[bar],[foobar])

automake, when it parses will see 'AM_INIT_AUTOMAKE($1,$2,$3)' and have
no idea that AM_INIT_AUTOMAKE was called with foo bar and foobar.  THis
leades to some problem using automake with some constructs.

THerefore, I have come up with a solution that should allow a large
decrease in the size of automake, along with an increase to it's
effectiveness.

Basicly, the change is to run configure.in as a configure.in script ...
and merely remember what functions are called, and when.  The output
is a configure program, just like you would get if you ran
autoconf, plus, applnded, a list of macro calls that were made, along
with what files were read.

I have an example implementation on my web site.  The version of the
automake perl script that I hacked to use my new stuff is incompletely
converted, and is from an old version to boot.  But it shows what needs
to be done in order to use the thing.

The make process would do something like this:

configure Makefile: configure.in Makefile.in
	cd $(srcdir) && automake

There would be no reason to run the autoconf script.  I suspect that a
similar technique could be used to make aclocal unnessisary as a
seperate
program ... given a list of availiable 'library' macros, calls those
macros could be replaced with include directives for the files that
contained them, followed by calls to the macros.

Anyway, I no longer have time to work on this project, so I have put
what
I have done so far on my website so that hopefully it will catch
someones
immagination and they will continue.  If they would add me to the
credits
file I would appreciate it, but the code is public domain, and they
would
not be REQUIRED to do anything at all in order to use the ideas or code
therein.

The URL for this treasure is:  http://www.rich-paul.net.  The title is
metaconf, but I think that the best option is to incorporate it into
automake, rather than maintaining it with a separate name.

Have fun, and feel free to drop me a line if you need help in
integration
or suggestions on use.


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