cvsuser 02/01/06 10:03:57
Modified: . Makefile.in Configure.pl
Log:
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. :^)
Courtesy of "Brent Dax" <[EMAIL PROTECTED]>
Revision Changes Path
1.105 +6 -5 parrot/Makefile.in
Index: Makefile.in
===================================================================
RCS file: /home/perlcvs/parrot/Makefile.in,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -w -r1.104 -r1.105
--- Makefile.in 5 Jan 2002 03:57:41 -0000 1.104
+++ Makefile.in 6 Jan 2002 18:03:57 -0000 1.105
@@ -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
1.73 +51 -8 parrot/Configure.pl
Index: Configure.pl
===================================================================
RCS file: /home/perlcvs/parrot/Configure.pl,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -w -r1.72 -r1.73
--- Configure.pl 5 Jan 2002 12:37:08 -0000 1.72
+++ Configure.pl 6 Jan 2002 18:03:57 -0000 1.73
@@ -2,7 +2,7 @@
#
# Configure.pl
#
-# $Id: Configure.pl,v 1.72 2002/01/05 12:37:08 simon Exp $
+# $Id: Configure.pl,v 1.73 2002/01/06 18:03:57 dan Exp $
#
# Author: Brent Dax
#
@@ -42,7 +42,7 @@
if($opt_version) {
print "Parrot Version $parrot_version Configure\n";
- print '$Id: Configure.pl,v 1.72 2002/01/05 12:37:08 simon Exp $' . "\n";
+ print '$Id: Configure.pl,v 1.73 2002/01/06 18:03:57 dan Exp $' . "\n";
exit;
}
@@ -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):
@@ -594,6 +630,11 @@
my($input);
print "$message [$c{$field}] ";
chomp($input=<STDIN>);
+
+ if($input =~ /^\+/) {
+ $input="$c{$field} $input";
+ }
+
$c{$field}=$input||$c{$field};
}
@@ -685,9 +726,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
}