]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: avoid makeinfo unless required
authorPádraig Brady <P@draigBrady.com>
Wed, 25 Nov 2015 13:38:29 +0000 (13:38 +0000)
committerPádraig Brady <P@draigBrady.com>
Wed, 25 Nov 2015 15:12:37 +0000 (15:12 +0000)
* doc/local.mk (constants.texi): Avoid calling makeinfo unless
the constants derived from tail and shred have changed.
This avoids a dependence on makeinfo from patched sources,
and avoids an expensive makeinfo call for developers.

doc/local.mk

index 37c5621e3e04ad069bdd8244c42ee4e10c496266..a270c1faab3dbef4ba898394920c8633805d8f7f 100644 (file)
@@ -42,7 +42,7 @@ doc/constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
          sed -n -e \
              's/.*\(DEFAULT_PASSES\)[ =]* \([0-9]*\).*/@set SHRED_\1 \2/p'\
            $(top_srcdir)/src/shred.c; } > $@-t \
-         && mv $@-t $@
+         && { cmp $@-t $@ >/dev/null 2>&1 || mv $@-t $@; }
 
 MAINTAINERCLEANFILES += doc/constants.texi