From: Wayne Davison Date: Wed, 15 Jul 2020 03:01:54 +0000 (-0700) Subject: Mention the auto-build-save setup. X-Git-Tag: v3.2.3pre1~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=95f683039d9579745a0352b28bf5a08b79b9da40;p=thirdparty%2Frsync.git Mention the auto-build-save setup. --- diff --git a/INSTALL.md b/INSTALL.md index b53965e9..a504fb78 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -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 ------------------ diff --git a/packaging/prep-auto-dir b/packaging/prep-auto-dir index a9516df8..1e5a2965 100755 --- a/packaging/prep-auto-dir +++ b/packaging/prep-auto-dir @@ -15,6 +15,10 @@ 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`