From: Nicholas Clark Date: Thu, 22 Jul 2004 18:50:31 +0000 (+0000) Subject: Build the perldelta copying command for the main Unix makefile with X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0dfdcd8a63a82bd61087d84a6f130e03a4b20ed9;p=p5sagit%2Fp5-mst-13.2.git Build the perldelta copying command for the main Unix makefile with buildtoc, so that it doesn't get forgotten on version increments. p4raw-id: //depot/perl@23155 --- diff --git a/Makefile.SH b/Makefile.SH index 2925409..e8fbf3e 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -772,8 +772,7 @@ extra.pods: miniperl$(EXE_EXT) -@rm -f pod/perlvms.pod -@test -f vms/perlvms.pod && cd pod && $(LNS) ../vms/perlvms.pod perlvms.pod && cd .. && echo "pod/perlvms.pod" >> extra.pods -@rm -f pod/perldelta.pod - -@test -f pod/perl592delta.pod && cd pod && $(LNS) perl592delta.pod perldelta.pod && cd .. && echo "pod/perldelta.pod" >> extra.pods - + -@test -f pod/perl592delta.pod && cd pod && $(LNS) perl592delta.pod perldelta.pod && cd .. && echo "pod/perldelta.pod" >> extra.pods # See buildtoc extras.make: perl$(EXE_EXT) -@test -s extras.lst && PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) ./perl -Ilib -MCPAN -e '@ARGV&&make(@ARGV)' `cat extras.lst` diff --git a/pod/buildtoc b/pod/buildtoc index 86d5ba7..e4dc82a 100644 --- a/pod/buildtoc +++ b/pod/buildtoc @@ -32,6 +32,7 @@ $masterpodfile = File::Spec->catdir($Up, "pod.lst"); dmake => File::Spec->catdir($Up, "win32", "makefile.mk"), podmak => File::Spec->catdir($Up, "win32", "pod.mak"), # plan9 => File::Spec->catdir($Up, "plan9", "mkfile"), + unix => File::Spec->catdir($Up, "Makefile.SH"), ); { @@ -673,6 +674,27 @@ sub do_vms { $makefile; } +sub do_unix { + my $name = shift; + my $makefile_SH = join '', @_; + die "$0: $name contains NUL bytes" if $makefile_SH =~ /\0/; + + $makefile_SH =~ s/\n\s+-\@test -f \S+ && cd pod && \$\(LNS\) \S+ \S+ && cd \.\. && echo "\S+" >> extra.pods \# See buildtoc\n/\0/gm; + + my $sections = () = $makefile_SH =~ m/\0+/g; + + die "$0: $name contains no copy rules" if $sections < 1; + die "$0: $name contains $sections discontigous copy rules" + if $sections > 1; + + my @copy_rules = map "\t-\@test -f pod/$Copies{$_} && cd pod && \$(LNS) $Copies{$_} $_ && cd .. && echo \"pod/$_\" >> extra.pods # See buildtoc", + keys %Copies; + + $makefile_SH =~ s/\0+/join "\n", '', @copy_rules, ''/se; + $makefile_SH; + +} + # Do stuff my $built;