apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr .cvsignore Makefile.in apr-config.in configure.in
Date Sun, 01 Feb 2004 16:42:44 GMT
jorton      2004/02/01 08:42:44

  Modified:    .        .cvsignore Makefile.in apr-config.in configure.in
  Log:
  Remove "location detection" from apr-config:
  
  * configure.in: Substitute APR_CONFIG_LOCATION as "build" or "source"
  appropriately.
  
  * apr-config.in: Set location to @APR_CONFIG_LOCATION@ rather than
  fragile pwd/realpath guesswork; pick up and use APR_BUILD_DIR instead
  of $thisdir.
  
  * Makefile.in (apr-config.out): New target.
  (install): Install apr-config.out instead of apr-config.
  
  PR: 8867
  
  Revision  Changes    Path
  1.17      +1 -0      apr/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/apr/.cvsignore,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -b -d -u -r1.16 -r1.17
  --- .cvsignore	8 Dec 2002 17:16:25 -0000	1.16
  +++ .cvsignore	1 Feb 2004 16:42:44 -0000	1.17
  @@ -6,6 +6,7 @@
   configure
   libtool
   apr-config
  +apr-config.out
   LibD
   LibR
   Debug
  
  
  
  1.90      +7 -3      apr/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/apr/Makefile.in,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -b -d -u -r1.89 -r1.90
  --- Makefile.in	3 Nov 2003 13:25:00 -0000	1.89
  +++ Makefile.in	1 Feb 2004 16:42:44 -0000	1.90
  @@ -31,7 +31,7 @@
   # bring in rules.mk for standard functionality
   @INCLUDE_RULES@
   
  -CLEAN_TARGETS = 
  +CLEAN_TARGETS = apr-config.out
   DISTCLEAN_TARGETS = config.cache config.log config.status \
   	include/apr.h include/arch/unix/apr_private.h \
   	libtool apr.exp apr-config exports.c export_vars.h
  @@ -60,7 +60,11 @@
   	    fi \
   	fi
   
  -install: $(TARGET_LIB)
  +# Create apr-config script suitable for the install tree
  +apr-config.out: apr-config
  +	sed 's,^\(location=\).*$$,\1installed,' < apr-config > $@
  +
  +install: $(TARGET_LIB) apr-config.out
   	if [ ! -d $(DESTDIR)$(includedir) ]; then \
   	    $(top_srcdir)/build/mkdir.sh $(DESTDIR)$(includedir); \
   	fi;
  @@ -90,7 +94,7 @@
   	if [ ! -d $(DESTDIR)$(bindir) ]; then \
   	    $(top_srcdir)/build/mkdir.sh $(DESTDIR)$(bindir); \
   	fi;
  -	$(LIBTOOL) --mode=install cp apr-config $(DESTDIR)$(bindir)
  +	$(LIBTOOL) --mode=install cp apr-config.out $(DESTDIR)$(bindir)/apr-config
   	chmod 755 $(DESTDIR)$(bindir)/apr-config
   	@if [ $(INSTALL_SUBDIRS) != "none" ]; then \
               for i in $(INSTALL_SUBDIRS); do \
  
  
  
  1.37      +12 -33    apr/apr-config.in
  
  Index: apr-config.in
  ===================================================================
  RCS file: /home/cvs/apr/apr-config.in,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -b -d -u -r1.36 -r1.37
  --- apr-config.in	24 Aug 2003 23:10:25 -0000	1.36
  +++ apr-config.in	1 Feb 2004 16:42:44 -0000	1.37
  @@ -2,7 +2,7 @@
   # ====================================================================
   # The Apache Software License, Version 1.1
   #
  -# Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
  +# Copyright (c) 2001-2004 The Apache Software Foundation.  All rights
   # reserved.
   #
   # Redistribution and use in source and binary forms, with or without
  @@ -76,10 +76,14 @@
   EXTRA_INCLUDES="@EXTRA_INCLUDES@"
   SHLIBPATH_VAR="@shlibpath_var@"
   APR_SOURCE_DIR="@apr_srcdir@"
  +APR_BUILD_DIR="@apr_builddir@"
   APR_SO_EXT="@so_ext@"
   APR_LIB_TARGET="@export_lib_target@"
   APR_LIBNAME="@APR_LIBNAME@"
   
  +# NOTE: the following line is modified during 'make install': alter with care!
  +location=@APR_CONFIG_LOCATION@
  +
   show_usage()
   {
       cat << EOF
  @@ -123,36 +127,10 @@
       exit 1
   fi
   
  -thisdir="`dirname $0`"
  -thisdir="`cd $thisdir && pwd`"
  -if test -d $bindir; then
  -  tmpbindir="`cd $bindir && pwd`"
  -else
  -  tmpbindir=""
  -fi
  -# If we have the realpath program, use it to resolve symlinks
  -# Otherwise, being in a symlinked dir may result in incorrect output.
  -if test -x "`which realpath 2>/dev/null`"; then
  -  thisdir="`realpath $thisdir`"
  -  if test -d "$APR_SOURCE_DIR"; then
  -    APR_SOURCE_DIR="`realpath $APR_SOURCE_DIR`"
  -  fi
  -  if test -n "$tmpbindir"; then
  -    tmpbindir="`realpath $tmpbindir`"
  -  fi
  -fi
  -if test "$tmpbindir" = "$thisdir"; then
  -  location=installed
  -elif test "$APR_SOURCE_DIR" = "$thisdir"; then
  -  location=source
  -else
  -  location=build
  -fi
  -
   if test "$location" = "installed"; then
       LA_FILE="$libdir/lib${APR_LIBNAME}.la"
   else
  -    LA_FILE="$thisdir/lib${APR_LIBNAME}.la"
  +    LA_FILE="$APR_BUILD_DIR/lib${APR_LIBNAME}.la"
   fi
   
   flags=""
  @@ -184,7 +162,7 @@
           flags="$APR_SOURCE_DIR/include"
       else
           # this is for VPATH builds
  -        flags="$thisdir/include $APR_SOURCE_DIR/include"
  +        flags="$APR_BUILD_DIR/include $APR_SOURCE_DIR/include"
       fi
       echo $flags
       exit 0
  @@ -216,7 +194,7 @@
           flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
       else
           # this is for VPATH builds
  -        flags="$flags -I$thisdir/include -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
  +        flags="$flags -I$APR_BUILD_DIR/include -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
       fi
       ;;
       --srcdir)
  @@ -230,7 +208,7 @@
           echo "$APR_SOURCE_DIR/build"
       else
           # this is for VPATH builds
  -        echo "$thisdir/build"
  +        echo "$APR_BUILD_DIR/build"
       fi
       exit 0
       ;;
  @@ -243,7 +221,8 @@
           ### avoid using -L if libdir is a "standard" location like /usr/lib
           flags="$flags -L$libdir -l${APR_LIBNAME}"
       else
  -        flags="$flags -L$thisdir -l${APR_LIBNAME}"
  +        ### this surely can't work since the library is in .libs?
  +        flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}"
       fi
       ;;
       --link-libtool)
  @@ -281,7 +260,7 @@
       if test "$location" = "installed"; then
           echo "${installbuilddir}/libtool"
       else
  -        echo "$thisdir/libtool"
  +        echo "$APR_BUILD_DIR/libtool"
       fi
       exit 0
       ;;
  
  
  
  1.567     +5 -0      apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr/configure.in,v
  retrieving revision 1.566
  retrieving revision 1.567
  diff -b -d -u -r1.566 -r1.567
  --- configure.in	26 Jan 2004 15:44:28 -0000	1.566
  +++ configure.in	1 Feb 2004 16:42:44 -0000	1.567
  @@ -47,7 +47,12 @@
   
   if test "$apr_builddir" != "$apr_srcdir"; then
     USE_VPATH=1
  +  APR_CONFIG_LOCATION=build
  +else
  +  APR_CONFIG_LOCATION=source
   fi
  +
  +AC_SUBST(APR_CONFIG_LOCATION)
   
   # Libtool might need this symbol -- it must point to the location of
   # the generated libtool script (not necessarily the "top" build dir).
  
  
  

Mime
View raw message