From: Yves Orton Date: Tue, 8 Mar 2005 02:24:10 +0000 (+0100) Subject: Re: Stop mktables from needlessly re-running when using dmake on Win32 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=00a8df5c7fec3b630b936c5570f60eb2bbfd7675;p=p5sagit%2Fp5-mst-13.2.git Re: Stop mktables from needlessly re-running when using dmake on Win32 Message-ID: <9b18b311050307172455a5816e@mail.gmail.com> Change 24004 stopped mktables from needlessly re-running when using dmake on Win32, but it can still happen when using nmake because it doesn't support the .UPDATEALL attribute that was used to fix dmake. e.g. Build perl, touch a core header file, then rebuild -- mktables re-runs when it didn't need to, and 7 times over at that! This change alleviates the pain by making mktables exit quickly in such cases. p4raw-id: //depot/perl@24056 --- diff --git a/lib/unicore/mktables b/lib/unicore/mktables index 58092f1..4988e96 100644 --- a/lib/unicore/mktables +++ b/lib/unicore/mktables @@ -1,3 +1,6 @@ +## !!!!!!!!!!!!!! IF YOU MODIFY THIS FILE !!!!!!!!!!!!!!!!!!!!!!!!! +## Any files created or read by this program should be listed in 'mktables.lst' + #!/usr/bin/perl -w require 5.008; # Needs pack "U". Probably safest to run on 5.8.x use strict; @@ -47,6 +50,63 @@ while (@ARGV) } } +if (!$AlwaysWrite) { + print "Reading file list...\n" + if $Verbose; + open my $fh,"<","mktables.lst" + or die "Failed to read mktables.lst:$!"; + my @input =( $0 ); + my @output; + for my $list ( \@input, \@output ) { + while (<$fh>) { + s/^ \s+ | \s+ $//xg; + next if /^ \s* (?: \# .* )? $/x; + last if /^ =+ $/x; + my ( $file ) = split /\t/, $_; + push @$list, $file; + } + my %dupe; + @$list = grep !$dupe{ $_ }++, @$list; + } + close $fh; + die "No input or output files in mktables.lst!" + if !@input or !@output; + if ( $Verbose ) { + print "Expecting ".scalar( @input )." input files. ", + "Checking ".scalar( @output )." output files.\n"; + } + my $maxtime = 0; + foreach my $in (@input) { + my $time = -M $in; + die "Missing input file '$in'" unless defined $time; + $maxtime = $time if $maxtime < $time; + } + + my $ok = 1; + foreach my $out (@output) { + if ( ! -e $out ) { + print "'$out' is missing.\n" + if $Verbose; + $ok = 0; + last; + } + if ( -M $out > $maxtime ) { + print "'$out' is too old.\n" + if $Verbose; + $ok = 0; + last; + } + } + if ($ok) { + print "Files seem to be ok, not bothering to rebuild.\n"; + exit(0); + } + print "Must rebuild tables.\n" + if $Verbose; +} elsif ($Verbose) { + print "Not checking file list as -w option set.\n"; +} + foreach my $lib ('To', 'lib', map {File::Spec->catdir("lib",$_)} qw(gc_sc dt bc hst ea jt lb nt ccc)) { diff --git a/lib/unicore/mktables.lst b/lib/unicore/mktables.lst new file mode 100644 index 0000000..4ff43bf --- /dev/null +++ b/lib/unicore/mktables.lst @@ -0,0 +1,452 @@ +# +# mktables.lst -- File list for mktables. +# +# - First section is input files +# (mktables itself is automatically included) +# - Section seperator is /^=+$/ +# - Second section is a list of output files. +# - Lines matching /^\s*#/ are treated as comments +# which along with blank lines are ignored. +# + +# Input files: + +PropertyAliases.txt +PropValueAliases.txt +UnicodeData.txt +LineBreak.txt +ArabicShaping.txt +EastAsianWidth.txt +HangulSyllableType.txt +Jamo.txt +Scripts.txt +Blocks.txt +PropList.txt +SpecialCasing.txt +CaseFolding.txt + +================================= + +# Output files: + +Canonical.pl +CombiningClass.pl +Decomposition.pl +Exact.pl +Name.pl +PVA.pl +Properties +To/Digit.pl +To/Fold.pl +To/Lower.pl +To/Title.pl +To/Upper.pl +lib/bc/AL.pl +lib/bc/AN.pl +lib/bc/B.pl +lib/bc/BN.pl +lib/bc/CS.pl +lib/bc/EN.pl +lib/bc/ES.pl +lib/bc/ET.pl +lib/bc/L.pl +lib/bc/LRE.pl +lib/bc/LRO.pl +lib/bc/NSM.pl +lib/bc/ON.pl +lib/bc/PDF.pl +lib/bc/R.pl +lib/bc/RLE.pl +lib/bc/RLO.pl +lib/bc/S.pl +lib/bc/WS.pl +lib/ccc/A.pl +lib/ccc/AL.pl +lib/ccc/AR.pl +lib/ccc/ATAR.pl +lib/ccc/ATB.pl +lib/ccc/ATBL.pl +lib/ccc/B.pl +lib/ccc/BL.pl +lib/ccc/BR.pl +lib/ccc/DA.pl +lib/ccc/DB.pl +lib/ccc/IS.pl +lib/ccc/KV.pl +lib/ccc/L.pl +lib/ccc/NK.pl +lib/ccc/NR.pl +lib/ccc/OV.pl +lib/ccc/R.pl +lib/ccc/VR.pl +lib/dt/can.pl +lib/dt/com.pl +lib/dt/enc.pl +lib/dt/fin.pl +lib/dt/font.pl +lib/dt/fra.pl +lib/dt/init.pl +lib/dt/iso.pl +lib/dt/med.pl +lib/dt/nar.pl +lib/dt/nb.pl +lib/dt/sml.pl +lib/dt/sqr.pl +lib/dt/sub.pl +lib/dt/sup.pl +lib/dt/vert.pl +lib/dt/wide.pl +lib/ea/A.pl +lib/ea/F.pl +lib/ea/H.pl +lib/ea/N.pl +lib/ea/Na.pl +lib/ea/W.pl +lib/gc_sc/AHex.pl +lib/gc_sc/ASCII.pl +lib/gc_sc/Alnum.pl +lib/gc_sc/Alpha.pl +lib/gc_sc/Alphabet.pl +lib/gc_sc/Any.pl +lib/gc_sc/Arab.pl +lib/gc_sc/Armn.pl +lib/gc_sc/AsciiHex.pl +lib/gc_sc/Assigned.pl +lib/gc_sc/Beng.pl +lib/gc_sc/BidiC.pl +lib/gc_sc/BidiCont.pl +lib/gc_sc/Blank.pl +lib/gc_sc/Bopo.pl +lib/gc_sc/Brai.pl +lib/gc_sc/Buhd.pl +lib/gc_sc/C.pl +lib/gc_sc/Canadian.pl +lib/gc_sc/Cc.pl +lib/gc_sc/Cf.pl +lib/gc_sc/Cher.pl +lib/gc_sc/Cn.pl +lib/gc_sc/Cntrl.pl +lib/gc_sc/Co.pl +lib/gc_sc/Cprt.pl +lib/gc_sc/Cs.pl +lib/gc_sc/Cyrl.pl +lib/gc_sc/Dash.pl +lib/gc_sc/Dash2.pl +lib/gc_sc/Dep.pl +lib/gc_sc/Deprecat.pl +lib/gc_sc/Deva.pl +lib/gc_sc/Dia.pl +lib/gc_sc/Diacriti.pl +lib/gc_sc/Digit.pl +lib/gc_sc/Dsrt.pl +lib/gc_sc/Ethi.pl +lib/gc_sc/Ext.pl +lib/gc_sc/Extender.pl +lib/gc_sc/Geor.pl +lib/gc_sc/Goth.pl +lib/gc_sc/GrLink.pl +lib/gc_sc/Graph.pl +lib/gc_sc/Grapheme.pl +lib/gc_sc/Grek.pl +lib/gc_sc/Gujr.pl +lib/gc_sc/Guru.pl +lib/gc_sc/Hang.pl +lib/gc_sc/Hani.pl +lib/gc_sc/Hano.pl +lib/gc_sc/Hebr.pl +lib/gc_sc/Hex.pl +lib/gc_sc/HexDigit.pl +lib/gc_sc/Hira.pl +lib/gc_sc/Hyphen.pl +lib/gc_sc/Hyphen2.pl +lib/gc_sc/IDSB.pl +lib/gc_sc/IDST.pl +lib/gc_sc/IdContin.pl +lib/gc_sc/IdStart.pl +lib/gc_sc/Ideo.pl +lib/gc_sc/Ideograp.pl +lib/gc_sc/IdsBinar.pl +lib/gc_sc/IdsTrina.pl +lib/gc_sc/InAegean.pl +lib/gc_sc/InAlphab.pl +lib/gc_sc/InArabi2.pl +lib/gc_sc/InArabi3.pl +lib/gc_sc/InArabic.pl +lib/gc_sc/InArmeni.pl +lib/gc_sc/InArrows.pl +lib/gc_sc/InBasicL.pl +lib/gc_sc/InBengal.pl +lib/gc_sc/InBlockE.pl +lib/gc_sc/InBopom2.pl +lib/gc_sc/InBopomo.pl +lib/gc_sc/InBoxDra.pl +lib/gc_sc/InBraill.pl +lib/gc_sc/InBuhid.pl +lib/gc_sc/InByzant.pl +lib/gc_sc/InCherok.pl +lib/gc_sc/InCjkCo2.pl +lib/gc_sc/InCjkCo3.pl +lib/gc_sc/InCjkCo4.pl +lib/gc_sc/InCjkCom.pl +lib/gc_sc/InCjkRad.pl +lib/gc_sc/InCjkSym.pl +lib/gc_sc/InCjkUn2.pl +lib/gc_sc/InCjkUn3.pl +lib/gc_sc/InCjkUni.pl +lib/gc_sc/InCombi2.pl +lib/gc_sc/InCombi3.pl +lib/gc_sc/InCombin.pl +lib/gc_sc/InContro.pl +lib/gc_sc/InCurren.pl +lib/gc_sc/InCyprio.pl +lib/gc_sc/InCyril2.pl +lib/gc_sc/InCyrill.pl +lib/gc_sc/InDesere.pl +lib/gc_sc/InDevana.pl +lib/gc_sc/InDingba.pl +lib/gc_sc/InEnclo2.pl +lib/gc_sc/InEnclos.pl +lib/gc_sc/InEthiop.pl +lib/gc_sc/InGenera.pl +lib/gc_sc/InGeomet.pl +lib/gc_sc/InGeorgi.pl +lib/gc_sc/InGothic.pl +lib/gc_sc/InGreekA.pl +lib/gc_sc/InGreekE.pl +lib/gc_sc/InGujara.pl +lib/gc_sc/InGurmuk.pl +lib/gc_sc/InHalfwi.pl +lib/gc_sc/InHangu2.pl +lib/gc_sc/InHangu3.pl +lib/gc_sc/InHangul.pl +lib/gc_sc/InHanuno.pl +lib/gc_sc/InHebrew.pl +lib/gc_sc/InHighPr.pl +lib/gc_sc/InHighSu.pl +lib/gc_sc/InHiraga.pl +lib/gc_sc/InIdeogr.pl +lib/gc_sc/InIpaExt.pl +lib/gc_sc/InKanbun.pl +lib/gc_sc/InKangxi.pl +lib/gc_sc/InKannad.pl +lib/gc_sc/InKatak2.pl +lib/gc_sc/InKataka.pl +lib/gc_sc/InKhmer.pl +lib/gc_sc/InKhmerS.pl +lib/gc_sc/InLao.pl +lib/gc_sc/InLatin1.pl +lib/gc_sc/InLatin2.pl +lib/gc_sc/InLatin3.pl +lib/gc_sc/InLatinE.pl +lib/gc_sc/InLetter.pl +lib/gc_sc/InLimbu.pl +lib/gc_sc/InLinea2.pl +lib/gc_sc/InLinear.pl +lib/gc_sc/InLowSur.pl +lib/gc_sc/InMalaya.pl +lib/gc_sc/InMathe2.pl +lib/gc_sc/InMathem.pl +lib/gc_sc/InMisce2.pl +lib/gc_sc/InMisce3.pl +lib/gc_sc/InMisce4.pl +lib/gc_sc/InMisce5.pl +lib/gc_sc/InMiscel.pl +lib/gc_sc/InMongol.pl +lib/gc_sc/InMusica.pl +lib/gc_sc/InMyanma.pl +lib/gc_sc/InNumber.pl +lib/gc_sc/InOgham.pl +lib/gc_sc/InOldIta.pl +lib/gc_sc/InOptica.pl +lib/gc_sc/InOriya.pl +lib/gc_sc/InOsmany.pl +lib/gc_sc/InPhonet.pl +lib/gc_sc/InPrivat.pl +lib/gc_sc/InRunic.pl +lib/gc_sc/InShavia.pl +lib/gc_sc/InSinhal.pl +lib/gc_sc/InSmallF.pl +lib/gc_sc/InSpacin.pl +lib/gc_sc/InSpecia.pl +lib/gc_sc/InSupers.pl +lib/gc_sc/InSuppl2.pl +lib/gc_sc/InSuppl3.pl +lib/gc_sc/InSuppl4.pl +lib/gc_sc/InSuppl5.pl +lib/gc_sc/InSupple.pl +lib/gc_sc/InSyriac.pl +lib/gc_sc/InTagalo.pl +lib/gc_sc/InTagban.pl +lib/gc_sc/InTags.pl +lib/gc_sc/InTaiLe.pl +lib/gc_sc/InTaiXua.pl +lib/gc_sc/InTamil.pl +lib/gc_sc/InTelugu.pl +lib/gc_sc/InThaana.pl +lib/gc_sc/InThai.pl +lib/gc_sc/InTibeta.pl +lib/gc_sc/InUgarit.pl +lib/gc_sc/InUnifie.pl +lib/gc_sc/InVaria2.pl +lib/gc_sc/InVariat.pl +lib/gc_sc/InYiRadi.pl +lib/gc_sc/InYiSyll.pl +lib/gc_sc/InYijing.pl +lib/gc_sc/JoinC.pl +lib/gc_sc/JoinCont.pl +lib/gc_sc/Kana.pl +lib/gc_sc/Katakana.pl +lib/gc_sc/Khmr.pl +lib/gc_sc/Knda.pl +lib/gc_sc/L.pl +lib/gc_sc/LC.pl +lib/gc_sc/LOE.pl +lib/gc_sc/Laoo.pl +lib/gc_sc/Latn.pl +lib/gc_sc/Limb.pl +lib/gc_sc/LinearB.pl +lib/gc_sc/Ll.pl +lib/gc_sc/Lm.pl +lib/gc_sc/Lo.pl +lib/gc_sc/LogicalO.pl +lib/gc_sc/Lower.pl +lib/gc_sc/Lowercas.pl +lib/gc_sc/Lt.pl +lib/gc_sc/Lu.pl +lib/gc_sc/M.pl +lib/gc_sc/Math.pl +lib/gc_sc/Mc.pl +lib/gc_sc/Me.pl +lib/gc_sc/Mlym.pl +lib/gc_sc/Mn.pl +lib/gc_sc/Mong.pl +lib/gc_sc/Mymr.pl +lib/gc_sc/N.pl +lib/gc_sc/NChar.pl +lib/gc_sc/Nd.pl +lib/gc_sc/Nl.pl +lib/gc_sc/No.pl +lib/gc_sc/Nonchara.pl +lib/gc_sc/OAlpha.pl +lib/gc_sc/ODI.pl +lib/gc_sc/OGrExt.pl +lib/gc_sc/OIDS.pl +lib/gc_sc/OLower.pl +lib/gc_sc/OMath.pl +lib/gc_sc/OUpper.pl +lib/gc_sc/Ogam.pl +lib/gc_sc/OldItali.pl +lib/gc_sc/Orya.pl +lib/gc_sc/Osma.pl +lib/gc_sc/OtherAlp.pl +lib/gc_sc/OtherDef.pl +lib/gc_sc/OtherGra.pl +lib/gc_sc/OtherIdS.pl +lib/gc_sc/OtherLow.pl +lib/gc_sc/OtherMat.pl +lib/gc_sc/OtherUpp.pl +lib/gc_sc/P.pl +lib/gc_sc/Pc.pl +lib/gc_sc/Pd.pl +lib/gc_sc/Pe.pl +lib/gc_sc/Pf.pl +lib/gc_sc/Pi.pl +lib/gc_sc/Po.pl +lib/gc_sc/Print.pl +lib/gc_sc/Ps.pl +lib/gc_sc/Punct.pl +lib/gc_sc/QMark.pl +lib/gc_sc/Qaai.pl +lib/gc_sc/Quotatio.pl +lib/gc_sc/Radical.pl +lib/gc_sc/Radical2.pl +lib/gc_sc/Runr.pl +lib/gc_sc/S.pl +lib/gc_sc/SD.pl +lib/gc_sc/STerm.pl +lib/gc_sc/Sc.pl +lib/gc_sc/Shaw.pl +lib/gc_sc/Sinh.pl +lib/gc_sc/Sk.pl +lib/gc_sc/Sm.pl +lib/gc_sc/So.pl +lib/gc_sc/SoftDott.pl +lib/gc_sc/Space.pl +lib/gc_sc/SpacePer.pl +lib/gc_sc/Sterm2.pl +lib/gc_sc/Syrc.pl +lib/gc_sc/Tagb.pl +lib/gc_sc/TaiLe.pl +lib/gc_sc/Taml.pl +lib/gc_sc/Telu.pl +lib/gc_sc/Term.pl +lib/gc_sc/Terminal.pl +lib/gc_sc/Tglg.pl +lib/gc_sc/Thaa.pl +lib/gc_sc/Thai.pl +lib/gc_sc/Tibt.pl +lib/gc_sc/Title.pl +lib/gc_sc/UIdeo.pl +lib/gc_sc/Ugar.pl +lib/gc_sc/UnifiedI.pl +lib/gc_sc/Upper.pl +lib/gc_sc/Uppercas.pl +lib/gc_sc/VS.pl +lib/gc_sc/Variatio.pl +lib/gc_sc/WSpace.pl +lib/gc_sc/WhiteSpa.pl +lib/gc_sc/Word.pl +lib/gc_sc/XDigit.pl +lib/gc_sc/Yiii.pl +lib/gc_sc/Z.pl +lib/gc_sc/Zl.pl +lib/gc_sc/Zp.pl +lib/gc_sc/Zs.pl +lib/gc_sc/Zyyy.pl +lib/gc_sc/_CanonDC.pl +lib/gc_sc/_CaseIgn.pl +lib/gc_sc/_CombAbo.pl +lib/hst/L.pl +lib/hst/LV.pl +lib/hst/LVT.pl +lib/hst/T.pl +lib/hst/V.pl +lib/jt/C.pl +lib/jt/D.pl +lib/jt/R.pl +lib/jt/U.pl +lib/lb/AI.pl +lib/lb/AL.pl +lib/lb/B2.pl +lib/lb/BA.pl +lib/lb/BB.pl +lib/lb/BK.pl +lib/lb/CB.pl +lib/lb/CL.pl +lib/lb/CM.pl +lib/lb/CR.pl +lib/lb/EX.pl +lib/lb/GL.pl +lib/lb/HY.pl +lib/lb/ID.pl +lib/lb/IN.pl +lib/lb/IS.pl +lib/lb/LF.pl +lib/lb/NL.pl +lib/lb/NS.pl +lib/lb/NU.pl +lib/lb/OP.pl +lib/lb/PO.pl +lib/lb/PR.pl +lib/lb/QU.pl +lib/lb/SA.pl +lib/lb/SG.pl +lib/lb/SP.pl +lib/lb/SY.pl +lib/lb/WJ.pl +lib/lb/XX.pl +lib/lb/ZW.pl +lib/nt/De.pl +lib/nt/Di.pl +lib/nt/Nu.pl +