Hopefully this is done right. As discussed in the parallel thread, I
want to take the pod files from docs/src/api/mod_perl-2.0 and install
them with the rest of .pm files. Once this is done we can truly split
the .pm and .pod.
Notice that this has nothing to do with the documentation build system,
which is unrelated to the mod_perl build process.
issues:
- most of mod_perl stuff goes into archlib, is that ok for .pod to go
there as well? I guess so, so the .pod file sits next to .pm.
- Apache-Test's API docs will reside in
modperl-2.0/docs/src/api/Apache-Test -- should I pull this dir from
modperl-2.0/Apache-Test/Makefile.PL or modperl-2.0/Makefile.PL? I guess
the former if we plan to possibly distribute Apache-Test as a standalone
project.
Index: Makefile.PL
===================================================================
RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
retrieving revision 1.39
diff -u -r1.39 Makefile.PL
--- Makefile.PL 2001/09/18 16:05:16 1.39
+++ Makefile.PL 2001/10/03 04:18:27
@@ -16,12 +16,25 @@
my $build = Apache::Build->new(init => 1);
my $code = ModPerl::Code->new;
+my @extra_makefile_dirs = qw(docs/src/api/mod_perl-2.0);
+
+use File::Spec::Functions;
+use DirHandle ();
+my @mf_dirs = ();
+for my $dir (@extra_makefile_dirs,
+ grep {-d} DirHandle->new('.')->read) {
+ next if curdir() eq $dir || updir() eq $dir;
+ next if -l $dir; # no symlinks per MakeMaker
+ push @mf_dirs, $dir if -f catfile($dir, "Makefile.PL");
+}
+
my @scripts = qw(t/TEST);
configure();
ModPerl::MM::WriteMakefile(
NAME => 'mod_perl',
VERSION => $VERSION,
+ DIR => \@mf_dirs,
macro => {
MODPERL_SRC => $code->path,
PERL => $build->perl_config('perlpath'),
--- /dev/null Thu Jan 1 07:30:00 1970
+++ docs/src/api/mod_perl-2.0/Makefile.PL Wed Oct 3 12:19:02 2001
@@ -0,0 +1,34 @@
+
+require 5.6.1;
+
+use File::Find;
+use File::Spec;
+
+use ExtUtils::MakeMaker;
+
+my $rel_path = File::Spec->catfile(('..') x 4);
+
+WriteMakefile(
+ NAME => 'API',
+ VERSION => '0.01',
+ PM => get_pods(),
+);
+
+sub get_pods{
+ my @pods = ();
+ finddepth(sub{ push @pods, "$File::Find::dir/$_" if /\.pod$/ }, '.');
+ return { map { s|^\./||; $_ => "\$(INST_LIB)/$_"} @pods };
+}
+
+package MY;
+
+# when called from top mod_perl dir, it gets ../blib for all pathes,
+# so we want to point it back to the top blib.
+sub MY::constants {
+ my $self = shift;
+ for (grep /^INST_/, keys %{ $self } ) {
+ exists $self->{$_} && $self->{$_} =~ s/^\.\./$rel_path/;
+ }
+ $self->MM::constants;
+}
+
--
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]