Index: config/gen/makefiles.pl =================================================================== RCS file: /cvs/public/parrot/config/gen/makefiles.pl,v retrieving revision 1.16 diff -u -a -r1.16 makefiles.pl --- config/gen/makefiles.pl 21 Jul 2003 20:16:12 -0000 1.16 +++ config/gen/makefiles.pl 23 Jul 2003 11:00:38 -0000 @@ -13,8 +13,6 @@ commentType => '#'); genfile('config/gen/makefiles/classes.in', 'classes/Makefile', commentType => '#'); - genfile('config/gen/makefiles/docs.in', 'docs/Makefile', - commentType => '#'); genfile('config/gen/makefiles/languages.in', 'languages/Makefile', commentType => '#'); genfile('config/gen/makefiles/jako.in', 'languages/jako/Makefile', @@ -33,6 +31,34 @@ commentType => '#'); genfile('config/gen/makefiles/ook.in', 'languages/ook/Makefile', commentType => '#'); + + # set up docs/Makefile, partly based on the .ops in the root dir + + opendir ROOT, "." or die "opendir .: $!"; + my @ops = sort grep { -f $_ and /\.ops$/ } readdir ROOT; + closedir ROOT; + + 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 + perldoc -u ../$ops > ops/$pod +EOM + } + + close MAKEFILE } 1; Index: config/gen/makefiles/docs.in =================================================================== RCS file: /cvs/public/parrot/config/gen/makefiles/docs.in,v retrieving revision 1.5 diff -u -a -r1.5 docs.in --- config/gen/makefiles/docs.in 22 Jul 2003 21:04:14 -0000 1.5 +++ config/gen/makefiles/docs.in 23 Jul 2003 11:00:38 -0000 @@ -1,11 +1,9 @@ PERL = ${perl} RM_F = ${rm_f} -OPS = bit.pod cmp.pod core.pod debug.pod dotgnu.pod io.pod math.pod \ - object.pod obscure.pod pmc.pod rx.pod set.pod stack.pod string.pod \ - sys.pod var.pod +POD = ${pod} -all: packfile-c.pod packfile-perl.pod +all: packfile-c.pod packfile-perl.pod $(POD) packfile-c.pod: ../packfile.c perldoc -u ../packfile.c > packfile-c.pod @@ -14,5 +12,5 @@ perldoc -u ../lib/Parrot/PackFile.pm > packfile-perl.pod clean: - $(RM_F) packfile-c.pod packfile-perl.pod + $(RM_F) packfile-c.pod packfile-perl.pod $(POD)
Simon Glover <[EMAIL PROTECTED]> writes: > OK, I've just created a new ops subdirectory in the docs directory, and > changed the docs makefile so that each *.ops file creates a corresponding > *.pod file in there. Everything works OK for me, but I'd appreciate it > if people using non-Unix systems (or non-GNU make) could check that it > works for them. It's really hard to do portable makefile stuff that does name-mangling as well as work across directories. Your patch didn't work with BSD make nor nmake on win32, so Dan rolled the pod generation back yesterday. I've attached a patch to get the configure system to generate a VERY basic makefile for the pod generation phase that works with both BSD and GNU make, and I assume nmake. Cheers, -- Lars Balker Rasmussen Consult::Perl