Introduction ============ Makefile.svn aids Subversion developers on unix-like systems set up an SVN development environment without requiring root privileges. It does this by fetching Subversion along with many of its dependencies from the internet and building them using sane defaults suitable for development (for example, it invokes --enable-maintainer-mode while compiling Subversion itself). However, indirect dependencies are not covered; you need OpenSSL installed to get SSL support in neon and serf for example. Also, it doesn't build all the bindings by default (javahl for example). This README only covers basic usage. Please read Makefile.svn for more details. Requirements ============ In addition to the usual GNU buildtools including a sane compiler and GNU autotools, some version of Subversion is required to be in $PATH. It is used to fetch the desired version of Subversion from the repository. Usage ===== First, choose a directory $(SVN_DEV) to set up the environment. For example, $(SVN_DEV) could be the directory "~/svn". Note that this directory cannot be changed later because the script hardcodes build and link paths relative to the current working directory. $ mkdir $(SVN_DEV) Now change into this directory and make the Makefile available in it: $ cd $(SVN_DEV) $ svn checkout https://svn.apache.org/repos/asf/subversion/trunk/tools/dev/unix-build $ ln -s unix-build/Makefile.svn Makefile To fetch and build trunk, simply don't pass anything, just run 'make': $ cd $(SVN_DEV) $ make Pass the branch you want to build in BRANCH, e.g. $ make BRANCH="1.5.x" You can also pass a tag to build: $ make TAG="1.6.6" And you can specify a working copy to use, in case you need more than one working copy of the same branch: $ make BRANCH="1.6.x" WC="1.6.x-test2" When the script has finished fetching and building, it uses $(SVN_DEV)/prefix to install Subversion libraries and binaries. $(SVN_DEV)/prefix/svn-trunk (or whatever you choose to build) will contain the latest Subversion binaries. You can add $(SVN_DEV)/prefix/svn-trunk/bin to your $PATH to use them: $ export PATH="$(SVN_DEV)/prefix/svn-trunk/bin:$PATH" The Makefile in $(SVN_DEV)/svn-trunk is configured to build with sane options: while developing Subversion, simply `svn up` to pull the latest changes, `make` and `make install` to install the binaries in $(SVN_DEV)/prefix/svn-trunk. This usually works fine. If not, you may need to use the 'svn-reset' target and recompile everything. If at any point, you want to recompile any of the packages with the default configuration in Makefile.svn, use the *-clean and *-reset target in Makefile.svn before trying to rebuild again. For example: $ make svn-clean $ make svn-reset $ make Or, if you want to recompile svn and all dependencies: $ make clean $ make reset $ make If you want to remove everything including the installed binaries effectively returning to the starting point, use the "nuke" target (BE CAREFUL, this will remove the 'svn' binary compiled from trunk which you might need to manage existing working copies): $ make nuke Extended usage ============== The script can also run Subversion's regression test suite via all repository backends and RA methods. It generates the necessary configuration files and starts svnserve and httpd daemons automatically on non-privileged ports. The default test target to test everything is "svn-check". Notes ===== The script currently doesn't build Ctypes Python bindings. OpenBSD-specific notes ====================== On OpenBSD install the following packages to get dependencies and tools not covered by this Makefile: pkg_add autoconf automake bison coreutils gmake gperf groff libtool \ python ruby scons subversion swig wget Some of these packages are available in several versions. Tested at time of writing were: autoconf-2.68 automake-1.19 python-2.7.14 ruby-2.4.2 OpenBSD's autoconf and automake wrappers require desired versions in environment variables and will raise errors if these aren't set: export AUTOCONF_VERSION=2.68 export AUTOMAKE_VERSION=1.19 A 'python' symlink is required; follow instructions printed by pkg_add when the python package is installed.