[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] svn-config installedness test fails when symlinked

From: Marcus Comstedt <marcus_at_mc.pp.se>
Date: 2002-09-12 18:04:06 CEST

=?UTF-8?B?QnJhbmtvIMSMaWJlag==?= <brane@xbc.nu> writes:

> No changes are necessary in gen[-_]make.py. Try this patch, and don't
> forget to fill in the necessary magic in INSTALL_SVN_CONFIG:

Thanks Brane. Here's a new, better patch. It also fixes another bug,
which is that the subversion-1 directory wasn't added to the -I list
produced by --includes.

There is still a rather big misfeature in that if you build apr, neon,
and bdb inside the subversion tree, you get references to the builddir
even after subversion is installed. (That's not my fault, it was like
that before.)

  // Marcus

* svn-config.in:
  Use a flag to select installed mode rather than trying to auto-detect.
  (--includes): Added $includedir/subversion-1 to list of includes.

* Makefile.in, build.conf, configure.in:
  Added special installation procedure for svn-config, which sets the
  "installed" flag.

Index: Makefile.in
===================================================================
--- Makefile.in
+++ Makefile.in Thu Sep 12 16:05:19 2002
@@ -25,6 +25,7 @@
 fs_libdir= @libdir@
 bindir = @bindir@
 fs_bindir=@bindir@
+svn_configdir=@bindir@
 includedir = @includedir@
 mandir = @mandir@
 srcdir = @srcdir@
@@ -79,6 +80,7 @@
 INSTALL_FS_LIB = $(INSTALL_LIB)
 INSTALL_BIN = $(LIBTOOL) --mode=install $(INSTALL)
 INSTALL_FS_BIN = $(INSTALL_BIN)
+INSTALL_SVN_CONFIG = sh -c 'sed -e "/^installed_flag=/s/=n/=y/" < "$$0" > "$$0".tmp && $(INSTALL_BIN) "$$0".tmp "$$1" && rm "$$0".tmp'
 INSTALL_INCLUDE = $(INSTALL) -m 644
 INSTALL_MOD_SHARED = @APXS@ -i @MOD_ACTIVATION@
 INSTALL_MOD_STATIC = $(INSTALL) -m 644
Index: build.conf
===================================================================
--- build.conf
+++ build.conf Thu Sep 12 14:51:27 2002
@@ -442,6 +442,7 @@
 [svn-config]
 type = script
 path = .
+install = svn-config
 sources = svn-config
 
 
Index: configure.in
===================================================================
--- configure.in
+++ configure.in Thu Sep 12 14:52:04 2002
@@ -139,7 +139,7 @@
                     $SVN_FS_WANT_DB_PATCH)
 
 # Only add *_APACHE_RULE if we also have db, since mod_dav_svn depends on it.
-INSTALL_STATIC_RULES="install-bin install-docs"
+INSTALL_STATIC_RULES="install-bin install-svn-config install-docs"
 INSTALL_RULES="install-base-lib install-lib install-include install-static"
 BUILD_RULES="base-lib lib bin test"
 if test "$svn_lib_berkeley_db" = "yes"; then
Index: svn-config.in
===================================================================
--- svn-config.in
+++ svn-config.in Thu Sep 12 16:21:35 2002
@@ -63,19 +63,24 @@
     exit 1
 fi
 
-thisdir="`dirname $0`"
-thisdir="`cd $thisdir && pwd`"
-if test -d $bindir; then
- tmpbindir="`cd $bindir && pwd`"
-else
- tmpbindir=""
-fi
-if test "$tmpbindir" = "$thisdir"; then
+# This flag is set to "y" by `make install'.
+installed_flag=n
+
+if test "y" = "$installed_flag"; then
   location=installed
-elif test "$SVN_SOURCE_DIR" = "$thisdir"; then
- location=source
 else
- location=build
+ thisdir="`dirname $0`"
+ thisdir="`cd $thisdir && pwd`"
+ if test -d $bindir; then
+ tmpbindir="`cd $bindir && pwd`"
+ else
+ tmpbindir=""
+ fi
+ if test "$SVN_SOURCE_DIR" = "$thisdir"; then
+ location=source
+ else
+ location=build
+ fi
 fi
 
 flags=""
@@ -107,7 +112,7 @@
     ;;
     --includes)
     if test "$location" = "installed"; then
- flags="$flags -I$includedir $INCLUDES"
+ flags="$flags -I$includedir -I$includedir/subversion-1 $INCLUDES"
     elif test "$location" = "source"; then
         flags="$flags -I$SVN_SOURCE_DIR/include $INCLUDES"
     else

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 12 18:05:43 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.