]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Output a helpful msg about configure only if the command fails.
authorWayne Davison <wayne@opencoder.net>
Sun, 21 Jun 2020 19:54:02 +0000 (12:54 -0700)
committerWayne Davison <wayne@opencoder.net>
Sun, 21 Jun 2020 19:55:24 +0000 (12:55 -0700)
Makefile.in
cmdormsg [new file with mode: 0755]

index f52976e90c9129781b51712debe64e6f2f66bbbb..6ca7d9ebc54f35a7aae42666ae7b249c432ac869 100644 (file)
@@ -133,11 +133,10 @@ rounding.h: rounding.c rsync.h proto.h
        @rm -f rounding.out
 
 simd-checksum-x86_64.o: simd-checksum-x86_64.cpp
-       @echo "If this fails to compile and you can't fix it, re-run $(srcdir)/configure with --disable-simd."
-       $(CXX) -I. $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $(srcdir)/simd-checksum-x86_64.cpp
+       @$(srcdir)/cmdormsg disable-simd $(CXX) -I. $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $(srcdir)/simd-checksum-x86_64.cpp
 
 lib/md5-asm-x86_64.o: lib/md5-asm-x86_64.S config.h lib/md-defines.h
-       $(CC) -I. @NOEXECSTACK@ -c -o $@ $(srcdir)/lib/md5-asm-x86_64.S
+       @$(srcdir)/cmdormsg disable-asm $(CC) -I. @NOEXECSTACK@ -c -o $@ $(srcdir)/lib/md5-asm-x86_64.S
 
 tls$(EXEEXT): $(TLS_OBJ)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TLS_OBJ) $(LIBS)
diff --git a/cmdormsg b/cmdormsg
new file mode 100755 (executable)
index 0000000..ccf9527
--- /dev/null
+++ b/cmdormsg
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+srcdir=`dirname $0`
+opt="$1"
+shift
+
+echo "$*"
+if ! "${@}"; then
+    echo "If you can't fix the issue, re-run $srcdir/configure with --$opt."
+    exit 1
+fi