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

[PATCH] configure: pre-create build directories for VPATH builds

From: Jonathan Nieder <jrnieder_at_gmail.com>
Date: Fri, 4 Nov 2011 17:41:06 -0500

With r1197804, I tried:

        svn export ~/src/subversion svn-test
        cd svn-test
        ./autogen.sh
        mkdir BUILD
        cd BUILD
        ../configure --prefix=$HOME/opt/subversion
        make extraclean-swig

The result:

        for d in /tmp/svn-test/BUILD/subversion/bindings/swig/python /tmp/svn-test/BUILD/subversion/bindings/swig/python/libsvn_swig_py; \
        do \
          cd $d && rm -rf *.lo *.la *.o *.pyc .libs; \
        done
        /bin/sh: 3: cd: can't cd to /tmp/svn-test/BUILD/subversion/bindings/swig/python
        /bin/sh: 3: cd: can't cd to /tmp/svn-test/BUILD/subversion/bindings/swig/python/libsvn_swig_py
        make: *** [clean-swig-py] Error 2

The following patch fixes it for me. What do you think?

[[[
* configure.ac: In VPATH builds, create directories imitating the source
    hierarchy under the build directory, so other parts of the build system
    (like "make extraclean-swig") don't have to worry about directories not
    existing.

Patch by: peters
(Tweaked by me to avoid creating unnecessary .svn directories when building
from an svn checkout.)
]]]

Index: configure.ac
===================================================================
--- configure.ac (revision 1197804)
+++ configure.ac (working copy)
@@ -1374,6 +1374,15 @@
 
 AC_OUTPUT
 
+if test "$abs_srcdir" != "$abs_builddir"
+then
+ AC_MSG_NOTICE([Creating build directories])
+ (
+ cd "$abs_srcdir"
+ find subversion tools contrib -name .svn -prune -o -type d -print
+ ) | xargs $MKDIR
+fi
+
 # ==== Print final messages to user ==========================================
 
 dnl Configure is long - users tend to miss warnings printed during it.
Received on 2011-11-04 23:41:53 CET

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.