From 149620ee0f1999b2bf51e9257f4ea44e187aee58 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Fri, 31 Jan 2020 11:28:10 +0100 Subject: [PATCH] build: fix and simplify doc/index.rst generation * Fix usage of `echo "...\n..."` (without `-e`), generating a broken output: ``` lightningd-config lightningd\nlightning-autocleaninvoice.7.md ``` * Use `$(SORT)` instead of bare `sort` to avoid locale-dependent sort. * Strip the trailing .[0-9].md without invoking sed. * Sort all man pages as one block. Changelog-None --- doc/Makefile | 2 +- doc/index.rst | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index dc5738e59..3aeb170e2 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -97,6 +97,6 @@ doc-clean: $(RM) doc/deployable-lightning.{aux,bbl,blg,dvi,log,out,tex} doc/index.rst: - (grep -v '^ lightning.*\.[0-9]\.md>$$' $@; for m in $$(cd doc && echo "$$(ls lightningd*.[0-9].md | sort)\n$$(ls lightning-*.[0-9].md | sort)"); do echo " $$(echo $$m | sed 's/.[0-9].md//') <$$m>"; done) > $@.tmp.$$$$ && mv $@.tmp.$$$$ $@ + (grep -v '^ lightning.*\.[0-9]\.md>$$' $@; for m in $$(cd doc && ls lightningd*.[0-9].md lightning-*.[0-9].md); do echo " $${m%.[0-9].md} <$$m>"; done |$(SORT)) > $@.tmp.$$$$ && mv $@.tmp.$$$$ $@ .PHONY: doc/index.rst diff --git a/doc/index.rst b/doc/index.rst index 325a02607..c0e6bad57 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -27,8 +27,6 @@ c-lightning Documentation :maxdepth: 1 :caption: Manpages - lightningd - lightningd-config lightning-autocleaninvoice lightning-check lightning-checkmessage @@ -69,3 +67,5 @@ c-lightning Documentation lightning-waitinvoice lightning-waitsendpay lightning-withdraw + lightningd + lightningd-config