From 12ffbf91197add094ff6c0f1513cf9c4c0a540d8 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 9 Apr 2019 14:17:09 +0200 Subject: Makefile.am: Don't assume autoopts-config returns a single dash. On distributions such as Nix or Guix, `autoopts-config libsrc` may return something along the lines of "/gnu/store/...-autogen-5.18.16/share/autogen/libopts-42.1.17.tar.gz". * Makefile.am (libopts-check): Print only the last field from autoopts-config output. Signed-off-by: Marius Bakke --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index b4d0db3b51..27b4520e0b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -161,7 +161,7 @@ libopts-check: @echo "Checking whether included libopts matches the system's. If the" @echo "check fails upgrade the included libopts." @echo "*****************************************************************" - test "`autoopts-config libsrc|cut -d '-' -f 2|sed 's/.tar.gz//'`" = "`cat $(srcdir)/src/libopts/autoopts/options.h |grep OPTIONS_VERSION_STRING|cut -d '"' -f 2|sed 's/:/./g'`" + test "`autoopts-config libsrc|awk -F '-' '{print $$NF}'|sed 's/.tar.gz//'`" = "`cat $(srcdir)/src/libopts/autoopts/options.h |grep OPTIONS_VERSION_STRING|cut -d '"' -f 2|sed 's/:/./g'`" files-update: libopts-check $(MAKE) -C doc/ compare-makefile || mv doc/tmp-compare-makefile $(srcdir)/doc/Makefile.am -- cgit v1.2.1