Move pod2usage.PL, podchecker.PL, podselect.PL into cpan/Pod-Parser/scripts
authorNicholas Clark <nick@ccl4.org>
Tue, 5 Oct 2010 06:32:21 +0000 (07:32 +0100)
committerNicholas Clark <nick@ccl4.org>
Tue, 5 Oct 2010 12:48:40 +0000 (13:48 +0100)
Let ExtUtils::MakeMaker deal with running these extraction scripts, rather than
repeating the logic in (at least) 5 places.

14 files changed:
Cross/Makefile-cross-SH
MANIFEST
Makefile.SH
Porting/Maintainers.pl
cpan/Pod-Parser/scripts/pod2usage.PL [moved from pod/pod2usage.PL with 100% similarity]
cpan/Pod-Parser/scripts/podchecker.PL [moved from pod/podchecker.PL with 100% similarity]
cpan/Pod-Parser/scripts/podselect.PL [moved from pod/podselect.PL with 100% similarity]
pod/Makefile.SH
t/porting/dual-life.t
utils.lst
vms/descrip_mms.template
win32/Makefile
win32/makefile.mk
win32/pod.mak

index dfb2fd1..ae9cf1f 100644 (file)
@@ -332,12 +332,10 @@ shextract = Makefile cflags config.h makeaperl makedepend \
 # Files to be built with variable substitution after miniperl is
 # available.  Dependencies handled manually below (for now).
 
-pl = pod/pod2html.PL pod/pod2man.PL pod/pod2text.PL \
-       pod/pod2usage.PL pod/podchecker.PL pod/podselect.PL
+pl = pod/pod2html.PL pod/pod2man.PL pod/pod2text.PL
 
 # lib/lib.pm is not listed here because it has a rule of its own.
-plextract = pod/pod2html pod/pod2man pod/pod2text \
-       pod/pod2usage pod/podchecker pod/podselect
+plextract = pod/pod2html pod/pod2man pod/pod2text
 
 addedbyconf = UU $(shextract) $(plextract) lib/lib.pm pstruct
 
index 7dde7c7..a984448 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -1678,6 +1678,9 @@ cpan/Pod-Parser/lib/Pod/ParseUtils.pm             Pod-Parser - pod utility functions
 cpan/Pod-Parser/lib/Pod/PlainText.pm           Convert POD data to formatted ASCII text
 cpan/Pod-Parser/lib/Pod/Select.pm              Pod-Parser - select portions of POD docs
 cpan/Pod-Parser/lib/Pod/Usage.pm               Pod-Parser - print usage messages
+cpan/Pod-Parser/scripts/pod2usage.PL   Pod-Parser - print usage messages from POD docs
+cpan/Pod-Parser/scripts/podchecker.PL  Pod-Parser - Pod::Checker::podchecker() CLI
+cpan/Pod-Parser/scripts/podselect.PL   Pod-Parser - Pod::Select::podselect() CLI
 cpan/Pod-Parser/t/pod/contains_bad_pod.xr      Pod-Parser test file
 cpan/Pod-Parser/t/pod/contains_pod.t           Pod-Parser test
 cpan/Pod-Parser/t/pod/contains_pod.xr          Pod-Parser test file
@@ -4142,9 +4145,6 @@ pod/perlxstut.pod         Perl XS tutorial
 pod/pod2html.PL                        Precursor for translator to turn pod into HTML
 pod/pod2man.PL                 Precursor for translator to turn pod into manpage
 pod/pod2text.PL                        Precursor for translator to turn pod into text
-pod/pod2usage.PL               Pod-Parser - print usage messages from POD docs
-pod/podchecker.PL              Pod-Parser - Pod::Checker::podchecker() CLI
-pod/podselect.PL               Pod-Parser - Pod::Select::podselect() CLI
 pod/roffitall                  troff the whole man page set
 pod/rofftoc                    Generate a table of contents in troff format
 pod/splitman                   Splits perlfunc into multiple man pages
index 7eb9008..4a828b0 100755 (executable)
@@ -443,11 +443,9 @@ shextract = Makefile cflags config.h makeaperl makedepend \
 # Files to be built with variable substitution after miniperl is
 # available.  Dependencies handled manually below (for now).
 
-pl = pod/pod2html.PL pod/pod2man.PL pod/pod2text.PL \
-       pod/pod2usage.PL pod/podchecker.PL pod/podselect.PL
+pl = pod/pod2html.PL pod/pod2man.PL pod/pod2text.PL
 
-plextract = pod/pod2html pod/pod2man pod/pod2text \
-       pod/pod2usage pod/podchecker pod/podselect
+plextract = pod/pod2html pod/pod2man pod/pod2text
 
 addedbyconf = UU $(shextract) $(plextract) pstruct
 
index da317ab..c7de5ee 100755 (executable)
@@ -1160,12 +1160,7 @@ use File::Glob qw(:case);
        # version 1.37!
 
        'DISTRIBUTION'  => 'MAREKR/Pod-Parser-1.38.tar.gz',
-       'FILES'         => q[cpan/Pod-Parser
-                            pod/pod{2usage,checker,select}.PL
-                           ],
-       'MAP'           => { '' => 'cpan/Pod-Parser/',
-                            'scripts/' => 'pod/',
-                          },
+       'FILES'         => q[cpan/Pod-Parser],
        'UPSTREAM'      => undef,
        },
 
index 17d8150..450b7ab 100644 (file)
@@ -54,8 +54,7 @@ LDLIBPTH = $ldlibpth
 ## In the following dollars and backticks do not need the extra backslash.
 $spitshell >>Makefile <<'!NO!SUBS!'
 
-CONVERTERS = pod2html pod2man pod2text \
-               pod2usage podchecker podselect
+CONVERTERS = pod2html pod2man pod2text
 
 HTMLROOT = /   # Change this to fix cross-references in HTML
 POD2HTML = pod2html \
@@ -63,6 +62,7 @@ POD2HTML = pod2html \
            --podroot=.. --podpath=pod:lib:ext:vms \
            --libpods=perlfunc:perlguts:perlvar:perlrun:perlop
 POD2LATEX = ../cpan/Pod-LaTeX/pod2latex
+PODCHECKER =  ../cpan/Pod-Parser/podchecker
 
 PERL = ../miniperl
 PERLILIB = $(PERL) -I../lib
@@ -122,9 +122,9 @@ distclean:  realclean
 veryclean:     distclean
        -rm -f *~ *.orig
 
-check: podchecker
+check: $(PODCHECKER)
        @echo "checking..."; \
-       $(PERL) -I../lib podchecker $(POD)
+       $(PERL) -I../lib $(PODCHECKER) $(POD)
 
 # Dependencies.
 pod2html:      pod2html.PL ../lib/Config.pm
@@ -136,13 +136,4 @@ pod2man:   pod2man.PL ../lib/Config.pm
 pod2text:      pod2text.PL ../lib/Config.pm
        $(LDLIBPTH) $(PERL) -I ../lib pod2text.PL
 
-pod2usage:     pod2usage.PL ../lib/Config.pm
-       $(PERL) -I ../lib pod2usage.PL
-
-podchecker:    podchecker.PL ../lib/Config.pm
-       $(PERL) -I ../lib podchecker.PL
-
-podselect:     podselect.PL ../lib/Config.pm
-       $(PERL) -I ../lib podselect.PL
-
 !NO!SUBS!
index 9fb7802..3ec88af 100644 (file)
@@ -16,13 +16,19 @@ use File::Spec::Functions;
 
 # Exceptions are found in dual-life bin dirs but aren't
 # installed by default
-my @exceptions = qw(
+my @not_installed = qw(
   ../cpan/Encode/bin/ucm2table
   ../cpan/Encode/bin/ucmlint
   ../cpan/Encode/bin/ucmsort
   ../cpan/Encode/bin/unidump
 );
 
+my %dist_dir_exe;
+
+foreach (qw (podchecker podselect pod2usage)) {
+    $dist_dir_exe{lc "$_.PL"} = "../cpan/Pod-Parser/$_";
+};
+
 my @programs;
 
 find(
@@ -36,11 +42,16 @@ find(
   qw( ../cpan ../dist ../ext ),
 );
 
+my $ext = $^O eq 'VMS' ? '.com' : '';
+
 for my $f ( @programs ) {
   $f =~ s/\.\z// if $^O eq 'VMS';
-  next if qr/(?i:$f)/ ~~ @exceptions;
+  next if qr/(?i:$f)/ ~~ @not_installed;
   $f = basename($f);
-  $f .= '.com' if $^O eq 'VMS';
-  ok( -f catfile('..', 'utils', $f), "$f" );
+  if(qr/\A(?i:$f)\z/ ~~ %dist_dir_exe) {
+    ok( -f "$dist_dir_exe{lc $f}$ext", "$f$ext");
+  } else {
+    ok( -f catfile('..', 'utils', "$f$ext"), "$f$ext" );
+  }
 }
 
index ec73a19..42e46ef 100644 (file)
--- a/utils.lst
+++ b/utils.lst
@@ -2,9 +2,9 @@ pod/pod2html
 cpan/Pod-LaTeX/blib/script/pod2latex
 pod/pod2man
 pod/pod2text
-pod/pod2usage
-pod/podchecker
-pod/podselect
+cpan/Pod-Parser/blib/script/pod2usage
+cpan/Pod-Parser/blib/script/podchecker
+cpan/Pod-Parser/blib/script/podselect
 utils/c2ph      # link = utils/pstruct
 utils/cpan
 utils/config_data
index 2510e73..b059e75 100644 (file)
@@ -394,7 +394,7 @@ libmods : $(LIBPREREQ)
        @ $(NOOP)
 utils : $(utils1) $(utils2) $(utils3) $(utils4) $(utils5)
        @ $(NOOP)
-podxform : [.lib.pods]pod2text.com [.lib.pods]pod2html.com [.lib.pods]pod2man.com [.lib.pods]podchecker.com [.lib.pods]pod2usage.com [.lib.pods]podselect.com
+podxform : [.lib.pods]pod2text.com [.lib.pods]pod2html.com [.lib.pods]pod2man.com
        @ $(NOOP)
 x2p : [.x2p]$(DBG)a2p$(E) [.x2p]s2p.com [.x2p]find2perl.com 
        @ $(NOOP)
@@ -709,21 +709,6 @@ nonxsext : $(LIBPREREQ) preplibrary $(MINIPERL_EXE)
        $(MINIPERL) -"I[-.lib]" $(MMS$SOURCE)
        Copy/NoConfirm/Log [.pod]pod2text.com [.lib.pods]
 
-[.lib.pods]podchecker.com : [.pod]podchecker.PL $(ARCHDIR)Config.pm
-       @ If F$Search("[.lib]pods.dir").eqs."" Then Create/Directory [.lib.pods]
-       $(MINIPERL) -"I[-.lib]" $(MMS$SOURCE)
-       Copy/NoConfirm/Log [.pod]podchecker.com [.lib.pods]
-
-[.lib.pods]pod2usage.com : [.pod]pod2usage.PL $(ARCHDIR)Config.pm
-       @ If F$Search("[.lib]pods.dir").eqs."" Then Create/Directory [.lib.pods]
-       $(MINIPERL) -"I[-.lib]" $(MMS$SOURCE)
-       Copy/NoConfirm/Log [.pod]pod2usage.com [.lib.pods]
-
-[.lib.pods]podselect.com : [.pod]podselect.PL $(ARCHDIR)Config.pm
-       @ If F$Search("[.lib]pods.dir").eqs."" Then Create/Directory [.lib.pods]
-       $(MINIPERL) -"I[-.lib]" $(MMS$SOURCE)
-       Copy/NoConfirm/Log [.pod]podselect.com [.lib.pods]
-
 preplibrary : $(MINIPERL_EXE) $(LIBPREREQ) 
 
 makeppport : $(MINIPERL_EXE) $(ARCHDIR)Config.pm nonxsext
index a4eae3c..c6222ec 100644 (file)
@@ -615,9 +615,6 @@ UTILS               =                       \
                ..\pod\pod2html         \
                ..\pod\pod2man          \
                ..\pod\pod2text         \
-               ..\pod\pod2usage        \
-               ..\pod\podchecker       \
-               ..\pod\podselect        \
                ..\x2p\find2perl        \
                ..\x2p\psed             \
                ..\x2p\s2p              \
@@ -1202,8 +1199,7 @@ distclean: realclean
            perlriscos.pod perlsolaris.pod perlsymbian.pod perltoc.pod \
            perltru64.pod perltw.pod perluniprops.pod perluts.pod \
            perlvmesa.pod perlvos.pod perlwin32.pod \
-           pod2html pod2man pod2text pod2usage \
-           podchecker podselect
+           pod2html pod2man pod2text
        -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
            perldoc perlivp dprofpp libnetcfg enc2xs piconv cpan *.bat \
            xsubpp instmodsh prove ptar ptardiff cpanp-run-perl cpanp cpan2dist shasum corelist config_data
index a48cade..e6973ec 100644 (file)
@@ -779,9 +779,6 @@ UTILS               =                       \
                ..\pod\pod2html         \
                ..\pod\pod2man          \
                ..\pod\pod2text         \
-               ..\pod\pod2usage        \
-               ..\pod\podchecker       \
-               ..\pod\podselect        \
                ..\x2p\find2perl        \
                ..\x2p\psed             \
                ..\x2p\s2p              \
@@ -1566,8 +1563,7 @@ distclean: realclean
            perlriscos.pod perlsolaris.pod perlsymbian.pod perltoc.pod \
            perltru64.pod perltw.pod perluniprops.pod perluts.pod \
            perlvmesa.pod perlvos.pod perlwin32.pod \
-           pod2html pod2man pod2text pod2usage \
-           podchecker podselect
+           pod2html pod2man pod2text
        -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
            perldoc perlivp dprofpp libnetcfg enc2xs piconv cpan *.bat \
            xsubpp instmodsh prove ptar ptardiff cpanp-run-perl cpanp cpan2dist shasum corelist config_data
index d781e22..d78a351 100644 (file)
@@ -1,5 +1,4 @@
-CONVERTERS = pod2html pod2man pod2text \
-               pod2usage podchecker podselect
+CONVERTERS = pod2html pod2man pod2text
 
 HTMLROOT = /   # Change this to fix cross-references in HTML
 POD2HTML = pod2html \
@@ -7,6 +6,7 @@ POD2HTML = pod2html \
            --podroot=.. --podpath=pod:lib:ext:vms \
            --libpods=perlfunc:perlguts:perlvar:perlrun:perlop
 POD2LATEX = ../cpan/Pod-LaTeX/pod2latex
+PODCHECKER = ../cpan/Pod-Parser/podchecker
 
 all: $(CONVERTERS) html
 
@@ -632,9 +632,9 @@ realclean:  clean
 
 distclean:     realclean
 
-check: podchecker
+check: $(PODCHECKER)
        @echo "checking..."; \
-       $(PERL) -I../lib podchecker $(POD)
+       $(PERL) -I../lib $(PODCHECKER) $(POD)
 
 # Dependencies.
 pod2html:      pod2html.PL ../lib/Config.pm
@@ -645,12 +645,3 @@ pod2man:   pod2man.PL ../lib/Config.pm
 
 pod2text:      pod2text.PL ../lib/Config.pm
        $(PERL) -I ../lib $(ICWD) pod2text.PL
-
-pod2usage:     pod2usage.PL ../lib/Config.pm
-       $(PERL) -I ../lib $(ICWD) pod2usage.PL
-
-podchecker:    podchecker.PL ../lib/Config.pm
-       $(PERL) -I ../lib $(ICWD) podchecker.PL
-
-podselect:     podselect.PL ../lib/Config.pm
-       $(PERL) -I ../lib $(ICWD) podselect.PL