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 Wednesday 2025-08-27 14:57, Pablo Neira Ayuso wrote:
>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.
>
>Subtle internal detail is exposed:
>
>nft configuration:
>  cli support:                  editline
>  enable debugging symbols:     yes
>  use mini-gmp:                 no
>  enable man page:              yes
>  libxtables support:           no
>  json output support:          no
>  systemd unit:                 ${dcprefix}/lib/systemd/system
>                                ^---------^

That is unavoidable. Variables with paths are expected to be recursively
expanded -- make will do that, sh won't.
And that is why you will see '${var}' when directly echoing from configure.ac.
This is nothing specific to ${dcprefix}, you will also observe this when doing
something as trivial as

	# configure.ac
	echo "bindir: ${bindir}"
	AC_OUTPUT




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

  Powered by Linux