Makefile: respect --quiet and V=1 in doc/Makefile.

And don't regen doc/index.rst unless there's good reason.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-08-25 11:03:08 +09:30
parent 6f114e06a6
commit 67cde96397
2 changed files with 4 additions and 6 deletions

View File

@@ -58,7 +58,7 @@ MANPAGES := doc/lightning-cli.1 \
doc-all: $(MANPAGES) doc/index.rst
$(MANPAGES): doc/%: doc/%.md
if $(CHANGED_FROM_GIT); then mrkd $< $@; else touch $@; fi
@if $(CHANGED_FROM_GIT); then $(call VERBOSE, "mrkd $<", mrkd $< $@); else touch $@; fi
doc/protocol-%.svg: test/test_protocol
test/test_protocol --svg < test/commits/$*.script > $@
@@ -104,7 +104,5 @@ doc-maintainer-clean:
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 && 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
doc/index.rst: $(MANPAGES:=.md)
@$(call VERBOSE, "genidx $@",(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.$$$$ $@)