From: Dave Mitchell Date: Sun, 20 Jun 2004 12:00:56 +0000 (+0000) Subject: make mktables always update modifed time to play better with make X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=00da7942926f78f065bf22f95a34f99cf3d0b5bf;p=p5sagit%2Fp5-mst-13.2.git make mktables always update modifed time to play better with make p4raw-id: //depot/perl@22963 --- diff --git a/Makefile.SH b/Makefile.SH index 7620570..2925409 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -759,7 +759,7 @@ lib/lib.pm: miniperl$(EXE_EXT) lib/Config.pm $(LDLIBPTH) ./miniperl -Ilib lib/lib_pm.PL $(unidatafiles): miniperl$(EXE_EXT) lib/Config.pm lib/unicore/mktables - cd lib/unicore && $(LDLIBPTH) ../../miniperl -I../../lib mktables + cd lib/unicore && $(LDLIBPTH) ../../miniperl -I../../lib mktables -w extra.pods: miniperl$(EXE_EXT) -@test -f extra.pods && rm -f `cat extra.pods` diff --git a/lib/unicore/mktables b/lib/unicore/mktables index aa92643..18f0033 100644 --- a/lib/unicore/mktables +++ b/lib/unicore/mktables @@ -27,6 +27,7 @@ my %BaseNames; ## my $Verbose = 0; my $MakeTestScript = 0; +my $AlwaysWrite = 0; while (@ARGV) { @@ -35,6 +36,8 @@ while (@ARGV) $Verbose = 1; } elsif ($arg eq '-q') { $Verbose = 0; + } elsif ($arg eq '-w') { + $AlwaysWrite = 1; # update the files even if they havent changed } elsif ($arg eq '-maketest') { $MakeTestScript = 1; } elsif ($arg eq '-C' && defined (my $dir = shift)) { @@ -88,7 +91,7 @@ sub WriteIfChanged($\@) close IN; if ($PreviousText eq $TextToWrite) { print "$file unchanged.\n" if $Verbose; - return; + return unless $AlwaysWrite; } } force_unlink ($file);