On 1/5/19 7:01 PM, Gabor Z. Papp wrote:
> && export SOURCE_DATE_EPOCH && $(run_help2man) \
_________________________________^^____________^
That is not from the patch I sent - my patch was against upstream Git.
PFA the same as a patch which cleanly applies on top of the original
distribution tarball 'coreutils-8.30.tar.xz':
$ tar -xf coreutils-8.30.tar.xz
$ cd coreutils-8.30
$ patch -p1 < ~/coreutils/build-use-distributed-man-pages-patch-for-v8.30.diff
patching file man/local.mk
patching file Makefile.in
Does that work for you ... and if not, then what is the output?
Have a nice day,
Berny
diff -ru coreutils-8.30.ORIG/man/local.mk coreutils-8.30/man/local.mk
--- coreutils-8.30.ORIG/man/local.mk 2018-05-14 06:20:24.000000000 +0200
+++ coreutils-8.30/man/local.mk 2019-01-06 00:47:53.356018461 +0100
@@ -190,9 +190,16 @@
&& $(MKDIR_P) $$t \
&& (cd $$t && $(LN_S) '$(abs_top_builddir)/src/'$$prog$(EXEEXT) \
$$argv$(EXEEXT)) \
- && : $${SOURCE_DATE_EPOCH=`cat $(srcdir)/.timestamp 2>/dev/null || :`} \
+ || exit 1; \
+## Double-check whether the built binary succeeds with --help as the above
+## CROSS_COMPILING condition might have been wrong in some cases, e.g. when
+## building against an incompatible glibc version on the same platform.
+ $$t/$$argv$(EXEEXT) --help </dev/null >/dev/null \
+ && run_help2man="$(run_help2man)" \
+ || run_help2man="$(srcdir)/man/dummy-man"; \
+ : $${SOURCE_DATE_EPOCH=`cat $(srcdir)/.timestamp 2>/dev/null || :`} \
&& : $${TZ=UTC0} && export TZ \
- && export SOURCE_DATE_EPOCH && $(run_help2man) \
+ && export SOURCE_DATE_EPOCH && $${run_help2man} \
--source='$(PACKAGE_STRING)' \
--include=$(srcdir)/man/$$name.x \
--output=$$t/$$name.1 \
diff -ru coreutils-8.30.ORIG/Makefile.in coreutils-8.30/Makefile.in
--- coreutils-8.30.ORIG/Makefile.in 2018-07-02 03:27:55.000000000 +0200
+++ coreutils-8.30/Makefile.in 2019-01-06 00:49:13.713086059 +0100
@@ -14852,9 +14852,13 @@
&& $(MKDIR_P) $$t \
&& (cd $$t && $(LN_S) '$(abs_top_builddir)/src/'$$prog$(EXEEXT) \
$$argv$(EXEEXT)) \
- && : $${SOURCE_DATE_EPOCH=`cat $(srcdir)/.timestamp 2>/dev/null || :`} \
+ || exit 1; \
+ $$t/$$argv$(EXEEXT) --help </dev/null >/dev/null \
+ && run_help2man="$(run_help2man)" \
+ || run_help2man="$(srcdir)/man/dummy-man"; \
+ : $${SOURCE_DATE_EPOCH=`cat $(srcdir)/.timestamp 2>/dev/null || :`} \
&& : $${TZ=UTC0} && export TZ \
- && export SOURCE_DATE_EPOCH && $(run_help2man) \
+ && export SOURCE_DATE_EPOCH && $${run_help2man} \
--source='$(PACKAGE_STRING)' \
--include=$(srcdir)/man/$$name.x \
--output=$$t/$$name.1 \