I decided to look further into this apparent error in Configure.pl:

  my @valid_opts = qw(ask bindir cage cc ccflags ccwarn cgoto cxx
datadir   #<-- line 292
  ...
    sharedstatedir step sysconfdir verbose verbose-step=N version
without-gdbm #<-- line 298
    without-gmp without-icu yacc);

I decided to try to invoke Configure.pl taking the above
'verbose-step=N' as an option key literally, i.e., 'verbose-step=N=3'.

 $ cat myconfigure.with.verbose.step.bad.sh 
  #!/bin/sh
  CC="/usr/bin/gcc-3.3"
  CX="/usr/bin/g++-3.3"
  /usr/local/bin/perl Configure.pl --cc="$CC" --cxx="$CX" --link="$CX" \
    --ld="$CX" --without-icu --without-gmp --verbose-step=N=3 $@
  
$ ./myconfigure.with.verbose.step.bad.sh  
Invalid option verbose-step. See "perl Configure.pl --help" for valid
options

Without altering Configure.pl, I tried the above, only with
'--verbose-step=3'.  Same results.  (From this I would infer that nobody
has been using the 'verbose-step' option lately.  Otherwise, the bug
would have been reported earlier!)

I then modified Configure.pl as per my submitted patch:

  my @valid_opts = qw(ask bindir cage cc ccflags ccwarn cgoto cxx
datadir   #<-- line 292
  ...
    sharedstatedir step sysconfdir verbose verbose-step version
without-gdbm #<-- line 298
    without-gmp without-icu yacc);

I then configured with 'verbose-step=3'; 'verbose-step' is the option,
'3' is its value:

  #!/bin/sh
  CC="/usr/bin/gcc-3.3"
  CX="/usr/bin/g++-3.3"
  /usr/local/bin/perl Configure.pl --cc="$CC" --cxx="$CX" --link="$CX" \
    --ld="$CX" --without-icu --without-gmp --verbose-step=3 $@
  
  $ ./myconfigure.with.verbose.step.good.sh 
  Parrot Version 0.4.10 Configure 2.0
  Copyright (C) 2001-2007, The Perl Foundation.
  
  Hello, I'm Configure. My job is to poke and prod your system to figure out
  how to build Parrot. The process is completely automated, unless you
passed in
  the `--ask' flag on the command line, in which case it'll prompt you
for a few
  pieces of info.
  
  Since you're running this program, you obviously have Perl 5--I'll be
pulling
  some defaults from its configuration.
  
  Checking
MANIFEST.....................................................done.
  Setting up Configure's default
values.................................done.
  Setting up installation
paths.........................................done.Setting Configuration
Data:
  (
          verbose => undef,
  );
  
  Tweaking settings for
miniparrot...................................skipped.
  Loading platform and local hints
files................................done.
  
And Parrot happily went on to complete configuration.

I then tried the regex variant:

  #!/bin/sh
  CC="/usr/bin/gcc-3.3"
  CX="/usr/bin/g++-3.3"
  /usr/local/bin/perl Configure.pl --cc="$CC" --cxx="$CX" --link="$CX" \
    --ld="$CX" --without-icu --without-gmp --verbose-step=miniparrot $@

Parrot again configured with verbose output where requested.

  [parrot] 542 $ ./myconfigure.with.verbose.step.good.sh 
  Parrot Version 0.4.10 Configure 2.0
  Copyright (C) 2001-2007, The Perl Foundation.
  
  Hello, I'm Configure. My job is to poke and prod your system to figure out
  how to build Parrot. The process is completely automated, unless you
passed in
  the `--ask' flag on the command line, in which case it'll prompt you
for a few
  pieces of info.
  
  Since you're running this program, you obviously have Perl 5--I'll be
pulling
  some defaults from its configuration.
  
  Checking
MANIFEST.....................................................done.
  Setting up Configure's default
values.................................done.
  Setting up installation
paths.........................................done.
  Tweaking settings for
miniparrot...................................skipped.Setting
Configuration Data:
  (
          verbose => undef,
  );
  Loading platform and local hints
files................................done.
  Determining nongenerated header
files.................................done.

I then proceeded to run this last configuration through 'make' and 'make
test'.  All tests passed on Darwin PPC and on Linux.

I am therefore applying the patch to trunk.

kid51


Reply via email to