On Mon, Jan 07, 2002 at 09:27:50AM +0000, Simon Cozens wrote:
> On Sun, Jan 06, 2002 at 03:20:27PM -1000, David & Lisa Jacobs wrote:
> > I recently did a build from scratch and noticed that vtable.ops,
> > vtable_ops.c etc are not being generated.  Is there something new I need to
> > do in the config or is it broken.
> 
> I thought these days it gets automatically folded into core_ops.c when
> that is generated. You can tell, because if none of the PMC tests work,
> then vtable.ops isn't being used. :)

There was a bug in that recent patch to allow different .ops files to
be included while Configuring. Makefile.in has:

OPS_FILES = ${ops} $(GEN_OPSFILES)

where GEN_OPSFILES=vtable.ops, and Configure.pl fills in ${ops} with a
list which also includes vtable.ops. The duplicate mention confuses
ops2pm.pl.

I'm not supplying a patch to the real problem because I don't know the
intention behind this well enough, but here's a patch to make
ops2pm.pl tolerate the duplicate mention:

Index: ops2pm.pl
===================================================================
RCS file: /home/perlcvs/parrot/ops2pm.pl,v
retrieving revision 1.5
diff -p -u -b -r1.5 ops2pm.pl
--- ops2pm.pl   27 Dec 2001 17:08:47 -0000      1.5
+++ ops2pm.pl   7 Jan 2002 20:38:56 -0000
@@ -47,7 +47,14 @@ $file = shift @ARGV;
 die "$0: Could not read ops file '$file'!\n" unless -e $file;
 my $ops = new Parrot::OpsFile $file;
 
+my %seen;
 for $file (@ARGV) {
+    if ($seen{$file}) {
+      print STDERR "$0: Ops file '$file' mentioned more than once!\n";
+      next;
+    }
+    $seen{$file} = 1;
+
     die "$0: Could not read ops file '$file'!\n" unless -e $file;
     my $temp_ops = new Parrot::OpsFile $file;
     for(@{$temp_ops->{OPS}}) {

Reply via email to