Permalink
Browse files

Configure output cleanup. Retasks --verbose to include the old output…

… for some steps; --verbose=2 now does what --verbose used to do.

Configure steps should not output anything under normal circumstances.  If you really feel the need to give some status info, set
$Configure::Step::result to a short string.


git-svn-id: https://svn.parrot.org/parrot/trunk@5564 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 597f8d4 commit ab81b8c29893b785380139c79fb22bc0c0094013 @brentdax brentdax committed Mar 6, 2004
View
@@ -31,6 +31,11 @@ =head3 General Options
Tells Configure.pl to output extra information about the configuration
data it is setting.
+=item C<--verbose=2>
+
+Tells Configure.pl to output information about i<every> setting added or
+changed.
+
=item C<--nomanicheck>
Tells Configure.pl not to run the MANIFEST check.
@@ -444,6 +449,7 @@ END
--help Show this text
--version Show version information
--verbose Output extra information
+ --verbose=2 Output every setting change
--nomanicheck Don't check the MANIFEST
--maintainer Create imcc's parser and lexer files. Needs a working
parser and lexer.
@@ -19,7 +19,7 @@ package Configure::Step;
$description="Determining your minimum pointer alignment...";
-@args=qw(miniparrot);
+@args=qw(miniparrot verbose);
sub runstep {
my ($miniparrot) = @_;
@@ -33,7 +33,7 @@ sub runstep {
# HP-UX 10.20/32 hangs in this test.
# We currently don't need this configure setting,
# so we just do not test and set some value here
- print(" not tested (4) ");
+ print(" not tested (4) ") if $_[1];
Configure::Data->set(ptr_alignment => 4);
return;
@@ -20,11 +20,11 @@ package Configure::Step;
$description="Determining if your compiler supports computed goto...";
-@args=qw(cgoto miniparrot);
+@args=qw(cgoto miniparrot verbose);
sub runstep {
my $test;
- my ($cgoto, $miniparrot) = @_;
+ my ($cgoto, $miniparrot, $verbose) = @_;
$cgoto = 0 if (defined $miniparrot);
@@ -54,10 +54,10 @@ sub runstep {
$(INC)/oplib/core_ops_cgp.h $(OPS)/core_ops_cgp.c',
cg_flag => '-DHAVE_COMPUTED_GOTO'
);
- print " (yes) ";
+ print " (yes) " if $verbose;
}
else {
- print " (no) ";
+ print " (no) " if $verbose;
Configure::Data->set(
cg_h => '',
cg_c => '',
View
@@ -19,6 +19,7 @@ package Configure::Step;
use Parrot::Configure::Step ':auto';
$description="Determining if your C library has setenv / unsetenv...";
+@args=qw(verbose);
sub runstep {
my ($setenv, $unsetenv) = (0, 0);
@@ -48,16 +49,16 @@ sub runstep {
);
if ($setenv && $unsetenv) {
- print " (both) ";
+ print " (both) " if $_[0];
}
elsif ($setenv) {
- print " (setenv) ";
+ print " (setenv) " if $_[0];
}
elsif ($unsetenv) {
- print " (unsetenv) ";
+ print " (unsetenv) " if $_[0];
}
else {
- print " (no) ";
+ print " (no) " if $_[0];
}
}
@@ -20,7 +20,7 @@ package Configure::Step;
$description="Verifying that the compiler supports function pointer casts...";
-@args=();
+@args=qw(verbose);
sub runstep {
my $jitcapable=Configure::Data->get('jitcapable');
@@ -45,7 +45,7 @@ END
exit(-1);
}
cc_clean();
- print " (yes) ";
+ print " (yes) " if $_[0];
}
}
View
@@ -41,13 +41,13 @@ package Configure::Step;
use vars qw($description @args);
use Parrot::Configure::Step ':auto';
-$description="Determining what allocator to use ...";
+$description="Determining what allocator to use...";
# valid libc/malloc/malloc-trace/gc
-@args=qw(gc);
+@args=qw(gc verbose);
sub runstep {
- my ($gc) = @_;
+ my ($gc, $verbose) = @_;
if (!defined($gc)) {
# default is GC in resources.c
@@ -109,7 +109,7 @@ sub runstep {
gc_flag => '',
);
}
- print(" ($gc) ");
+ print(" ($gc) ") if $verbose;
}
1;
View
@@ -20,7 +20,7 @@ package Configure::Step;
$description="Determining if your C compiler is actually gcc...";
-@args=qw(miniparrot);
+@args=qw(miniparrot verbose);
sub runstep {
my ($miniparrot) = @_;
@@ -41,7 +41,7 @@ sub runstep {
my $major = $gnuc{__GNUC__};
my $minor = $gnuc{__GNUC_MINOR__};
unless (defined $major) {
- print " (no) ";
+ print " (no) " if $_[1];
return;
}
if ($major =~ tr/0-9//c) {
@@ -54,7 +54,7 @@ sub runstep {
$gccversion = $major;
$gccversion .= ".$minor" if defined $minor;
}
- print " (yep: $gccversion )";
+ print " (yep: $gccversion )" if $_[1];
if ($gccversion) {
# If using gcc, crank up its warnings as much as possible and make it
@@ -19,11 +19,11 @@ package Configure::Step;
$description="Determining if your compiler supports inline...";
-@args=qw(inline);
+@args=qw(inline verbose);
sub runstep {
my $test;
- my ($inline) = @_;
+ my ($inline, $verbose) = @_;
if (defined $inline) {
$test = $inline;
@@ -46,10 +46,10 @@ sub runstep {
cc_clean();
}
if ($test) {
- print " ($test) ";
+ print " ($test) " if $verbose;
}
else {
- print " no ";
+ print " no " if $verbose;
$test = '';
}
}
@@ -19,6 +19,8 @@ package Configure::Step;
$description="Determining if your C library has a working S_ISREG...";
+@args=qw(verbose);
+
sub runstep {
my $test = 0;
@@ -32,7 +34,7 @@ sub runstep {
Configure::Data->set(
isreg => $test
);
- print $test ? " (Yep) " : " (no) "
+ print($test ? " (Yep) " : " (no) ") if $_[0];
}
1;
View
@@ -18,14 +18,12 @@ package Configure::Step;
use vars qw($description @args);
use Parrot::Configure::Step qw(copy_if_diff);
-print "\n";
-
$description = "Determining architecture, OS and JIT capability...";
-@args=qw(jitcapable miniparrot execcapable);
+@args=qw(jitcapable miniparrot execcapable verbose);
sub runstep {
- my ($set_jitcapable, $miniparrot, $set_execcapable) = @_;
+ my ($set_jitcapable, $miniparrot, $set_execcapable, $verbose) = @_;
if (defined $miniparrot) {
Configure::Data->set(
@@ -90,7 +88,7 @@ sub runstep {
my $jitcapable = 0;
my $execcapable = 0;
-print "-e \"jit/$cpuarch/core.jit\" = ", -e "jit/$cpuarch/core.jit" ? 'yes' : 'no', "\n";
+print("-e \"jit/$cpuarch/core.jit\" = ", -e "jit/$cpuarch/core.jit" ? 'yes' : 'no', "\n") if $verbose;
if (-e "jit/$cpuarch/core.jit") {
$jitcapable = 1;
@@ -155,21 +153,21 @@ sub runstep {
# test for executable malloced memory
if (-e "config/auto/jit/test_exec_$osname.in") {
- print " (has_exec_protect ";
+ print " (has_exec_protect " if $verbose;
cc_gen("config/auto/jit/test_exec_$osname.in");
eval { cc_build(); };
if ($@) {
- print " $@) ";
+ print " $@) " if $verbose;
}
else {
if (cc_run(0) !~ /ok/ && cc_run(1) =~ /ok/) {
Configure::Data->set(
has_exec_protect => 1
);
- print "yes) ";
+ print "yes) " if $verbose;
}
else {
- print "no) ";
+ print "no) " if $verbose;
}
}
cc_clean();
@@ -19,14 +19,14 @@ package Configure::Step;
$description="Determining if your C library supports memalign...";
-@args=qw(miniparrot);
+@args=qw(miniparrot verbose);
sub runstep {
- my ($miniparrot) = @_;
+ my ($miniparrot, $verbose) = @_;
if ($miniparrot) {
Configure::Data->set(memalign => '');
- print "(skipped) ";
+ print "(skipped) " if $verbose;
return;
}
@@ -60,7 +60,7 @@ sub runstep {
my $f = $test2 ? 'posix_memalign' :
$test ? 'memalign' : '';
Configure::Data->set( memalign => $f );
- print $test ? " (Yep:$f) " : " (no) "
+ print($test ? " (Yep:$f) " : " (no) ") if $verbose;
}
1;
View
@@ -19,10 +19,10 @@ package Configure::Step;
$description = "Determining some signal stuff...";
-@args=qw(miniparrot);
+@args=qw(miniparrot verbose);
sub runstep {
- my ($miniparrot) = @_;
+ my ($miniparrot, $verbose) = @_;
Configure::Data->set(
has___sighandler_t => undef,
has_sigatomic_t => undef,
@@ -39,7 +39,7 @@ sub runstep {
Configure::Data->set(
has___sighandler_t => 'define'
);
- print " (__sighandler_t)";
+ print " (__sighandler_t)" if $verbose;
}
cc_clean();
@@ -49,7 +49,7 @@ sub runstep {
Configure::Data->set(
has_sigaction => 'define'
);
- print " (sigaction)";
+ print " (sigaction)" if $verbose;
}
cc_clean();
@@ -60,7 +60,7 @@ sub runstep {
has_setitimer => 'define',
has_sig_atomic_t => 'define'
);
- print " (setitimer) ";
+ print " (setitimer) " if $verbose;
}
cc_clean();
View
@@ -17,15 +17,15 @@ package Configure::Step;
use strict;
use vars qw($description @args);
-$description="Configuring ICU ...";
+$description="Configuring ICU if requested...";
-@args=qw(buildicu);
+@args=qw(buildicu verbose);
sub runstep {
- my ($buildicu) = @_;
+ my ($buildicu, $verbose) = @_;
unless ($buildicu) {
- print " [Skipped] ";
+ print " [Skipped] " if $verbose;
return;
}
@@ -18,7 +18,7 @@ package Configure::Step;
use vars qw($description @args);
use Parrot::Configure::Step ':gen';
-$description="Generating runtime/parrot/include ... ";
+$description="Generating runtime/parrot/include...";
my @files = qw(
include/parrot/chartype.h
@@ -39,7 +39,7 @@ package Configure::Step;
);
my $destdir = 'runtime/parrot/include';
-@args=();
+@args=qw(verbose);
sub runstep {
# need vtable.h now
@@ -58,7 +58,7 @@ sub runstep {
!x
) {
$inc = $2;
- print "$2 ";
+ print "$2 " if $_[0];
$prefix = ($4 || '');
$subst = ($6 || '');
$in_def = $1;
@@ -20,7 +20,7 @@ package Configure::Step;
$description="Moving platform files into place...";
-@args=qw(miniparrot);
+@args=qw(miniparrot verbose);
sub runstep {
my $platform=lc $^O;
@@ -40,7 +40,7 @@ sub runstep {
open PLATFORM_H, "> include/parrot/platform.h"
or die "Can't open include/parrot/platform.h: $!";
- print " platform='$platform' ";
+ print " platform='$platform' " if $_[1];
print PLATFORM_H <<HERE;
#if !defined(PARROT_PLATFORM_H_GUARD)
Oops, something went wrong.

0 comments on commit ab81b8c

Please sign in to comment.