Author: jkeenan
Date: Wed Jun 13 20:30:24 2007
New Revision: 18995
Modified:
branches/reconfigure/config/directives/configure.op
branches/reconfigure/config/inter/make.pm
branches/reconfigure/lib/Parrot/Configure/Options.pm
Log:
Patch contributed by Geraud Continsouzas for inter::progs step. Breaks no
current tests, but as yet we don't have unit tests for that package.
Modified: branches/reconfigure/config/directives/configure.op
==============================================================================
--- branches/reconfigure/config/directives/configure.op (original)
+++ branches/reconfigure/config/directives/configure.op Wed Jun 13 20:30:24 2007
@@ -2,7 +2,8 @@
parrot_version
## here i'm overriding the command-line vars passed to Configure.pl
-process_opts --test=configure
+#process_opts --test=configure
+process_opts
## that will cause this op to run, since $args{test} eq 'configure'
test configure
@@ -35,7 +36,8 @@
run inter::types
run inter::ops
## pass options to a specific config step
-run inter::pmc --ask
+#run inter::pmc --ask
+run inter::pmc
run auto::alignptrs
run auto::headers
run auto::sizes
Modified: branches/reconfigure/config/inter/make.pm
==============================================================================
--- branches/reconfigure/config/inter/make.pm (original)
+++ branches/reconfigure/config/inter/make.pm Wed Jun 13 20:30:24 2007
@@ -3,7 +3,7 @@
=head1 NAME
-config/auto/make.pm - make utility
+config/inter/make.pm - make utility
=head1 DESCRIPTION
@@ -37,11 +37,17 @@
my $prog;
- # precedence of sources for the program:
- # default -> probe -> environment -> option -> ask
- $prog ||= $conf->data->get($util);
- $prog ||= $conf->options->get($util);
+ # check the candidates for a 'make' program in this order:
+ # environment ; option ; probe ; ask ; default
+ # first pick wins.
$prog ||= $ENV{ uc($util) };
+ $prog ||= $conf->options->get($util);
+ $prog ||= check_progs( ['gmake', 'mingw32-make', 'nmake', 'make'],
$verbose );
+ if ( !$prog ) {
+ $prog = ( $conf->options->get('ask') )
+ ? prompt( $prompt, $prog ? $prog : $conf->data->get($util) )
+ : $conf->data->get($util);
+ }
# never override the user. If a non-existent program is specified then
# the user is responsible for the consequences.
@@ -50,18 +56,9 @@
$self->set_result('yes');
}
else {
- $prog = check_progs( [ 'gmake', 'mingw32-make', 'nmake', 'make' ],
$verbose );
-
- unless ($prog) {
-
- # fall back to default
- $self->set_result('no');
- return $self;
- }
- }
-
- if ( $conf->options->get('ask') ) {
- $prog = prompt( $prompt, $prog ? $prog : $conf->data->get($util) );
+ # fall back to default
+ $self->set_result('no');
+ return $self;
}
my ( $stdout, $stderr, $ret ) = capture_output( $prog, '--version' );
@@ -69,7 +66,6 @@
# don't override the user even if the program they provided appears to be
# broken
if ( $ret == -1 and !$conf->options->get('ask') ) {
-
# fall back to default
$self->set_result('no');
return $self;
Modified: branches/reconfigure/lib/Parrot/Configure/Options.pm
==============================================================================
--- branches/reconfigure/lib/Parrot/Configure/Options.pm (original)
+++ branches/reconfigure/lib/Parrot/Configure/Options.pm Wed Jun 13
20:30:24 2007
@@ -14,10 +14,10 @@
debugging define exec-prefix execcapable floatval gc help icu-config
icudatadir icuheaders icushared includedir infodir inline intval
jitcapable ld ldflags lex libdir libexecdir libs link linkflags
- localstatedir m maintainer mandir miniparrot nomanicheck oldincludedir
- opcode ops optimize parrot_is_shared pmc prefix profile sbindir
- sharedstatedir step sysconfdir test verbose verbose-step version
- without-gdbm without-gmp without-icu yacc);
+ localstatedir m make maintainer mandir miniparrot nomanicheck
+ oldincludedir opcode ops optimize parrot_is_shared pmc prefix profile
+ sbindir sharedstatedir step sysconfdir test verbose verbose-step
+ version without-gdbm without-gmp without-icu yacc);
}
sub process_options {
@@ -115,6 +115,7 @@
--ld=(linker) Use the given loader for shared libraries
--ldflags=(flags) Use the given loader flags for shared libraries
--lex=(lexer) Use the given lexical analyzer generator
+ --make=(make tool) Use the given make utility
--yacc=(parser) Use the given parser generator
--define=inet_aton Quick hack to use inet_aton instead of inet_pton