[prev in list] [next in list] [prev in thread] [next in thread]
List: perl5-changes
Subject: Change 33608: [PATCH] add -v to regen.pl and friends
From: Nicholas Clark <nwc10+p5p4 () colon ! colondot ! net>
Date: 2008-03-30 16:00:03
Message-ID: 20080330160003.257635002B () mx ! activestate ! com
[Download RAW message or body]
Change 33608 by nicholas@nicholas-bouvard on 2008/03/30 15:48:08
Subject: [PATCH] add -v to regen.pl and friends
From: "Robin Barker" <Robin.Barker@npl.co.uk>
Date: Wed, 19 Mar 2008 10:55:59 -0000
Message-ID: <46A0F33545E63740BC7563DE59CA9C6D093AA6@exchsvr2.npl.ad.local>
Affected files ...
... //depot/perl/Makefile.SH#403 edit
... //depot/perl/regen.pl#8 edit
... //depot/perl/regen_lib.pl#5 edit
Differences ...
==== //depot/perl/Makefile.SH#403 (text) ====
Index: perl/Makefile.SH
--- perl/Makefile.SH#402~33542~ 2008-03-18 11:54:24.000000000 -0700
+++ perl/Makefile.SH 2008-03-30 08:48:08.000000000 -0700
@@ -1033,9 +1033,12 @@
.PHONY: regen_headers regen_pods regen_all
-regen regen_headers: FORCE
+regen: FORCE
-perl regen.pl
+regen_headers: FORCE
+ -perl regen.pl -v
+
regen_pods: FORCE
-cd pod; $(LDLIBPTH) $(MAKE) regen_pods
==== //depot/perl/regen.pl#8 (text) ====
Index: perl/regen.pl
--- perl/regen.pl#7~33537~ 2008-03-15 10:30:19.000000000 -0700
+++ perl/regen.pl 2008-03-30 08:48:08.000000000 -0700
@@ -11,7 +11,6 @@
use strict;
my $perl = $^X;
-require 'regen_lib.pl';
# keep warnings.pl in sync with the CPAN distribution by not requiring core
# changes. Um, what ?
# safer_unlink ("warnings.h", "lib/warnings.pm");
@@ -46,10 +45,11 @@
foreach my $pl (qw (keywords.pl opcode.pl embed.pl
regcomp.pl warnings.pl autodoc.pl reentr.pl)) {
- print "$^X $pl\n";
+ my @command = ($^X, $pl, @ARGV);
+ print "@command\n";
my %cksum0;
%cksum0 = do_cksum($pl) unless $pl eq 'warnings.pl'; # the files were removed
- system "$^X $pl";
+ system @command;
next if $pl eq 'warnings.pl'; # the files were removed
my %cksum1 = do_cksum($pl);
my @chg;
==== //depot/perl/regen_lib.pl#5 (text) ====
Index: perl/regen_lib.pl
--- perl/regen_lib.pl#4~33539~ 2008-03-16 17:17:26.000000000 -0700
+++ perl/regen_lib.pl 2008-03-30 08:48:08.000000000 -0700
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
use strict;
-use vars qw($Is_W32 $Is_OS2 $Is_Cygwin $Is_NetWare $Needs_Write);
+use vars qw($Is_W32 $Is_OS2 $Is_Cygwin $Is_NetWare $Needs_Write $Verbose);
use Config; # Remember, this is running using an existing perl
use File::Compare;
use Symbol;
@@ -17,6 +17,8 @@
$Needs_Write = $Is_OS2 || $Is_W32 || $Is_Cygwin || $Is_NetWare;
+@ARGV = grep { not($_ eq '-v' and $Verbose = 1) } @ARGV;
+
sub safer_unlink {
my @names = @_;
my $cnt = 0;
@@ -44,7 +46,7 @@
my ($from, $to) = @_;
if (compare($from, $to) == 0) {
- warn "no changes between '$from' & '$to'\n";
+ warn "no changes between '$from' & '$to'\n" if $Verbose;
safer_unlink($from);
return;
}
End of Patch.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic