From 07c0a34b1977740211186d79e8b979bb906ccea1 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sun, 16 Dec 2018 18:42:15 -0600 Subject: [PATCH] Makefile: check _helpers.so uniqueness via python command Aside from being a bit tortured, the previous approach, using tr -C, didn't work on NetBSD. Thanks to Greg Troxel for reporting the problem and testing the fix. 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 201af4c..7635f90 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)' -print0 \ - | tr -C -d '\000' | wc -c | xargs test 1 -eq + "$(bup_python)" -c \ + "import glob; assert(len(glob.glob('lib/bup/build/*/_helpers*$(SOEXT)')) == 1)" cp lib/bup/build/*/_helpers*$(SOEXT) "$@" lib/bup/_checkout.py: -- 2.39.2