From: Rob Browning Date: Sun, 30 Sep 2018 20:29:42 +0000 (-0500) Subject: Makefile: fix find -printf issue on FreeBSD X-Git-Tag: 0.30~50 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=bup.git;a=commitdiff_plain;h=d90aaa8417a32d2ab88e87ca8c3e1a41e960f4bf Makefile: fix find -printf issue on FreeBSD 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 Tested-by: Rob Browning --- diff --git a/Makefile b/Makefile index a185bac..89b34e1 100644 --- 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: