You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David James <st...@gmail.com> on 2004/09/17 23:02:42 UTC

[PATCH] Autobuild dependencies before install

This patch fixes the Subversion dependency system so that make targets
will automatically build their dependencies before installing them.
This change, in some cases, dramatically simplifies and speeds up the
process of installing subversion components.

With this patch, you can install any component of subversion in one
step. Simply type what you want to install, and make will handle the
dependencies!

SOME EXAMPLES: 

To install javahl, simply type:
    ./configure [with appropriate options] && make install-javahl
To install the bdb library, simply type:
    ./configure [with appropriate options] && make install-bdb-lib
To test everything, simply type:
    ./configure [with appropriate options] && make check
To install everything, simply type:
    ./configure [with appropriate options] && make install

With this patch, there's no need to build all of subversion if you
just want to run one test or install one library!  All of the
dependencies will be built automatically, and, if necessary,
installed.

OTHER ADVANTAGES:
- If you're working on the Subversion source code, this patch will
  improve the compile (and install) speed of Subversion. Instead of having
  to compile and reinstall everything from scratch, Subversion will only
  recompile and reinstall the changed files.
- This patch fixes issue 2039
  <http://subversion.tigris.org/issues/show_bug.cgi?id=2039> because
  this patch fixes the JavaHL dependencies
- This patch fixes issue 2032 by always running mkdir-init, even when
  we're not in a VPATH setup. See bug
  <http://subversion.tigris.org/issues/show_bug.cgi?id=2032>

CAVEATS:
- I haven't optimized all of the build and installation processes to
  avoid rebuilds during incremental compiles. I've only optimized some of
  them. I'll save the rest for my next patch.
- We should test the SWIG bindings with this patch
- We should test whether the new install process installs the same
files as the old install process
- Questions? Suggestions? Concerns? Send 'em my way.

The patch is attached as "autobuild_dependencies_before_install_patch.txt".

Cheers,

David

Re: [PATCH] Autobuild dependencies before install

Posted by David James <st...@gmail.com>.
> Can you *please* write a log message per HACKING?  To me, it seems like you
> are doing a *lot* of different things that aren't necessarily related to the
> build dependencies.  So, it's really hard to review your patches.
Oops, you're right. I'm trying to do way too much with one patch. I'll
resubmit as a series of small patches with HACKING-style log messages.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Autobuild dependencies before install

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Friday, September 17, 2004 7:02 PM -0400 David James <st...@gmail.com> 
wrote:

> The patch is attached as "autobuild_dependencies_before_install_patch.txt".

Can you *please* write a log message per HACKING?  To me, it seems like you 
are doing a *lot* of different things that aren't necessarily related to the 
build dependencies.  So, it's really hard to review your patches.

For example, I see you unconditionally run mkdir-init, which is what I 
suggested is the proper solution to 2032 before reading this email.  But, that 
has nothing at all to do with dependencies.  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Autobuild dependencies before install

Posted by Greg Hudson <gh...@MIT.EDU>.
On Sat, 2004-09-18 at 12:45, David James wrote:
> > In my little world, and I'm not totally alone, either you're asking a
> > makefile to build something or you're asking a makefile to do something,
> > and it can be very frustrating when you ask for the latter and get the
> > former.
[...]
> What this means: If you type 'make install', make will only recompile
> your targets if the sources have changed. If not, it won't. In any
> case, it will install subversion.
> 
> Greg, does this address your concerns? 

No.  To my mind, there were two things wrong in my example: both the
target was broken, and the Makefile did something I didn't ask it to
do.  Even if the sources have changed, if I ask the Makefile to install
something, it should do exactly that, no more.

> In some cases, it's much more than two steps. For example, the process
> of testing JavaHL is currently:
> 
> 1. ./configure [with some options]
> 2. make
> 3. make javahl
> 4. make install-javahl
> 5. make check-javahl

> With my patch (and Holger Thon's patch at
> <http://www.contactor.se/~dast/svn/archive-2004-09/0408.shtml>), it's
> 2 steps:
> 1. ./configure [with some options]
> 2. make check-javahl

Step 2 of your first procedure is unnecessary, I think, and step 4 can
only be eliminated due to an unrelated fix.  So you've really only
eliminated one step.

> Try installing the following make targets with and without my patch.
> It's simple as pie to install these targets with my patch, but I can't
> figure out how to install them without my patch. Without my patch,
> these make targets emit mysterious errors.
> - make install-lib (just the libraries, no binaries needed)
> - make install-bin (just the binaries!)
> - make install-bdb-lib (just the BDB library and its dependencies)

Here you seem to be arguing that we should make it more convenient and
intuitive to do things people rarely do, which is perplexing.

("make lib" followed by "make install-lib" seems to work fine.)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Autobuild dependencies before install

Posted by David James <st...@gmail.com>.
> We deliberately don't do that.  (Or at least, to the extent we don't do
> that, it's deliberate.  It's come to my attention that we're a little
> bit inconsistent, because the bindings maintainers aren't necessarily on
> the same wavelengths as the team as a whole.)
> 
> In my little world, and I'm not totally alone, either you're asking a
> makefile to build something or you're asking a makefile to do something,
> and it can be very frustrating when you ask for the latter and get the
> former.
> 
> For instance, right now our "swig-py" target is broken such that it
> rebuilds the Python bindings even if nothing has changed.  Because
> install-swig-py is one of the inconsistent targets in our Makefile (it
> depends on swig-py), if I run:
> 
>   make swig-py CFLAGS=-g  # or some other option to the build
>   make install-swig-py
> 
> I will, frustratingly, get a rebuild of the Python bindings, ignoring
> the flag I so carefully passed when building them.  This isn't the end
> of the world, but neither is having to tell the Makefile to build stuff
> and install it in two steps like you're supposed to.

I can understand your frustration. The core problem you refer to here
is that many of our targets are broken such that they rebuild their
outputs even if nothing has changed. Fortunately, my patch also fixes
this issue. (If there's anything I missed, let me know and I'll fix
it!)

What this means: If you type 'make install', make will only recompile
your targets if the sources have changed. If not, it won't. In any
case, it will install subversion.

Greg, does this address your concerns? 

> This isn't the end of the world, but neither is having to tell the Makefile
> to build stuff and install it in two steps like you're supposed to.
In some cases, it's much more than two steps. For example, the process
of testing JavaHL is currently:

1. ./configure [with some options]
2. make
3. make javahl
4. make install-javahl
5. make check-javahl

With my patch (and Holger Thon's patch at
<http://www.contactor.se/~dast/svn/archive-2004-09/0408.shtml>), it's
2 steps:
1. ./configure [with some options]
2. make check-javahl

Try installing the following make targets with and without my patch.
It's simple as pie to install these targets with my patch, but I can't
figure out how to install them without my patch. Without my patch,
these make targets emit mysterious errors.
- make install-lib (just the libraries, no binaries needed)
- make install-bin (just the binaries!)
- make install-bdb-lib (just the BDB library and its dependencies)

Cheers,

David

P.S. The bug you referred to in the SWIG build process is a
pre-existing issue, and I plan to fix it in a separate patch.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Autobuild dependencies before install

Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2004-09-17 at 19:02, David James wrote:
> This patch fixes the Subversion dependency system so that make targets
> will automatically build their dependencies before installing them.

We deliberately don't do that.  (Or at least, to the extent we don't do
that, it's deliberate.  It's come to my attention that we're a little
bit inconsistent, because the bindings maintainers aren't necessarily on
the same wavelengths as the team as a whole.)

In my little world, and I'm not totally alone, either you're asking a
makefile to build something or you're asking a makefile to do something,
and it can be very frustrating when you ask for the latter and get the
former.

For instance, right now our "swig-py" target is broken such that it
rebuilds the Python bindings even if nothing has changed.  Because
install-swig-py is one of the inconsistent targets in our Makefile (it
depends on swig-py), if I run:

  make swig-py CFLAGS=-g  # or some other option to the build
  make install-swig-py

I will, frustratingly, get a rebuild of the Python bindings, ignoring
the flag I so carefully passed when building them.  This isn't the end
of the world, but neither is having to tell the Makefile to build stuff
and install it in two steps like you're supposed to.

So, -1 on this patch.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org