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

Re: Patch to support building outside the srcdir.

From: Greg Stein <gstein_at_lyra.org>
Date: 2000-12-16 08:45:09 CET

On Fri, Dec 15, 2000 at 10:39:57PM -0800, Mo DeJong wrote:
> The attached patch allows one to build subversion
> outside of the srcdir. This is really handy since
> you can create builds for multiple CPU types or
> with different optimizations levels from the same
> source tree.

Good stuff.

>...
> --- configure.in 2000/11/26 15:20:15 1.44
> +++ configure.in 2000/12/16 06:28:38
> @@ -37,8 +37,14 @@
> enable_subdir_config=yes)
>
> if test "$enable_subdir_config" = "yes"; then
> + # FIXME: This mkdir is a hack to work around a problem
> + # with the RUN_SUBDIR_CONFIG_NOW macro. It expects the
> + # srcdir to be the top of the apr directory. It fails
> + # if the $1 argument is not a directory in the build dir.
> + test -d apr || mkdir apr
> RUN_SUBDIR_CONFIG_NOW(apr)
> expat_absdir=`cd $srcdir/expat-lite ; pwd`
> + test -d neon || mkdir neon
> RUN_SUBDIR_CONFIG_NOW(neon, --with-expat=$expat_absdir/libexpat.la)
> fi

How about if we fix RUN_SUBDIR_CONFIG_NOW() rather than these workarounds?
We certainly have access/capability to do that instead.

There is some logic in RUN_SUBDIR_CONFIG_NOW to create directories and other
crud. I'm not clear on what it is doing, but I suspect it is trying to deal
with the above problem.

In other words, can we simply fix the logic in RUN_SUBDIR_CONFIG_NOW and not
add the above stuff?

>...
> --- subversion/client/Makefile.am 2000/11/16 21:23:41 1.13
> +++ subversion/client/Makefile.am 2000/12/16 06:28:38
> @@ -7,7 +7,8 @@
> update-cmd.c propget-cmd.c propset-cmd.c
>
> ## Flags needed when compiling:
> -INCLUDES = -I. -I../include -I../../apr/include -I../../expat-lite
> +INCLUDES = -I$(top_srcdir)/apr/include -I$(top_builddir)/apr/include \
> +-I$(top_srcdir)/expat-lite -I$(srcdir)/../include -I$(srcdir)
>
> ## Libraries this binary depends upon:
> svn_LDADD = ../libsvn_client/libsvn_client.la \
>
>... etc ...

This looks good. I think we could probably clarify some of it, if we
introduce some config defines: APR_INCLUDES, NEON_INCLUDES, and
EXPAT_INCLUDES. Those three would be set properly, and the makefiles would
choose whatever they needed.

Hrm. It looks like you missed updating mod_dav_svn/Makefile.am.

I can do the config work for these extra *_INCLUDES macros, if the approach
sounds right to you.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:17 2006

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.