You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ja...@apache.org on 2001/05/06 01:37:46 UTC

cvs commit: xml-xerces/perl Makefile.PL

jasons      01/05/05 16:37:46

  Modified:    perl     Makefile.PL
  Log:
  	* Makefile.PL (Repository):
  	removed the dependancies on the old handler API, and added the new
  	   handler API
  	added OPTIMIZE -g (commented out) for debugging
  
  Revision  Changes    Path
  1.11      +19 -8     xml-xerces/perl/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/xml-xerces/perl/Makefile.PL,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Makefile.PL	2001/04/17 02:49:35	1.10
  +++ Makefile.PL	2001/05/05 23:37:45	1.11
  @@ -12,7 +12,7 @@
   } 
   
   my $LIBS = '';
  -$INCLUDES = '-I. -INew_classes_perl';
  +$INCLUDES = '-I. -IHandler';
   if (defined $XERCES_LIB) {
     print STDERR "Using XERCES_LIB = $XERCES_LIB";
     $LIBS = "-L$XERCES_LIB ";
  @@ -46,34 +46,44 @@
   }
   
   # replace this with an absolute path if needed
  +my @handler_files;
  +chomp(@handler_files = `find Handler -name "*.swig.hpp"`);
   sub MY::postamble {
     chomp(my @header_files = `find Xerces_headers -name "*.hpp"`);
  -  chomp(my @new_class_files = `find New_classes_perl -name "*.swig.hpp"`);
  -  push(@header_files,@new_class_files);
  +  push(@header_files,@handler_files);
     local $" = ' ';
   <<TERMINUS;
   Xerces.C Xerces.pm: Xerces.i @header_files postSource.pl postModule.pl
   	\$(SWIG) -I. -ILib -ILib/perl5 \$(INC) -D\$(SWIG_VERSION) -package XML::Xerces -perl5 -c++ -shadow -o Xerces.C Xerces.i
   	perl postSource.pl Xerces.C
   	perl postModule.pl Xerces.pm
  -
   TERMINUS
   }
  +
  +# set up the list of object files to include in Xerces.o
  +my $OBJS = "Xerces.o ";
  +$OBJS .= join(' ', map {s/\.swig\.hpp/\.o/;$_} @handler_files);
   
  -my $OBJS = "Xerces.o New_classes_perl/perlDocumentHandler.o  New_classes_perl/perlContentHandler.o  New_classes_perl/perlErrorHandler.o New_classes_perl/perlDefaultHandler.o";
  +# if we're to use SWIG, we need to know which version is available
   my $swig = $SWIG || 'swig';
   my ($sv_maj,$sv_min) = qx[$swig -version 2>&1] =~ /(\d+)\.(\d+)/;
  +
  +# We need to know which version of libxerces we are to use
   my $XERCES_MAJOR_VERSION = '1.4';
   # this substitution will yield '1_4' from '1.4' to be used by 'LIBS'
   my $XERCES_LIB_VERSION = $XERCES_MAJOR_VERSION;
   $XERCES_LIB_VERSION =~ s/\./_/;
   $LIBS .= " -lxerces-c$XERCES_LIB_VERSION -lpthread";
  +
  +# give some nice feedback for the user
   print STDERR "Using SWIG version: SWIG_$ {sv_maj}_$ {sv_min}\n";
   print STDERR "Using Xerces-C version: $XERCES_MAJOR_VERSION\n";
  +
  +# write the makefile
   WriteMakefile(
  -  'AUTHOR'      => 'Dr. Harmon S. Nine hnine@netarx.com',
  +  'AUTHOR'      => 'The Xerces-P developers',
     'ABSTRACT'    => 'Perl Interface for Xerces XML API',
  -  'CCFLAGS'     => '-g -D_REENTRANT -DDEBIAN -DHAS_BOOL -D$(SWIG_VERSION)',
  +  'CCFLAGS'     => '-D_REENTRANT -DDEBIAN -DHAS_BOOL -D$(SWIG_VERSION)',
     'PM'          => {
       'Xerces.pm' => '$(INST_LIB)/XML/Xerces.pm',
       'DOMParse/DOMParse.pm' => '$(INST_LIB)/XML/Xerces/DOMParse.pm',
  @@ -82,7 +92,8 @@
     'LIBS'        => $LIBS,
     'NAME'        => 'XML::Xerces',
     'OBJECT'      => $OBJS,
  -  'DIR'         => ['New_classes_perl', 'DOMParse'],
  +#  'OPTIMIZE'    => '-g',
  +  'DIR'         => ['DOMParse', 'Handler'],
     'VERSION'     => "$XERCES_MAJOR_VERSION.0",
     'macro'       => {
       'SWIG'         => "$swig",
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org