Malte S. Stretz wrote:
> On Wednesday 02 June 2004 00:17 CET Klaus Heinz wrote:

> >   perl Makefile.PL </dev/null
> >   perl spamc/configure.pl --create-version-file
> >   cd spamc
> >   ./configure --mystuff
> >   make all
> 
> I could add that patch but the above won't work too nicely.
> 
> That's because configure.pl needs to be called with VERSION="3.0.0" to 

Ok, that's a detail I skipped. I could call configure.pl by using the
main Makefile ("make spamc/Makfile") which provides the correct VERSION.

> produce a "good" version number. Just have a look what 'spamc -V' gives you 
> without that -- should be something like "SpamAssassin Client version 
> 3.x.x-r20500".

If you set VERSION=3.000000, the extraction of MAJOR, MINOR and REVISION
works. But if you use VERSION=3.0.0 you get

  Use of uninitialized value in multiplication (*) at configure.pl line 66.
  Use of uninitialized value in multiplication (*) at configure.pl line 66.

This

  $ENV{VERSION} =~ /^(\d+)\.(?:(\d\d\d)(\d\d\d)|(\d+)\.(\d+))/;

creates 5 back references (left to right parentheses rule) but only $1,
$2 and $3 (which maybe partially undefined/empty) are used in the hash
%ver.

> Instead of getting rid of the symptoms I'd like to fix the real problem :) 
> So what are you missing? Should configure.pl should pass all unknown --args 
> to the autoconf stuff? Theoretically it already does this (look in line 43) 
> but maybe there's a bug in there...

This does not work on *IX. There is an array @args with one element
(q{./configure}) and a hash %args which collects the command line
arguments from @ARGV but if configure.pl is not running on Windows,
only the content of the array is used to build a command line and the
hash is ignored, thus ommitting the supplied options.

I wish I could call "perl Makefile.PL' and './configure' separately as
it used to be (good old times :-). The package system I use
(www.pkgsrc.org) has special provisions for GNU autoconf scripts which
I cannot trigger if I do not call it directly but through the sequence
"make spamc/Makefile -> perl configure.pl ... -> ./configure", like it
is at the moment.

The older and simpler system worked better for me but I could use the
new one, if configure.pl only did what it is supposed to do (IMO) on
non-Windows systems: create version.h.

ciao
     Klaus

Reply via email to