Permalink
Browse files

new Configure options: verbose-step

git-svn-id: https://svn.parrot.org/parrot/trunk@5923 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 2245681 commit 567c2b1b7b54bff29e58a952f5f4635caee400bc Leopold Toetsch committed Apr 25, 2004
Showing with 35 additions and 5 deletions.
  1. +7 −1 Configure.pl
  2. +1 −1 config/gen/cpu.pl
  3. +7 −2 config/gen/platform.pl
  4. +20 −1 lib/Parrot/Configure/RunSteps.pm
View
8 Configure.pl
@@ -39,6 +39,10 @@ =head2 Command-line Options
Tells Configure.pl to output information about i<every> setting added or
changed.
+=item C<--verbose-step={N|regex}>
+
+Run C<--verbose=2> for step number C<N> or matching description.
+
=item C<--nomanicheck>
Tells Configure.pl not to run the MANIFEST check.
@@ -250,7 +254,7 @@ =head2 Command-line Options
my %args;
for(@ARGV) {
- my($key, $value)=/--(\w+)(?:=(.*))?/;
+ my($key, $value)=/--([-\w]+)(?:=(.*))?/;
$key = 'help' unless defined $key;
$value = 1 unless defined $value;
@@ -274,6 +278,8 @@ END
--version Show version information
--verbose Output extra information
--verbose=2 Output every setting change
+ --verbose-step=N Set verbose for step N only
+ --verbose-step=regex Set verbose for step matching description
--nomanicheck Don't check the MANIFEST
--ask Have Configure ask for commonly-changed info
View
2 config/gen/cpu.pl
@@ -28,7 +28,7 @@ sub runstep {
return if $miniparrot;
my $cpu = Configure::Data->get('cpuarch');
- print "\n\t(cpu = '$cpu') " if $verbose;
+ print "\t(cpu = '$cpu') " if $verbose;
my $f;
if (-d "config/gen/cpu/$cpu" && -e ($f = "config/gen/cpu/$cpu/auto.pl")) {
require $f;
View
9 config/gen/platform.pl
@@ -23,12 +23,18 @@ package Configure::Step;
@args=qw(miniparrot verbose);
sub runstep {
+ my ($miniparrot, $verbose) = @_;
my $platform=lc $^O;
$platform =~ s/^ms//;
- $platform="ansi" if defined($_[0]);
+ $platform="ansi" if defined($miniparrot);
$platform="generic" unless -d "config/gen/platform/$platform";
+ print " platform='$platform' " if $verbose;
+
+ my $generated = Configure::Data->get('TEMP_generated');
+ print " ($generated) " if $verbose;
+
# headers are merged into platform.h
my @headers = qw/
io.h
@@ -41,7 +47,6 @@ sub runstep {
open PLATFORM_H, "> include/parrot/platform.h"
or die "Can't open include/parrot/platform.h: $!";
- print " platform='$platform' " if $_[1];
print PLATFORM_H <<HERE;
#if !defined(PARROT_PLATFORM_H_GUARD)
View
21 lib/Parrot/Configure/RunSteps.pm
@@ -76,23 +76,42 @@ sub runsteps {
warn $_[0] unless $_[0] =~ /^Subroutine runstep redefined at config/
};
+ my $verbose = $args{verbose};
+ my $n = 0;
+
for(@steps) {
- #print "$_\n";
+
die "No config/$_" unless -e "config/$_";
require "config/$_";
print "\n$Configure::Step::description";
print '.' x (70-length $Configure::Step::description);
+ ++$n;
+ if ($args{'verbose-step'}) {
+ if ($args{'verbose-step'} =~ /^\d+$/ &&
+ $n == $args{'verbose-step'}) {
+ $args{verbose} = 2;
+ }
+ elsif ($Configure::Step::description =~ /$args{'verbose-step'}/) {
+ $args{verbose} = 2;
+ }
+ }
+ # cc_build uses this verbose setting
+ Configure::Data->set('verbose' => $args{verbose}) if $n > 2;
+
print "\n" if $args{verbose} && $args{verbose} == 2;
$Configure::Step::result='done';
+
{
local $_;
Configure::Step::runstep(@args{@Configure::Step::args});
}
print "..." if $args{verbose} && $args{verbose} == 2;
print "$Configure::Step::result." unless m{^inter/} && $args{ask};
+
+ $args{verbose} = $verbose;
}
}

0 comments on commit 567c2b1

Please sign in to comment.