]> arthur.barton.de Git - bup.git/commitdiff
Makefile: check _helpers.so uniqueness via python command
authorRob Browning <rlb@defaultvalue.org>
Mon, 17 Dec 2018 00:42:15 +0000 (18:42 -0600)
committerRob Browning <rlb@defaultvalue.org>
Mon, 17 Dec 2018 00:46:04 +0000 (18:46 -0600)
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 <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Makefile

index 201af4c424722cb747c0fc0e9cc580aa318e0d3a..7635f900d94bdea3e36db4fd7dba067974e78350 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)' -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: