From d90aaa8417a32d2ab88e87ca8c3e1a41e960f4bf Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sun, 30 Sep 2018 15:29:42 -0500 Subject: [PATCH 1/1] 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 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: -- 2.39.2