This one is quite useful to anyone who's fiddling around with additional oplibs. It adds a prompt to Configure asking for a list of opcode files to use. The default is everything available except for obscure.ops.
In addition, it makes it so that if your answer to a question starts with '+', it will concatenate it to the default. For example: What C compiler do you want to use? [cl] +HAHAHA!!! will result in $PConfig{cc} eq "cl HAHAHA!!!". While that example is not terribly useful, it is quite useful with things like command-line flags and the like. Finally, it contains a couple tweaks so that my syntax-highlighting editor recognizes some heredocs correctly. :^) --Brent Dax [EMAIL PROTECTED] Configure pumpking for Perl 6 "Nothing important happened today." --George III of England's diary entry for 4-Jul-1776 --- ..\..\parrot-cvs\parrot\Configure.pl Sat Jan 5 03:58:50 2002 +++ Configure.pl Sat Jan 5 03:16:18 2002 @@ -178,6 +178,8 @@ MAJOR => $parrot_version[0], MINOR => $parrot_version[1], PATCH => $parrot_version[2], + + ops => "", ); # What's the platform shell quote character? @@ -239,6 +241,40 @@ prompt("And your floats?", 'nv'); prompt("What is your native opcode type?", 'opcode_t'); + +{ + my(@ops)=glob("*.ops"); + + $c{ops}=join ' ', sort { + if ($a eq 'core.ops') { -1 } + elsif($b eq 'core.ops') { 1 } + else { $a cmp $b } + } grep {!/obscure\.ops/} @ops; + + my $msg; + + chomp($msg=<<"END"); + +Now I have to find out what opcode files you would like to compile into your +Parrot. + +The following opcode files are available: +@ops + +WARNING: Bad Things may happen if the first file on the list isn't core.ops. + +WARNING: These file names will not be checked for spelling, and typing them + wrong will force you to run Configure again. + +WARNING: I worry way too much about Configure users. + +Which opcode files would you like? +END + + prompt($msg, 'ops'); +} + + print <<"END"; Determining if your C compiler is actually gcc (this could take a while): @@ -253,7 +289,7 @@ unlink("test_siz$c{exe}", "test$c{o}"); unless (exists $gnuc{__GNUC__}) { - print << 'END'; + print <<'END'; The test program didn't give the expected result - assuming your compiler is not gcc. @@ -264,7 +300,7 @@ my $major = $gnuc{__GNUC__}; my $minor = $gnuc{__GNUC_MINOR__}; unless (defined $major) { - print << 'END'; + print <<'END'; Your C compiler is not gcc. @@ -593,7 +629,12 @@ my($input); print "$message [$c{$field}] "; chomp($input=<STDIN>); - $c{$field}=$input||$c{$field}; + + if($input =~ /^\+/) { + $input="$c{$field} $input"; + } + + $c{$field}=$input||$c{$field}; } @@ -684,9 +725,11 @@ else { print <<"END"; Okay, we found everything. Next you'll need to answer -a few questions about your system. Rules are the same -as Perl 5's Configure--defaults are in square brackets, -and you can hit enter to accept them. +a few questions about your system. Defaults are in square +brackets, and you can hit enter to accept them. If you +don't want the default, type a new value in. If that new +value starts with a '+', it will be concatenated to the +default value. END } --- ..\..\parrot-cvs\parrot\Makefile.in Sat Jan 5 03:58:50 2002 +++ Makefile.in Sat Jan 5 03:05:00 2002 @@ -63,7 +63,7 @@ $(INC)/global_setup.h $(INC)/vtable.h $(INC)/oplib/core_ops.h $(INC)/oplib/core_ops_prederef.h \ $(INC)/runops_cores.h $(INC)/trace.h \ $(INC)/pmc.h $(INC)/key.h $(INC)/resources.h $(INC)/platform.h \ -$(INC)/interp_guts.h ${jit_h} ${jit_struct_h} +$(INC)/interp_guts.h ${jit_h} ${jit_struct_h} $(INC)/rx.h CLASS_O_FILES = classes/default$(O) classes/perlint$(O) classes/perlstring$(O) \ classes/perlnum$(O) classes/perlarray$(O) classes/perlundef$(O) \ @@ -83,6 +83,7 @@ O_FILES = $(INTERP_O_FILES) $(IO_O_FILES) $(CLASS_O_FILES) $(ENCODING_O_FILES) $(CHARTYPE_O_FILES) +OPS_FILES = ${ops} ######################################################################## ####### # @@ -295,13 +296,13 @@ core_ops$(O): $(H_FILES) core_ops.c -core_ops.c $(INC)/oplib/core_ops.h: core.ops vtable.ops ops2c.pl Parrot/OpsFile.pm Parrot/Op.pm - $(PERL) ops2c.pl C core.ops vtable.ops +core_ops.c $(INC)/oplib/core_ops.h: $(OPS_FILES) ops2c.pl Parrot/OpsFile.pm Parrot/Op.pm + $(PERL) ops2c.pl C $(OPS_FILES) core_ops_prederef$(O): $(H_FILES) core_ops_prederef.c -core_ops_prederef.c $(INC)/oplib/core_ops_prederef.h: core.ops vtable.ops ops2c.pl Parrot/OpsFile.pm Parrot/Op.pm - $(PERL) ops2c.pl CPrederef core.ops vtable.ops +core_ops_prederef.c $(INC)/oplib/core_ops_prederef.h: $(OPS_FILES) ops2c.pl Parrot/OpsFile.pm Parrot/Op.pm + $(PERL) ops2c.pl CPrederef $(OPS_FILES) vtable.ops: make_vtable_ops.pl $(PERL) make_vtable_ops.pl > vtable.ops