]> arthur.barton.de Git - bup.git/commitdiff
Makefile: fix find -printf issue on FreeBSD
authorRob Browning <rlb@defaultvalue.org>
Sun, 30 Sep 2018 20:29:42 +0000 (15:29 -0500)
committerRob Browning <rlb@defaultvalue.org>
Fri, 5 Oct 2018 17:06:25 +0000 (12:06 -0500)
Apparently the use of -printf was causing the error: "printf: missing
format character" with FreeBSD 11.1-RELEASE.  Change the helpers lib
count to rely on -print0 and tr, which should be more portable, but
still be undisturbed by unusual paths.

Thanks to Curtis Dunham for reporting the problem and proposing an
alternate solution.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Makefile

index a185bac979dd6d00d749d26328e4b12a4e3483c8..89b34e1015302d2ba16896d991d3e72b65412843 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -125,8 +125,8 @@ lib/bup/_helpers$(SOEXT): \
        cd lib/bup && \
        LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)" "$(bup_python)" csetup.py build
         # Make sure there's just the one file we expect before we copy it.
-       find lib/bup/build/* -maxdepth 1 -name '_helpers*$(SOEXT)' \
-         -exec printf 'x' '{}' \; | wc -c | xargs test 1 -eq
+       find lib/bup/build/* -maxdepth 1 -name '_helpers*$(SOEXT)' -print0 \
+         | tr -C -d '\000' | wc -c | xargs test 1 -eq
        cp lib/bup/build/*/_helpers*$(SOEXT) "$@"
 
 lib/bup/_checkout.py: