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]

automake and 'strict' Perl5


Hello,

first, as this is my first posting to this mailing list,
I'd like to start with a big 'Thank you!' to all automake
authors for providing such a useful tool... :-)
[I've been obliged a few months ago to use the complete 
 autoconf&automake&libtool suite and... well, I'm very happy
 of that finally. ;-)]


I've been using Perl for >4-5 years now, and I noticed that
the automake core script was more or less using Perl4 constructs.
More precisely, global and 'local' variables are in general
use inside the main script.

I don't know if it can be useful and if it could help the
use of automake, but I've successfully modified the core automake
script this weekend to conform to stricter Perl5 syntax.

More precisely, I've converted all variables to the 'my'
convention (ie: lexical variables), introduced prototypes
for all functions, and I've been able to produce an
automake script that compiles and run correctly with the
'use strict;' directive enabled.


The whole test suite is passed successfully with this modified
version, at least on my linux machine at home, and here
on Solaris 2.6.
I'm also the Unix maintainer of the OpenAmulet library which
is a rather big package relying on automake and my attempt
at using this modified version with OpenAmulet was also
successful (ie: no difference with the automake-1.4-based
release).


These modifications surely implies that a developer using
automake has Perl5 (probably Perl > 5.004), but this is
probably not a big problem nowadays, no ?

I did these modifications against the 1.4 stable release of
automake (_not_ against the current development version, sorry).
The only file I modified is 'automake.in' (none of the m4 macro
files were touched of course). But in this file, nearly 50%
of lines were touched (all variables declarations, all function
calls, all function declarations).
This was a rather cumbersome task (and a task that probably
involves a rather good knowledge of Perl :-), but I don't know
if you think that such modifications could be useful for the
main automake line ?

In case you are interested, don't hesitate to tell me, I'm
willing to share the results of this conversion attempt (and
even to try to bring it up-to-date with the current CVS
version of automake if you think it will be necessary).

Any feedback ?

Regards,

Rodolphe


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