apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject cvs commit: apr/build get-version.sh
Date Thu, 15 Aug 2002 05:34:30 GMT
gstein      2002/08/14 22:34:30

  Modified:    .        configure.in
               build    get-version.sh
  Log:
  * build/get-version.sh: accept a specific header file rather than
      looking specifically for apr_version.h (some more work will enable
      other apps to reuse this script). add a 'libtool' command for
      generating a version number intended for libtool's -version-info
      switch.
  
  * configure.in: tweak the calling sequences for get-version.sh. add a
      call to get the libtool version information and plug that into the
      link command. we now generate .so files with .so.0.{MINOR}.{PATCH}
  
  Revision  Changes    Path
  1.476     +6 -3      apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr/configure.in,v
  retrieving revision 1.475
  retrieving revision 1.476
  diff -u -r1.475 -r1.476
  --- configure.in	14 Aug 2002 17:15:15 -0000	1.475
  +++ configure.in	15 Aug 2002 05:34:30 -0000	1.476
  @@ -104,8 +104,10 @@
   APR_EBCDIC
   
   dnl get our version information
  -APR_MAJOR_VERSION="`$apr_builders/get-version.sh major $apr_srcdir/include`"
  -APR_DOTTED_VERSION="`$apr_builders/get-version.sh all $apr_srcdir/include`"
  +get_version="$apr_builders/get-version.sh"
  +version_hdr="$apr_srcdir/include/apr_version.h"
  +APR_MAJOR_VERSION="`$get_version major $version_hdr`"
  +APR_DOTTED_VERSION="`$get_version all $version_hdr`"
   
   dnl this one will go into apr-config.in
   AC_SUBST(APR_DOTTED_VERSION)
  @@ -149,7 +151,8 @@
   
   if test "x$use_libtool" = "xyes"; then
         lt_compile='$(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) -c $< && touch
$@'
  -      link='$(LIBTOOL) $(LTFLAGS) --mode=link $(LT_LDFLAGS) $(COMPILE) $(ALL_LDFLAGS) -o
$@'
  +      LT_VERSION="-version-info `$get_version libtool $version_hdr`"
  +      link="\$(LIBTOOL) \$(LTFLAGS) --mode=link \$(LT_LDFLAGS) \$(COMPILE) ${LT_VERSION}
\$(ALL_LDFLAGS) -o \$@"
         so_ext='lo'
         lib_target='-rpath $(libdir) $$objects'
         export_lib_target='-rpath \$(libdir) \$\$objects'
  
  
  
  1.2       +9 -8      apr/build/get-version.sh
  
  Index: get-version.sh
  ===================================================================
  RCS file: /home/cvs/apr/build/get-version.sh,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- get-version.sh	14 Aug 2002 17:15:15 -0000	1.1
  +++ get-version.sh	15 Aug 2002 05:34:30 -0000	1.2
  @@ -1,12 +1,13 @@
   #!/bin/sh
   #
  -# extract version numbers from the apr_version.h header file
  +# extract version numbers from a header file
   #
  -# USAGE: get-version.sh CMD INCLUDEDIR
  -#   where CMD is one of: all, major
  +# USAGE: get-version.sh CMD VERSION_HEADER
  +#   where CMD is one of: all, major, libtool
   #
   #   get-version.sh all returns a dotted version number
   #   get-version.sh major returns just the major version number
  +#   get-version.sh libtool returns a version "libtool -version-info" format
   #
   
   if test $# != 2; then
  @@ -15,16 +16,16 @@
     exit 1
   fi
   
  -versfile=${2}/apr_version.h
  -
  -major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^.*\([0-9][0-9]*\).*$/\1/p' $versfile`"
  -minor="`sed -n '/#define.*APR_MINOR_VERSION/s/^.*\([0-9][0-9]*\).*$/\1/p' $versfile`"
  -patch="`sed -n '/#define.*APR_PATCH_VERSION/s/^.*\([0-9][0-9]*\).*$/\1/p' $versfile`"
  +major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^.*\([0-9][0-9]*\).*$/\1/p' $2`"
  +minor="`sed -n '/#define.*APR_MINOR_VERSION/s/^.*\([0-9][0-9]*\).*$/\1/p' $2`"
  +patch="`sed -n '/#define.*APR_PATCH_VERSION/s/^.*\([0-9][0-9]*\).*$/\1/p' $2`"
   
   if test "$1" = "all"; then
     echo ${major}.${minor}.${patch}
   elif test "$1" = "major"; then
     echo ${major}
  +elif test "$1" = "libtool"; then
  +  echo ${minor}:${patch}:${minor}
   else
     echo "ERROR: unknown version CMD"
     exit 1
  
  
  

Mime
View raw message