cvsuser 04/11/20 02:43:34
Modified: . MANIFEST
config/gen makefiles.pl
config/gen/makefiles root.in
lib/Parrot/Configure RunSteps.pm
Added: config/auto perldoc.pl
Log:
[perl #32280] [PATCH] Detects presence of perldoc at configuration time
- If Perldoc is detected, no warning messages will be printed and things
will work as before
- If Perldoc is not detected
- Configure.pl will print a message saying that the docs will not
be built
- docs/ will not be built
- When 'make docs' or 'make html' is run, a message will be echoed
to the screen explaining that perldoc is required.
Courtesy of James deBoer <[EMAIL PROTECTED]>
Revision Changes Path
1.776 +1 -0 parrot/MANIFEST
Index: MANIFEST
===================================================================
RCS file: /cvs/public/parrot/MANIFEST,v
retrieving revision 1.775
retrieving revision 1.776
diff -u -r1.775 -r1.776
--- MANIFEST 19 Nov 2004 23:15:45 -0000 1.775
+++ MANIFEST 20 Nov 2004 10:43:30 -0000 1.776
@@ -165,6 +165,7 @@
config/auto/memalign/test_c.in []
config/auto/memalign/test_c2.in []
config/auto/pack.pl []
+config/auto/perldoc.pl []
config/auto/signal.pl []
config/auto/signal/test_1.in []
config/auto/signal/test_2.in []
1.1 parrot/config/auto/perldoc.pl
Index: perldoc.pl
===================================================================
#! perl -w
# Copyright: 2001-2004 The Perl Foundation. All Rights Reserved.
=head1 NAME
config/auto/perldoc - Perldoc
=head1 DESCRIPTION
Determines if Perldoc exists on the system.
=cut
package Configure::Step;
use strict;
use vars qw($description @args);
use Parrot::Configure::Step ':auto';
$description="Determining if your system has perldoc installed...";
@args=qw(verbose);
sub runstep {
my $a = `perldoc perldoc`;
unless ($a =~ m/perldoc/) {
Configure::Data->set(perldoc => 0);
Configure::Data->set(notperldoc => 1);
} else {
Configure::Data->set(perldoc => 1);
Configure::Data->set(notperldoc => 0);
}
}
1;
1.38 +31 -26 parrot/config/gen/makefiles.pl
Index: makefiles.pl
===================================================================
RCS file: /cvs/public/parrot/config/gen/makefiles.pl,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- makefiles.pl 19 Nov 2004 23:14:48 -0000 1.37
+++ makefiles.pl 20 Nov 2004 10:43:32 -0000 1.38
@@ -1,6 +1,6 @@
#! perl -w
# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-# $Id: makefiles.pl,v 1.37 2004/11/19 23:14:48 pmichaud Exp $
+# $Id: makefiles.pl,v 1.38 2004/11/20 10:43:32 leo Exp $
=head1 NAME
@@ -90,34 +90,39 @@
genfile('config/gen/makefiles/parrot_compiler.in',
'languages/parrot_compiler/Makefile',
commentType => '#', replace_slashes => 1);
-
- # set up docs/Makefile, partly based on the .ops in the root dir
-
- opendir OPS, "ops" or die "opendir ops: $!";
- my @ops = sort grep { !/^\./ && /\.ops$/ } readdir OPS;
- closedir OPS;
-
- my $pod = join " ", map { my $t = $_; $t =~ s/\.ops$/.pod/; "ops/$t" }
@ops;
-
- Configure::Data->set(pod => $pod);
-
- genfile('config/gen/makefiles/docs.in', 'docs/Makefile',
- commentType => '#');
-
- Configure::Data->set(pod => undef);
-
- open MAKEFILE, ">> docs/Makefile" or die "open >> docs/Makefile: $!";
-
- foreach my $ops (@ops) {
- my $pod = $ops;
- $pod =~ s/\.ops$/.pod/;
- print MAKEFILE <<"EOM";
+ my $perldoc = Configure::Data->get('perldoc');
+ if ($perldoc) {
+ # set up docs/Makefile, partly based on the .ops in the root dir
+
+ opendir OPS, "ops" or die "opendir ops: $!";
+ my @ops = sort grep { !/^\./ && /\.ops$/ } readdir OPS;
+ closedir OPS;
+
+ my $pod = join " ", map { my $t = $_; $t =~ s/\.ops$/.pod/; "ops/$t" }
@ops;
+
+ Configure::Data->set(pod => $pod);
+
+ genfile('config/gen/makefiles/docs.in', 'docs/Makefile',
+ commentType => '#');
+
+ Configure::Data->set(pod => undef);
+
+ open MAKEFILE, ">> docs/Makefile" or die "open >> docs/Makefile: $!";
+
+ foreach my $ops (@ops) {
+ my $pod = $ops;
+ $pod =~ s/\.ops$/.pod/;
+ print MAKEFILE <<"EOM";
ops/$pod: ../ops/$ops
perldoc -u ../ops/$ops > ops/$pod
-EOM
- }
- close MAKEFILE
+EOM
+ }
+
+ close MAKEFILE
+ } else {
+ print "\nNo Perldoc, not generating a docs makefile.\n";
+ }
}
1;
1.262 +14 -4 parrot/config/gen/makefiles/root.in
Index: root.in
===================================================================
RCS file: /cvs/public/parrot/config/gen/makefiles/root.in,v
retrieving revision 1.261
retrieving revision 1.262
diff -u -r1.261 -r1.262
--- root.in 15 Nov 2004 02:38:10 -0000 1.261
+++ root.in 20 Nov 2004 10:43:33 -0000 1.262
@@ -1,4 +1,4 @@
-# $Id: root.in,v 1.261 2004/11/15 02:38:10 rubys Exp $
+# $Id: root.in,v 1.262 2004/11/20 10:43:33 leo Exp $
###############################################################################
#
@@ -93,7 +93,7 @@
GEN_MAKEFILES = \
Makefile \
languages/Makefile \
- docs/Makefile \
+#CONDITIONED_LINE(perldoc): docs/Makefile \
dynclasses/Makefile \
dynoplibs/Makefile \
languages/cola/Makefile \
@@ -988,15 +988,25 @@
#
###############################################################################
-docs : docs.dummy
+#CONDITIONED_LINE(perldoc):docs : docs.dummy
+#CONDITIONED_LINE(notperldoc):docs : docs.stub
+#CONDITIONED_LINE(perldoc):html : html.dummy
+#CONDITIONED_LINE(notperldoc):html : html.stub
+
+html.stub:
+ echo "Perldoc is required, but not detected."
+
+docs.stub:
+ echo "Perldoc is required, but not detected."
+
docs.dummy :
$(MAKE_C) docs
docs-clean :
$(MAKE_C) docs clean
-html :
+html.dummy :
$(MAKE_C) docs html
html-clean :
1.47 +2 -1 parrot/lib/Parrot/Configure/RunSteps.pm
Index: RunSteps.pm
===================================================================
RCS file: /cvs/public/parrot/lib/Parrot/Configure/RunSteps.pm,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- RunSteps.pm 14 Nov 2004 21:14:33 -0000 1.46
+++ RunSteps.pm 20 Nov 2004 10:43:34 -0000 1.47
@@ -1,5 +1,5 @@
# Copyright: 2001-2004 The Perl Foundation. All Rights Reserved.
-# $Id: RunSteps.pm,v 1.46 2004/11/14 21:14:33 brentdax Exp $
+# $Id: RunSteps.pm,v 1.47 2004/11/20 10:43:34 leo Exp $
=head1 NAME
@@ -58,6 +58,7 @@
auto/aio.pl
auto/gmp.pl
auto/snprintf.pl
+ auto/perldoc.pl
gen/icu.pl
gen/config_h.pl
gen/core_pmcs.pl