[PATCH util-modular] release.sh: create a worktree structure that's out of reach of libtool

Peter Hutterer peter.hutterer at who-t.net
Wed Mar 8 08:21:14 UTC 2017


The comment in the diff says it all, we need to put our worktree root at least
two directories away from our normal checkout.

This fixes the issue of release.sh failing in git trees that haven't been git
cleaned:

    ERROR: files left in build directory after distclean:
    ./config.sub
    ./test-driver
    ./ltmain.sh
    ./config.guess
    ./install-sh
    ./missing
    ./depcomp
    ./compile
    make[1]: *** [distcleancheck] Error 1
    make: *** [distcheck] Error 1

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 release.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/release.sh b/release.sh
index c824dea..b5069cc 100755
--- a/release.sh
+++ b/release.sh
@@ -365,6 +365,18 @@ process_module() {
         return 1
     fi
 
+    # libtool will search down to ../.. for install-sh and then just gess
+    # that's the aux dir, dumping config.sub and other files into that
+    # directory. make distclean then complains about leftover files. So
+    # let's put our real module dir out of reach of libtool.
+    #
+    # We use $build_dir/release/$build_dir because git will pick the last
+    # part as branch identifer, so it needs to be random to avoid conflicts.
+    # And in between we put 'release' so it doesn't look like a runaway
+    # script and confuse poor maintainers.
+    build_dir="$build_dir/release/$build_dir"
+    mkdir -p "$build_dir"
+
     # Worktree removal is intentionally left to the user, due to:
     #  - currently we cannot select only one worktree to prune
     #  - requires to removal of $build_dir which might contradict with the
-- 
2.9.3



More information about the xorg-devel mailing list