[system] / trunk / xmlrpc / RPC / RPC-XML-0.25 / Makefile.PL Repository:
ViewVC logotype

View of /trunk/xmlrpc/RPC/RPC-XML-0.25/Makefile.PL

Parent Directory Parent Directory | Revision Log Revision Log


Revision 279 - (download) (as text) (annotate)
Fri May 17 21:44:04 2002 UTC (17 years ago) by gage
File size: 2155 byte(s)
Experimental xmlrpc WeBWorK webservices

    1 ###############################################################################
    2 #
    3 # $Id: Makefile.PL,v 1.1.1.1 2002-05-17 21:44:02 gage Exp $
    4 #
    5 # This is the MakeMaker skeleton for the RPC-XML extension. Besides the usual
    6 # tricks, this has to add rules to make the *.xpl files from *.code in the
    7 # methods/ subdir, as well as get them into a place where they get installed
    8 # correctly.
    9 #
   10 ###############################################################################
   11 use ExtUtils::MakeMaker;
   12 use File::Spec;
   13 use File::Find;
   14 
   15 $CLEAN = 'pod2html-* *.html ';
   16 
   17 @scripts = (File::Spec->catfile(qw(etc make_method)));
   18 $CLEAN  .= File::Spec->catfile(qw(methods *.xpl));
   19 
   20 @PM_FILES = ();
   21 
   22 find(sub { push(@PM_FILES, $File::Find::name) if (-f $_ and /\.pm$/) }, 'lib');
   23 
   24 %PM_FILES = map { ($temp = $_) =~ s|^lib|\$\(INST_LIB\)|; $_ => $temp }
   25     @PM_FILES;
   26 # Handle the method code in "methods" specially:
   27 find(sub {
   28          if (-f $_ and /\.base$/)
   29          {
   30              s/\.base$//;
   31              $PM_FILES{File::Spec->catfile('methods', "$_.xpl")} =
   32                  File::Spec->catfile('$(INST_LIB)', 'RPC', 'XML', "$_.xpl");
   33          }
   34      }, 'methods');
   35 # Anything stuck under "lib" is more generic
   36 find(sub {
   37          if (-f $_ and /\.base$/)
   38          {
   39              $File::Find::name =~ s/base$/xpl/;
   40              ($tmp = $File::Find::name) =~ s|^lib|\$(INST_LIB)|;
   41              $PM_FILES{$File::Find::name} = $tmp;
   42              $CLEAN .= " $File::Find::name";
   43          }
   44      }, 'lib');
   45 
   46 WriteMakefile(
   47               NAME      => 'RPC::XML',
   48               VERSION   => '0.25',
   49               EXE_FILES => \@scripts,
   50               PM        => \%PM_FILES,
   51               PREREQ_PM => { XML::Parser => 2.29,
   52                              LWP         => 0 },
   53               dist      => { COMPRESS => 'gzip -9f' },
   54               clean     => { FILES => $CLEAN },
   55              );
   56 
   57 sub MY::post_initialize
   58 {
   59     my $self = shift;
   60 
   61     my @text;
   62     my $makemeth = File::Spec->catfile(qw(etc make_method));
   63 
   64     push(@text,
   65          "%.xpl : %.code %.help %.base $makemeth",
   66          "\t\$(PERL) $makemeth --base=\$*",
   67          '');
   68     join("\n", @text);
   69 }
   70 

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9