[PATCH] Makefile.am: use readlink as a fallback for realpath
Dmitry V. Levin
ldv at altlinux.org
Thu Sep 1 09:35:48 UTC 2016
On Thu, Sep 01, 2016 at 02:47:34AM +0300, Eugene Syromyatnikov wrote:
> Since realpath utility is fairly new in GNU coreutils, there could be
> possibility that it is not present in the system. Instead of checking
> its presence in configure script it probably makes sense to resort to
> calling readlink since it is (probably) more widespread.
> ---
> Makefile.am | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index 65f5c64..b77c2e1 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -256,7 +256,8 @@ endif
> @CODE_COVERAGE_RULES@
> CODE_COVERAGE_BRANCH_COVERAGE = 1
> CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) \
> - --prefix $(shell realpath -Ls $(abs_top_srcdir)/..)
> + --prefix $(shell realpath -Ls $(abs_top_srcdir)/.. || \
> + readlink -f $(abs_top_srcdir)/..)
What about dirname(1)? Isn't it even more portable than readlink(1)?
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160901/4c9d0015/attachment.bin>
More information about the Strace-devel
mailing list