[Pkg-giraffe-discuss] PATCH make lddcheck work also out of tree

Guido Günther agx at sigxcpu.org
Sat Aug 27 11:39:37 UTC 2016


Hi Carsten,
On Sat, Aug 27, 2016 at 11:54:11AM +0200, Carsten Schoenert wrote:
> Hello Marc, hello Jelle,
> 
> while working on several tasks of the Kopano packages I noticed that the
> call of the lddcheck script within the debian chroot build was failing.
> 
> This happen due a not flexible enough call for libtool. I appended a
> patch which was created while sitting on other small fixups. I added the
> patch currently to the patch queue and the built is going fine within or
> without the tree.
> 
> -- 
> Regards
> Carsten Schoenert

> From: Carsten Schoenert <c.schoenert at t-online.de>
> Date: Wed, 24 Aug 2016 19:55:12 +0200
> Subject: make lddcheck work also out of tree
> 
> The lddcheck was not aware of out of tree builds. The libtool script was
> expected within the same folder where lddcheck was called from. This
> works while building the source within the tree, but not if a user is
> doing a out of tree built.
> 
> To solve this issue the global.am macro was modified to giving out a
> third parameter which holds the path to the folder where libtool script
> can be found. Also expanding the lddcheck script to concate the correct
> call of libtool.
> ---
>  global.am |  4 ++--
>  lddcheck  | 11 +++++++++--
>  2 files changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/global.am b/global.am
> index 56f39ba..3cffc36 100644
> --- a/global.am
> +++ b/global.am
> @@ -1,8 +1,8 @@
>  # -*- Makefile -*-
>  
>  .la.ldd:
> -	${AM_V_GEN}${top_srcdir}/lddcheck $< $@
> +	${AM_V_GEN}${top_srcdir}/lddcheck $< $@ ${top_builddir}/
>  
>  # There is no good POSIX syntax for the following one.. resort to GNUmake
>  %.ldx: %
> -	${AM_V_GEN}${top_srcdir}/lddcheck $< $@
> +	${AM_V_GEN}${top_srcdir}/lddcheck $< $@ ${top_builddir}/
> diff --git a/lddcheck b/lddcheck
> index 24d358b..7698d16 100755
> --- a/lddcheck
> +++ b/lddcheck
> @@ -5,6 +5,13 @@ if [ -z "$1" ]; then
>  fi
>  input="$1"
>  output="$2"
> +path="$3"
> +
> +if [ "${path}" != "" ]; then
> +	libtool="${path}libtool"
> +else
> +	libtool="libtool"
> +fi

Good catch! Alternatively you could make lddcheck a lddcheck.in and
replace ${top_builddir} during configure time by adding it to
AC_CONFIG_FILES and AC_SUBST'ing top_build_dir in configure.ac.
This way lddcheck would work without having to pass in the libtool path.

Cheers,
 -- Guido



More information about the Pkg-giraffe-discuss mailing list