httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject cvs commit: apache-1.3/src/support apxs.pl
Date Mon, 06 May 2002 08:34:14 GMT
martin      02/05/06 01:34:14

  Modified:    src      CHANGES
               src/support apxs.pl
  Log:
  src/support/apxs.pl: re-arranged things to handle DSO extensions
  in a less hardcoded way. (.so) because the shared building chain would
  fail for Cygwin which uses native Win32 extensions (.dll).
  
  Submitted by:	Stipe Tolj <tolj@wapme-systems.de>
  
  Revision  Changes    Path
  1.1817    +3 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1816
  retrieving revision 1.1817
  diff -u -r1.1816 -r1.1817
  --- CHANGES	3 May 2002 10:50:37 -0000	1.1816
  +++ CHANGES	6 May 2002 08:34:13 -0000	1.1817
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.25
   
  +  *) Make apxs.pl more flexible (file extensions like .so or .dll are
  +     no longer hardcoded). [Stipe Tolj <tolj@wapme-systems.de>]
  +
     *) Add an intelligent error message should no proxy submodules be
        valid to handle a request. PR 8407 [Graham Leggett]
   
  
  
  
  1.40      +16 -9     apache-1.3/src/support/apxs.pl
  
  Index: apxs.pl
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/support/apxs.pl,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- apxs.pl	13 Mar 2002 21:05:37 -0000	1.39
  +++ apxs.pl	6 May 2002 08:34:13 -0000	1.40
  @@ -112,6 +112,12 @@
   my $opt_A = 0;
   my $opt_q = 0;
   
  +#   default for DSO file extension 
  +my $dso_ext = "so";
  +if ($^O eq "cygwin") {
  +    $dso_ext = "dll";
  +}
  +
   #   this subroutine is derived from Perl's getopts.pl with the enhancement of
   #   the "+" metacharater at the format string to allow a list to be build by
   #   subsequent occurance of the same option.
  @@ -270,6 +276,7 @@
       my $data = join('', <DATA>);
       $data =~ s|%NAME%|$name|sg;
       $data =~ s|%TARGET%|$CFG_TARGET|sg;
  +    $data =~ s|%DSO_EXT%|$dso_ext|sg;
   
       my ($mkf, $src) = ($data =~ m|^(.+)-=#=-\n(.+)|s);
   
  @@ -340,14 +347,14 @@
       if ($opt_o eq '') {
           if ($#srcs > -1) {
               $dso_file = $srcs[0];
  -            $dso_file =~ s|\.[^.]+$|.so|;
  +            $dso_file =~ s|\.[^.]+$|.$dso_ext|;
           }
           elsif ($#objs > -1) {
               $dso_file = $objs[0];
  -            $dso_file =~ s|\.[^.]+$|.so|;
  +            $dso_file =~ s|\.[^.]+$|.$dso_ext|;
           }
           else {
  -            $dso_file = "mod_unknown.so";
  +            $dso_file = "mod_unknown.$dso_ext";
           }
       }
       else {
  @@ -452,7 +459,7 @@
       my @cmds = ();
       my $f;
       foreach $f (@args) {
  -        if ($f !~ m|\.so$|) {
  +        if ($f !~ m|\.$dso_ext$|) {
               print STDERR "apxs:Error: file $f is not a DSO\n";
               exit(1);
           }
  @@ -592,20 +599,20 @@
   #LIB=-Lmy/lib/dir -lmylib
   
   #   the default target
  -all: mod_%NAME%.so
  +all: mod_%NAME%.%DSO_EXT%
   
   #   compile the DSO file
  -mod_%NAME%.so: mod_%NAME%.c
  +mod_%NAME%.%DSO_EXT%: mod_%NAME%.c
   	$(APXS) -c $(DEF) $(INC) $(LIB) mod_%NAME%.c
   
   #   install the DSO file into the Apache installation
   #   and activate it in the Apache configuration
   install: all
  -	$(APXS) -i -a -n '%NAME%' mod_%NAME%.so
  +	$(APXS) -i -a -n '%NAME%' mod_%NAME%.%DSO_EXT%
   
   #   cleanup
   clean:
  -	-rm -f mod_%NAME%.o mod_%NAME%.so
  +	-rm -f mod_%NAME%.o mod_%NAME%.%DSO_EXT%
   
   #   simple test
   test: reload
  @@ -637,7 +644,7 @@
   **  for the URL /%NAME%, as follows:
   **
   **    #   %TARGET%.conf
  -**    LoadModule %NAME%_module libexec/mod_%NAME%.so
  +**    LoadModule %NAME%_module libexec/mod_%NAME%.%DSO_EXT%
   **    <Location /%NAME%>
   **    SetHandler %NAME%
   **    </Location>
  
  
  

Mime
View raw message