Re: [PATCH] build: make `make distcheck` succeed in the face of absolute paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 27, 2025 at 02:43:07PM +0200, Jan Engelhardt wrote:
> `make distcheck` has an expectation that, if only --prefix is
> specified, all other potentially-configurable paths are somehow
> relative to '${prefix}', e.g. bindir defaults to '${prefix}/bin'.
> 
> We get an absolute path from $(pkg-config systemd ...) at all times
> in case systemd.pc is present, and an empty path in case it is not,
> which collides with the aforementioned expectation two ways. Add an
> internal --with-dcprefix configure option for the sake of distcheck.
> ---
>  Makefile.am  | 1 +
>  configure.ac | 5 +++++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/Makefile.am b/Makefile.am
> index e292d3b9..52a3e6c4 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -23,6 +23,7 @@ libnftables_LIBVERSION = 2:0:1
>  ###############################################################################
>  
>  ACLOCAL_AMFLAGS = -I m4
> +AM_DISTCHECK_CONFIGURE_FLAGS = --with-dcprefix='$${prefix}'
>  
>  EXTRA_DIST =
>  BUILT_SOURCES =
> diff --git a/configure.ac b/configure.ac
> index 626c641b..198b3be8 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -122,6 +122,11 @@ AC_ARG_WITH([unitdir],
>  		AS_IF([test -z "$unitdir"], [unitdir='${prefix}/lib/systemd/system'])
>  	])
>  AC_SUBST([unitdir])
> +AC_ARG_WITH([dcprefix],
> +        [AS_HELP_STRING([Extra path inserted for distcheck])],
> +        [dcprefix="$withval"])
> +AC_SUBST([dcprefix])
> +AS_IF([test -z "$unitdir"], [unitdir='${prefix}/lib/systemd/system'], [unitdir='${dcprefix}'"$unitdir"])

Shouldn't this test for '-z "$dcprefix"'?

Cheers, Phil




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux