cvsuser     04/11/04 01:07:20

  Modified:    config/gen/makefiles dynclasses.in dynclasses_pl.in
               dynclasses subproxy.pmc
               lib/Parrot Pmc2c.pm
  Log:
  dynclass build
  
  Attached patch makes building in the dynclass ghetto a bit less
  inhospitable...
  
  Courtesy of Sam Ruby <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  1.9       +4 -4      parrot/config/gen/makefiles/dynclasses.in
  
  Index: dynclasses.in
  ===================================================================
  RCS file: /cvs/public/parrot/config/gen/makefiles/dynclasses.in,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- dynclasses.in     12 Oct 2004 09:00:16 -0000      1.8
  +++ dynclasses.in     4 Nov 2004 09:07:16 -0000       1.9
  @@ -14,10 +14,10 @@
   BUILD = ${perl} build.pl
   
   all :
  -     $(BUILD) generate $(PMCS)
  -     $(BUILD) compile $(PMCS)
  -     $(BUILD) linklibs $(PMCS)
  -     $(BUILD) copy --destination=$(DESTDIR) $(PMCS)
  +     @$(BUILD) generate $(PMCS)
  +     @$(BUILD) compile $(PMCS)
  +     @$(BUILD) linklibs $(PMCS)
  +     @$(BUILD) copy --destination=$(DESTDIR) $(PMCS)
   
   clean :
        $(RM_F) *.c *.h *$(LOAD_EXT) *.dump lib-* *$(O)
  
  
  
  1.4       +12 -6     parrot/config/gen/makefiles/dynclasses_pl.in
  
  Index: dynclasses_pl.in
  ===================================================================
  RCS file: /cvs/public/parrot/config/gen/makefiles/dynclasses_pl.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- dynclasses_pl.in  14 Oct 2004 09:40:12 -0000      1.3
  +++ dynclasses_pl.in  4 Nov 2004 09:07:16 -0000       1.4
  @@ -43,9 +43,11 @@
       my ($group_files, $pmc_group) = gather_groups(@pmcs);
   
       while (my ($group, $pmcs) = each %$group_files) {
  -        my $pmcfiles = join(" ", map { "$_.pmc" } @$pmcs);
  -        run("$PMC2C --library $group --c $pmcfiles")
  -          or die "pmc2c library creation failed ($?)\n";
  +        my @pmcfiles = map { "$_.pmc" } @$pmcs;
  +        if (needs_build("$group.c", @pmcfiles)) {
  +            run("$PMC2C --library $group --c " . join(" ",@pmcfiles))
  +              or die "pmc2c library creation failed ($?)\n";
  +        }
       }
   } elsif ($mode eq 'compile') {
       my ($group_files, $pmc_group) = gather_groups(@pmcs);
  @@ -123,7 +125,7 @@
       my $target_mod = modtime($target)
         or return 1;
       for my $source (@sources) {
  -        return 1 if modtime($source) >= $target_mod;
  +        return 1 if modtime($source) > $target_mod;
       }
       return 0;
   }
  @@ -134,8 +136,6 @@
       if (needs_build("$pmc.dump", "$pmc.pmc")) {
           run("$PMC2C --dump $pmc.pmc")
             or die "pmc2c dump failed ($?)\n";
  -    } else {
  -        print "$pmc.dump is up to date\n";
       }
   }
   
  @@ -155,6 +155,9 @@
           run(compile_cmd("$dest_stem$O", "$src_stem.c"))
             or die "compile $src_stem.c failed ($?)\n";
       }
  +    else {
  +        1;
  +    }
   }
   
   sub partial_link {
  @@ -164,4 +167,7 @@
           run(partial_link_cmd("$group$LOAD_EXT", @sources))
             or die "partial link $group$LOAD_EXT failed ($?)\n";
       }
  +    else {
  +        1;
  +    }
   }
  
  
  
  1.5       +1 -1      parrot/dynclasses/subproxy.pmc
  
  Index: subproxy.pmc
  ===================================================================
  RCS file: /cvs/public/parrot/dynclasses/subproxy.pmc,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- subproxy.pmc      23 Sep 2004 12:48:26 -0000      1.4
  +++ subproxy.pmc      4 Nov 2004 09:07:17 -0000       1.5
  @@ -55,7 +55,7 @@
            ((parrot_sub_t)(PMC_sub(SELF))) ->end =
                    ((parrot_sub_t)(PMC_sub(rsub))) ->end;
        }
  -     SUPER(next);
  +     return SUPER(next);
       }
   }
   
  
  
  
  1.49      +4 -2      parrot/lib/Parrot/Pmc2c.pm
  
  Index: Pmc2c.pm
  ===================================================================
  RCS file: /cvs/public/parrot/lib/Parrot/Pmc2c.pm,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- Pmc2c.pm  1 Nov 2004 12:28:49 -0000       1.48
  +++ Pmc2c.pm  4 Nov 2004 09:07:20 -0000       1.49
  @@ -1,5 +1,5 @@
   # Copyright: 2004 The Perl Foundation.  All Rights Reserved.
  -# $Id: Pmc2c.pm,v 1.48 2004/11/01 12:28:49 leo Exp $
  +# $Id: Pmc2c.pm,v 1.49 2004/11/04 09:07:20 leo Exp $
   
   =head1 NAME
   
  @@ -1577,6 +1577,7 @@
       my %opt = %{$self->{opt}};
       my $library = $opt{library} ? 1 : 0;
   
  +    if (!$library) {
       while (my @fc = each %{$self->{pmcs}}) {
           my ($file, $generator) = @fc;
        print Data::Dumper->Dump([$generator]) if $opt{debug} > 1;
  @@ -1600,7 +1601,8 @@
           close C;
       }
   
  -    if ($library) {
  +    }
  +    else {
        my $hout = $self->gen_h($opt{library});
           my $h = "$opt{library}.h";
           print "Writing $h\n" if $opt{verbose};
  
  
  

Reply via email to