Mention the auto-build-save setup.
authorWayne Davison <wayne@opencoder.net>
Wed, 15 Jul 2020 03:01:54 +0000 (20:01 -0700)
committerWayne Davison <wayne@opencoder.net>
Wed, 15 Jul 2020 03:25:02 +0000 (20:25 -0700)
INSTALL.md
packaging/prep-auto-dir

index b53965e9a196deaebe158542206a59459075b49f..a504fb78d13700142d18c6f3417d52f03f330828 100644 (file)
@@ -25,6 +25,18 @@ If you configure using --enable-maintainer-mode, then rsync will try
 to pop up an xterm on DISPLAY=:0 if it crashes.  You might find this
 useful, but it should be turned off for production builds.
 
+If you want to automatically use a separate "build" directory based on
+the current git branch name, start with a pristine git checkout and run
+"mkdir auto-build-save" before you run the first ./configure command.
+That will cause a fresh build dir to spring into existence along with a
+special Makefile symlink that allows you to run "make" and "./configure"
+from the source dir (the "build" dir gets auto switched based on branch).
+This is helpful when using the branch-from-patch and patch-update scripts
+to maintain the official rsync patches.  If you ever need to build from
+a "detached head" git position then you'll need to manually chdir into
+the build dir to run make.  I also like to create 2 more symlinks in the
+sourc dir:  ln -s build/rsync . ; ln -s build/testtmp .
+
 MAKE COMPATIBILITY
 ------------------
 
index a9516df8e0bc18ba3224388ec1742c989e742b6b..1e5a296565b3cfcec4c52d5e52ed618296316284 100755 (executable)
 auto_top='auto-build-save'
 if test -d $auto_top -a -d .git; then
     desired_branch=`git rev-parse --abbrev-ref HEAD | tr / %`
+    if test "$desired_branch" = HEAD; then
+       echo "ERROR: switch to the right build dir manually when in detached HEAD mode." 1>&2
+       exit 1
+    fi
     auto_dir="$auto_top/$desired_branch"
     if test -d build; then
        cur_branch=`readlink build/.branch`