Author: rafl
Date: Fri Nov  4 09:08:50 2005
New Revision: 9775

Modified:
   /   (props changed)
   trunk/config/gen/makefiles.pl
   trunk/config/gen/makefiles/docs.in
Log:
 [EMAIL PROTECTED]:  rafl | 2005-11-04 18:09:17 +0100
 * Simplified makefile generation for docs/ a bit.


Modified: trunk/config/gen/makefiles.pl
==============================================================================
--- trunk/config/gen/makefiles.pl       (original)
+++ trunk/config/gen/makefiles.pl       Fri Nov  4 09:08:50 2005
@@ -127,38 +127,11 @@ 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);
-  
-    open MAKEFILE, ">> docs/Makefile" or die "open >> docs/Makefile: $!";
-  
-    my $slash = Configure::Data->get('slash');
-    my $new_perldoc = Configure::Data->get('new_perldoc');
-
-    foreach my $ops (@ops) {
-        my $pod = $ops;
-        $pod =~ s/\.ops$/.pod/;
-       print MAKEFILE "ops$slash$pod: ..${slash}ops${slash}$ops\n";
-       if ($new_perldoc == 1) {
-           print MAKEFILE "\tperldoc -ud ops${slash}$pod 
..${slash}ops${slash}$ops\n\n";
-       } else {
-           print MAKEFILE "\tperldoc -u ..${slash}ops${slash}$ops > 
ops${slash}$pod\n\n";
-       }
-    }
-  
-    close MAKEFILE;
   } 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 09:08:50 2005
@@ -9,9 +9,10 @@ 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}
+POD = $(patsubst %.ops,ops/%.pod,$(wildcard ../ops/*.ops))
 
 #
 # Targets
@@ -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

Reply via email to