]> arthur.barton.de Git - bup.git/commitdiff
Fix build error on macOS: "printf: missing format character" fix-macos-printf-format-character
authorAlexander Barton <alex@barton.de>
Sat, 10 Feb 2018 14:46:49 +0000 (15:46 +0100)
committerAlexander Barton <alex@barton.de>
Sat, 10 Feb 2018 14:46:49 +0000 (15:46 +0100)
Commit 3306a802a11b8d "_helpers: fix module init, and get it at least
building with py3" breaks building bup on macOS:

  $ make
  [...]
  running build_ext
  find lib/bup/build/* -maxdepth 1 -name '_helpers*.so' \
            -exec printf 'x\c' '{}' \; | wc -c | xargs test 1 -eq
  printf: missing format character
  make: *** [lib/bup/_helpers.so] Error 1

So don't count characters printed for each file found, but count the
filenames found ("lines") itself.

Tested on Debian Linux 9 and macOS 10.13.3.

Makefile

index 620f90b45b30e926a7221d04ff633ad4798eb885..6c464537051b9e360ac3921ae2db7bff7897e77b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -126,7 +126,7 @@ lib/bup/_helpers$(SOEXT): \
        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\c' '{}' \; | wc -c | xargs test 1 -eq
+         | wc -l | xargs test 1 -eq
        cp lib/bup/build/*/_helpers*$(SOEXT) "$@"
 
 lib/bup/_checkout.py: