Author: rafl
Date: Fri Nov 4 16:22:42 2005
New Revision: 9792
Modified:
/ (props changed)
trunk/config/gen/makefiles.pl
trunk/config/gen/makefiles/docs.in
Log:
[EMAIL PROTECTED]: rafl | 2005-11-05 01:22:59 +0100
* Fixed docs/ Makefile generation. I hope it's portable..
Modified: trunk/config/gen/makefiles.pl
==============================================================================
--- trunk/config/gen/makefiles.pl (original)
+++ trunk/config/gen/makefiles.pl Fri Nov 4 16:22:42 2005
@@ -126,11 +126,21 @@ sub makefiles {
if ( Configure::Data->get('has_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 => '#',
replace_slashes => 1,
conditioned_lines => 1);
+
+ Configure::Data->set(pod => undef);
} else {
print "\nNo Perldoc, not generating a docs makefile.\n";
Modified: trunk/config/gen/makefiles/docs.in
==============================================================================
--- trunk/config/gen/makefiles/docs.in (original)
+++ trunk/config/gen/makefiles/docs.in Fri Nov 4 16:22:42 2005
@@ -9,6 +9,7 @@ PERL = ${perl}
RM_F = ${rm_f}
# Make directory; do not die if dir exists.
MKDIR = $(PERL) -e ${PQ}-d or mkdir $$_,0777 or die foreach @ARGV${PQ}
+NEW_PERLDOC = ${new_perldoc}
# long list of .pod files
POD = ${pod}
@@ -48,3 +49,10 @@ html:
html-clean:
$(PERL) -I../lib -MParrot::Distribution -e
"Parrot::Distribution->new->delete_html_docs"
+
+ops${slash}%.pod: ..${slash}ops${slash}%.ops
+ifeq ($(NEW_PERLDOC), 1)
+ perldoc -ud $@ $<
+else
+ perldoc -u $< > $@
+endif