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

Emil Velikov emil.l.velikov at gmail.com
Wed Mar 8 14:18:23 UTC 2017


On 8 March 2017 at 08:21, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> 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.
> +    #
That seems like a very strange behaviour indeed: from the manual -
"the standard location is the first one of ., .., or ../.. (relative
to the top source directory)"
The better solution imho is to simply tell it where those are/should
be stored via AC_CONFIG_AUX_DIR. For libdrm we use
AC_CONFIG_AUX_DIR([build-aux]).

> +    # 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"
> +
Regardless of my suggestion - having a $repo_top/release/$build_dir
sounds great imho.

Thanks
Emil


More information about the xorg-devel mailing list