From: Karel Zak Date: Tue, 19 Oct 2021 08:52:10 +0000 (+0200) Subject: build-sys: make libtool patching more robust X-Git-Tag: v2.38-rc1~220 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=403f9c7af6632d10bad8688306ec0f41af586d67;p=thirdparty%2Futil-linux.git build-sys: make libtool patching more robust Fixes: https://github.com/karelzak/util-linux/issues/1476 Signed-off-by: Karel Zak --- diff --git a/autogen.sh b/autogen.sh index 9b6cfd390b..14f8e23ba2 100755 --- a/autogen.sh +++ b/autogen.sh @@ -134,7 +134,10 @@ if test -f tools/libtool.m4.patch; then rm m4/libtool.m4 mv m4/libtool.m4.org m4/libtool.m4 fi - patch -p1 --batch < tools/libtool.m4.patch + patch --batch --dry -p1 < tools/libtool.m4.patch &> /dev/null; + if [ "$?" -eq 0 ]; then + patch -p1 --batch < tools/libtool.m4.patch + fi fi aclocal -I m4 $AL_OPTS