summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2019-09-24 11:13:43 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2019-09-24 11:13:43 -0700
commit01a67a1ba4e4a9b95752e3e97736f15d98fdd1f9 (patch)
treef5386f607e0d6ba2522677ea1d6d318b152d92ef /autogen.sh
parentf7dbdb2e136db99051b14403a0f29c5155bbf7d8 (diff)
downloadnasm-01a67a1ba4e4a9b95752e3e97736f15d98fdd1f9.tar.gz
autogen.sh: don't update helpers unless there is a newer version
Updating the autoconf helpers unconditionally is very noisy and probably the wrong thing to do anyway. Check the version numbers and only update if the current machine has a newer version installed. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/autogen.sh b/autogen.sh
index e07324cd..5597c8a0 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -18,7 +18,14 @@ mkdir -p autoconf autoconf/helpers config
autolib="`"$AUTOMAKE" --print-libdir`"
if test ! x"$autolib" = x; then
for prg in install-sh compile config.guess config.sub; do
- if test -f "$autolib"/"$prg"; then
+ # Update autoconf helpers if and only if newer ones are available
+ if test -f "$autolib"/"$prg" && \
+ ( test -f "$autolib"/"$prg" && \
+ sed -n -r -e \
+ 's/^(scriptver(|sion)|timestamp)=['\''"]?([^'\''"]+).*$/\3/p' \
+ "$autolib"/"$prg" autoconf/helpers/"$prg" | \
+ sort --check=quiet; test $? -ne 0 )
+ then
cp -f "$autolib"/"$prg" autoconf/helpers
fi
done