Index: lib/Parrot/Configure/Step/List.pm =================================================================== --- lib/Parrot/Configure/Step/List.pm (revision 0) +++ lib/Parrot/Configure/Step/List.pm (revision 0) @@ -0,0 +1,130 @@ +# Copyright (C) 2001-2006, The Perl Foundation. +# $Id: List.pm 17903 2007-03-31 15:53:17Z jkeenan $ +package Parrot::Configure::Step::List; +use strict; +use warnings; +use base qw( Exporter ); +our @EXPORT_OK = qw( get_steps_list ); + +# EDIT HERE TO ADD NEW TESTS +my @steps = qw( + init::manifest + init::defaults + init::install + init::miniparrot + init::hints + init::headers + inter::progs + inter::make + inter::lex + inter::yacc + auto::gcc + auto::msvc + init::optimize + inter::shlibs + inter::libparrot + inter::charset + inter::encoding + inter::types + inter::ops + inter::pmc + auto::alignptrs + auto::headers + auto::sizes + auto::byteorder + auto::va_ptr + auto::pack + auto::format + auto::isreg + auto::jit + gen::cpu + auto::funcptr + auto::cgoto + auto::inline + auto::gc + auto::memalign + auto::signal + auto::socklen_t + auto::env + auto::aio + auto::gmp + auto::readline + auto::gdbm + auto::snprintf + auto::perldoc + auto::python + auto::m4 + auto::cpu + gen::icu + gen::revision + gen::config_h + gen::core_pmcs + gen::parrot_include + gen::languages + gen::makefiles + gen::platform + gen::config_pm +); + +sub get_steps_list {return @steps;} + +1; + +#################### DOCUMENTATION #################### + +=head1 NAME + +Parrot::Configure::Step::List - Get sequence of configuration steps + +=head1 SYNOPSIS + + use Parrot::Configure::Step::List qw( get_steps_list ); + + @steps = get_steps_list(); + +=head1 DESCRIPTION + +Parrot::Configure::Step::List exports on demand a single subroutine, +C. This subroutine returns a list of Parrot's configuration +steps in the order in which they are to be executed. To change the order in +which the steps are executed, edit C<@steps> inside this module. + +=head1 SUBROUTINE + +=head2 C + +=over 4 + +=item * Purpose + +Provide Parrot configuration steps in their order of execution. + +=item * Arguments + +None. + +=item * Return Value + +List holding strings representing the configuration steps. + +=item * Comment + +=back + +=head1 NOTES + +The functionality in this package was transferred from F by Jim +Keenan. + +=head1 SEE ALSO + +F. + +=cut + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: Property changes on: lib/Parrot/Configure/Step/List.pm ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Index: MANIFEST =================================================================== --- MANIFEST (revision 18031) +++ MANIFEST (working copy) @@ -2223,6 +2223,7 @@ lib/Parrot/Configure/Options.pm [devel] lib/Parrot/Configure/Step.pm [devel] lib/Parrot/Configure/Step/Base.pm [devel] +lib/Parrot/Configure/Step/List.pm [devel] lib/Parrot/Distribution.pm [devel] lib/Parrot/Docs/Directory.pm [devel] lib/Parrot/Docs/File.pm [devel] @@ -2766,6 +2767,7 @@ t/compilers/tge/parser.t [] t/configure/01-options.t [] t/configure/02-messages.t [] +t/configure/03-steplist.t [] t/configure/base.t [] t/configure/config_steps.t [] t/configure/configure.t [] Index: Configure.pl =================================================================== --- Configure.pl (revision 18031) +++ Configure.pl (working copy) @@ -267,6 +267,7 @@ print_introduction print_conclusion ); +use Parrot::Configure::Step::List qw( get_steps_list ); # These globals are accessed in config/init/defaults.pm our $parrot_version = Parrot::BuildUtil::parrot_version(); @@ -364,7 +365,10 @@ no warnings qw(once); $Parrot::Configure::Step::conf = $conf; } -$conf->add_steps(@steps); + +# from Parrot::Configure::Step::List +$conf->add_steps(get_steps_list()); + $conf->options->set(%args); if ( exists $args{step} ) { Index: t/configure/03-steplist.t =================================================================== --- t/configure/03-steplist.t (revision 0) +++ t/configure/03-steplist.t (revision 0) @@ -0,0 +1,63 @@ +#! perl +# Copyright (C) 2007, The Perl Foundation. +# $Id: 03-steplist.t 17800 2007-03-28 01:19:35Z jkeenan $ +# 03-steplist.t + +use strict; +use warnings; + +BEGIN { + use FindBin qw($Bin); + use Cwd qw(cwd realpath); + realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$}; + our $topdir = $1; + if ( defined $topdir ) { + print "\nOK: Parrot top directory located\n"; + } + else { + $topdir = realpath($Bin) . "/../.."; + } + unshift @INC, qq{$topdir/lib}; +} +use Test::More qw(no_plan); # tests => 10; +use Carp; +use_ok('Parrot::Configure::Step::List', qw| + get_steps_list +| ); + +my @steps; +ok(@steps = get_steps_list(), "non-zero number of steps located"); +my $badsteps = 0; +foreach my $s (@steps) { + $badsteps++ unless $s =~ /^(init|inter|auto|gen)::\w+$/; +} +is($badsteps, 0, "no bad entries found in \@steps"); + +pass("Completed all tests in $0"); + +################### DOCUMENTATION ################### + +=head1 NAME + +03-steplist.t - test Parrot::Configure::Step::List + +=head1 SYNOPSIS + + % prove t/configure/03-steplist.t + +=head1 DESCRIPTION + +The files in this directory test functionality used by F. + +The tests in this file test subroutines exported by +Parrot::Configure::Step::List. + +=head1 AUTHOR + +James E Keenan + +=head1 SEE ALSO + +Parrot::Configure::Step::List, F. + +=cut Property changes on: t/configure/03-steplist.t ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native