On 25/11/15 13:59, Jim Meyering wrote: > On Wed, Nov 25, 2015 at 5:43 AM, Pádraig Brady <[email protected]> wrote: >> On 25/11/15 12:53, Joachim Schiele wrote: >>> i've used this patch but then i hit this issue: >>> http://paste.ubuntu.com/13498376/ >>> >>> i don't have packaged makeinfo yet and i don't really care for the >>> documentation at the moment. i didn't find a ./configure switch to >>> disable it either. >> >>> and there is a patch to make it compile without >>> 'makeinfo' which changes doc/local.mk but it seems already applied in >>> 8.24 so what should i do now? >> >> I don't know what patch you're referring to, but >> it would be best to avoid makeinfo unless really needed. >> The attached should do that (note you may want to >> apply it to Makefile.in rather than doc/local.mk, >> and note it requires cmp on the build system). > > Good idea. > > - && mv $@-t $@ > + && { cmp -s $@-t $@ 2>/dev/null || mv $@-t $@; } > > That "-s" option works with GNU cmp, but is not portable to some > other-vendor cmp programs.
Interesting. It is POSIX and works on NetBSD, FreeBSD, and solaris, but not on HPUX for example: http://aix.polarhome.com/service/man/?qf=cmp&af=0&sf=0&of=HP-UX&tf=2 I'll redirect to /dev/null instead. I'll also add this to tests to avoid the suggestion that -s is a GNU option: commit f97df9ac0430427942310c1047e9fe9574a061f5 Author: Pádraig Brady <[email protected]> Date: Wed Nov 25 14:26:59 2015 +0000 tests: for compare_(), use cmp -s where available * tests/init.sh (compare_): Only fall back to cmp without the POSIX defined -s option, where this is not available. diff --git a/tests/init.sh b/tests/init.sh index d366206..ed640f3 100755 --- a/tests/init.sh +++ b/tests/init.sh @@ -327,7 +327,7 @@ elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then fi } fi -elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then +elif cmp -s /dev/null /dev/null 2>/dev/null; then compare_ () { cmp -s "$@"; } else compare_ () { cmp "$@"; } cheers, Pádraig.
