Skip to content

Commit

Permalink
Makefile: fix find -printf issue on FreeBSD
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Rob Browning <[email protected]>
  • Loading branch information
rlbdv committed Oct 5, 2018
1 parent ef211f8 commit d90aaa8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d90aaa8

Please sign in to comment.