You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mo DeJong <md...@cygnus.com> on 2000/12/16 06:39:57 UTC
Patch to support building outside the srcdir.
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.
apr CVS has already been fixed to support this and
a patch to has been posted to the neon mailing list.
So while it does not work right now, it will work soon.
Mo DeJong
Red Hat Inc
Re: Building mod_dav_svn (was: Re: Patch to support building outside the srcdir.)
Posted by Greg Stein <gs...@lyra.org>.
On Sat, Dec 16, 2000 at 10:13:29PM +0100, Branko Cibej wrote:
> Greg Stein wrote:
>...
> >>> Hrm. It looks like you missed updating mod_dav_svn/Makefile.am.
> >>
> >> Does anybody but you ever look at that code? :-)
> >
> > Heh. Probably not, unfortunately.
>
> Well, apart from getting warnings about a missing Apache tree at
> configure time, I have no idea what it takes to build an test
> mod_dav_svn. I must have missed the post where you explained how it's done.
>
> Would you mind adding a short note to the HACKING file about that? That
> would get more people onto testing that code. I for one would run it
> through a configure/build/check cycle on four platforms once in a while,
> like I'm doing for the other parts of Subversion.
Good point. Will do.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
Re: Building mod_dav_svn (was: Re: Patch to support building outside the srcdir.)
Posted by Branko Čibej <br...@xbc.nu>.
Mo DeJong wrote:
> Is there some special configure flag one needs to set to
> build this subdir?
I think you need an Apache 2.0 tree. But GregS will write up the
instructions Real Sool Now. :-)
--
Brane �ibej
home: <br...@xbc.nu> http://www.xbc.nu/brane/
work: <br...@hermes.si> http://www.hermes-softlab.com/
ACM: <br...@acm.org> http://www.acm.org/
Re: Building mod_dav_svn (was: Re: Patch to support building outside the srcdir.)
Posted by Mo DeJong <md...@cygnus.com>.
On Sat, 16 Dec 2000, Branko =?ISO-8859-2?Q?=C8ibej?= wrote:
> Greg Stein wrote:
>
> >> +1
> >> It makes sense to fix that macro if it's broken. But in the meantime, it
> >> would make sense to put a wrapper in ac-helpers.
> >
> >
> > Putting something into ac-helpers would just delay the proper fix. Nobody
> > would be motivated to fix it :-) So, I'd be against even temporary fixes.
> >
> > I've always built in the source directory, so I don't know what the
> > requirements are for building outside. I'm hoping that Mo can fix up that
> > macro in apr_common.m4, rather than use workarounds.
The "real" fix is to turn apr/helpers/mkdir.sh into a autoconf
macro named MKDIR(). In general, when something depends on
another package, I tend to work around problems and add
a FIXME note. Then when it gets fixed in the other package
I go back and remove the hack. But, I can fix it in apr
now if that works better.
> Ah, O.K., I wasn't aware it came from APR. In that case I agree it
> should be fixed there.
>
> >>> Hrm. It looks like you missed updating mod_dav_svn/Makefile.am.
> >>
> >> Does anybody but you ever look at that code? :-)
Humm, I am note sure what is going on in that dir:
INCLUDES = -I../include $(APACHE_INCLUDES)
I am not sure where this APACHE_INCLUDES comes
from. At any rate, it did not seem to build
anything on my system (no .o files) so
I guess I never ran into it.
> > Heh. Probably not, unfortunately.
>
> Well, apart from getting warnings about a missing Apache tree at
> configure time, I have no idea what it takes to build an test
> mod_dav_svn. I must have missed the post where you explained how it's done.
>
> Would you mind adding a short note to the HACKING file about that? That
> would get more people onto testing that code. I for one would run it
> through a configure/build/check cycle on four platforms once in a while,
> like I'm doing for the other parts of Subversion.
>
> (I haven't posted reports for some time because nothing broke on
> Solaris, HP-UX and AIX, and the Win32 build is still blocked waiting for
> me to fix some APR bits ... :-()
Is there some special configure flag one needs to set to
build this subdir? If it does not get built by default, it
is not wonder the code does not get tested.
Mo DeJong
Red Hat Inc
Building mod_dav_svn (was: Re: Patch to support building outside the srcdir.)
Posted by Branko Čibej <br...@xbc.nu>.
Greg Stein wrote:
>> +1
>> It makes sense to fix that macro if it's broken. But in the meantime, it
>> would make sense to put a wrapper in ac-helpers.
>
>
> Putting something into ac-helpers would just delay the proper fix. Nobody
> would be motivated to fix it :-) So, I'd be against even temporary fixes.
>
> I've always built in the source directory, so I don't know what the
> requirements are for building outside. I'm hoping that Mo can fix up that
> macro in apr_common.m4, rather than use workarounds.
Ah, O.K., I wasn't aware it came from APR. In that case I agree it
should be fixed there.
>>> Hrm. It looks like you missed updating mod_dav_svn/Makefile.am.
>>
>> Does anybody but you ever look at that code? :-)
>
>
> Heh. Probably not, unfortunately.
Well, apart from getting warnings about a missing Apache tree at
configure time, I have no idea what it takes to build an test
mod_dav_svn. I must have missed the post where you explained how it's done.
Would you mind adding a short note to the HACKING file about that? That
would get more people onto testing that code. I for one would run it
through a configure/build/check cycle on four platforms once in a while,
like I'm doing for the other parts of Subversion.
(I haven't posted reports for some time because nothing broke on
Solaris, HP-UX and AIX, and the Win32 build is still blocked waiting for
me to fix some APR bits ... :-()
--
Brane �ibej
home: <br...@xbc.nu> http://www.xbc.nu/brane/
work: <br...@hermes.si> http://www.hermes-softlab.com/
ACM: <br...@acm.org> http://www.acm.org/
Re: Patch to support building outside the srcdir.
Posted by Greg Stein <gs...@lyra.org>.
On Sat, Dec 16, 2000 at 06:46:22PM +0100, Branko Cibej wrote:
> Greg Stein wrote:
>
> > 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?
>
> +1
> It makes sense to fix that macro if it's broken. But in the meantime, it
> would make sense to put a wrapper in ac-helpers.
Putting something into ac-helpers would just delay the proper fix. Nobody
would be motivated to fix it :-) So, I'd be against even temporary fixes.
I've always built in the source directory, so I don't know what the
requirements are for building outside. I'm hoping that Mo can fix up that
macro in apr_common.m4, rather than use workarounds.
>...
> > Hrm. It looks like you missed updating mod_dav_svn/Makefile.am.
>
> Does anybody but you ever look at that code? :-)
Heh. Probably not, unfortunately.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
Re: Patch to support building outside the srcdir.
Posted by Branko Čibej <br...@xbc.nu>.
Greg Stein wrote:
> 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?
+1
It makes sense to fix that macro if it's broken. But in the meantime, it
would make sense to put a wrapper in ac-helpers.
> 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.
+1
> Hrm. It looks like you missed updating mod_dav_svn/Makefile.am.
Does anybody but you ever look at that code? :-)
> I can do the config work for these extra *_INCLUDES macros, if the approach
> sounds right to you.
--
Brane �ibej
home: <br...@xbc.nu> http://www.xbc.nu/brane/
work: <br...@hermes.si> http://www.hermes-softlab.com/
ACM: <br...@acm.org> http://www.acm.org/
Re: Patch to support building outside the srcdir.
Posted by Mo DeJong <md...@cygnus.com>.
On Fri, 15 Dec 2000, Greg Stein wrote:
> 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?
Ok, I sent a patch to the apr list that implements this fix.
The FIXME: hack in subversion's configure.in should no longer
be needed once that patch has been accepted.
> 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.
Yeah, that would be better than listing them in every Makefile.
You also might want to switch the subversion include over to
use -I$(top_srcdir)/subversion/include so that is does not need
to be subdir relative in the tests subdirs. There will
still be some relative includes in some subdirs.
Mo DeJong
Red Hat Inc
Re: Patch to support building outside the srcdir.
Posted by Greg Stein <gs...@lyra.org>.
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/