apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: apr/build get-version.sh
Date Tue, 10 Sep 2002 09:11:20 GMT
jerenkrantz    2002/09/10 02:11:20

  Modified:    .        configure.in
               build    get-version.sh
  Log:
  Make it a little easier to drop get-version.sh into apr-util by removing
  the hardcoded APR prefix to the version defines and taking that as a
  parameter.
  
  Revision  Changes    Path
  1.481     +3 -3      apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr/configure.in,v
  retrieving revision 1.480
  retrieving revision 1.481
  diff -u -u -r1.480 -r1.481
  --- configure.in	29 Aug 2002 17:56:52 -0000	1.480
  +++ configure.in	10 Sep 2002 09:11:20 -0000	1.481
  @@ -69,8 +69,8 @@
   dnl get our version information
   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`"
  +APR_MAJOR_VERSION="`$get_version major $version_hdr APR`"
  +APR_DOTTED_VERSION="`$get_version all $version_hdr APR`"
   
   AC_SUBST(APR_DOTTED_VERSION)
   AC_SUBST(APR_MAJOR_VERSION)
  @@ -158,7 +158,7 @@
   
   if test "x$use_libtool" = "xyes"; then
         lt_compile='$(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) -c $< && touch
$@'
  -      LT_VERSION="-version-info `$get_version libtool $version_hdr`"
  +      LT_VERSION="-version-info `$get_version libtool $version_hdr APR`"
         link="\$(LIBTOOL) \$(LTFLAGS) --mode=link \$(LT_LDFLAGS) \$(COMPILE) ${LT_VERSION}
\$(ALL_LDFLAGS) -o \$@"
         so_ext='lo'
         lib_target='-rpath $(libdir) $$objects'
  
  
  
  1.3       +12 -7     apr/build/get-version.sh
  
  Index: get-version.sh
  ===================================================================
  RCS file: /home/cvs/apr/build/get-version.sh,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- get-version.sh	15 Aug 2002 05:34:30 -0000	1.2
  +++ get-version.sh	10 Sep 2002 09:11:20 -0000	1.3
  @@ -2,31 +2,36 @@
   #
   # extract version numbers from a header file
   #
  -# USAGE: get-version.sh CMD VERSION_HEADER
  +# USAGE: get-version.sh CMD VERSION_HEADER PREFIX
   #   where CMD is one of: all, major, libtool
  +#   where PREFIX is the prefix to {MAJOR|MINOR|PATCH}_VERSION defines
   #
   #   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
  -  echo "USAGE: $0 CMD INCLUDEDIR"
  +if test $# != 3; then
  +  echo "USAGE: $0 CMD INCLUDEDIR PREFIX"
     echo "  where CMD is one of: all, major"
     exit 1
   fi
   
  -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`"
  +major_sed="/#define.*$3_MAJOR_VERSION/s/^.*\([0-9][0-9]*\).*$/\1/p"
  +minor_sed="/#define.*$3_MINOR_VERSION/s/^.*\([0-9][0-9]*\).*$/\1/p"
  +patch_sed="/#define.*$3_PATCH_VERSION/s/^.*\([0-9][0-9]*\).*$/\1/p"
  +major="`sed -n $major_sed $2`"
  +minor="`sed -n $minor_sed $2`"
  +patch="`sed -n $patch_sed $2`"
   
   if test "$1" = "all"; then
     echo ${major}.${minor}.${patch}
   elif test "$1" = "major"; then
     echo ${major}
   elif test "$1" = "libtool"; then
  +  # Yes, ${minor}:${patch}:${minor} is correct due to libtool idiocy.
     echo ${minor}:${patch}:${minor}
   else
  -  echo "ERROR: unknown version CMD"
  +  echo "ERROR: unknown version CMD ($1)"
     exit 1
   fi
  
  
  

Mime
View raw message