2017-01-23 01:05:27 +01:00
|
|
|
#! /usr/bin/make
|
|
|
|
|
|
|
|
# Designed to be run one level up
|
|
|
|
doc-wrongdir:
|
|
|
|
$(MAKE) -C .. doc-all
|
|
|
|
|
|
|
|
MANPAGES := doc/lightning-cli.1 \
|
2019-08-04 15:30:44 +02:00
|
|
|
doc/lightningd.8 \
|
2018-05-17 06:46:22 +02:00
|
|
|
doc/lightningd-config.5 \
|
2018-03-17 16:12:37 +01:00
|
|
|
doc/lightning-autocleaninvoice.7 \
|
2018-12-07 18:31:16 +01:00
|
|
|
doc/lightning-check.7 \
|
2019-10-13 07:19:37 +02:00
|
|
|
doc/lightning-checkmessage.7 \
|
2018-04-10 08:03:15 +02:00
|
|
|
doc/lightning-close.7 \
|
2018-04-26 12:22:09 +02:00
|
|
|
doc/lightning-connect.7 \
|
2019-11-14 17:51:28 +01:00
|
|
|
doc/lightning-createonion.7 \
|
2018-01-13 12:21:33 +01:00
|
|
|
doc/lightning-decodepay.7 \
|
2018-02-26 13:37:53 +01:00
|
|
|
doc/lightning-delexpiredinvoice.7 \
|
2017-01-23 01:05:27 +01:00
|
|
|
doc/lightning-delinvoice.7 \
|
2019-12-09 16:32:49 +01:00
|
|
|
doc/lightning-dev-sendcustommsg.7 \
|
2018-12-03 06:20:25 +01:00
|
|
|
doc/lightning-disconnect.7 \
|
2018-05-03 16:54:39 +02:00
|
|
|
doc/lightning-fundchannel.7 \
|
2019-06-06 01:32:04 +02:00
|
|
|
doc/lightning-fundchannel_start.7 \
|
|
|
|
doc/lightning-fundchannel_complete.7 \
|
|
|
|
doc/lightning-fundchannel_cancel.7 \
|
2017-01-23 01:05:27 +01:00
|
|
|
doc/lightning-getroute.7 \
|
2020-02-04 06:53:17 +01:00
|
|
|
doc/lightning-getsharedsecret.7 \
|
2017-01-23 01:05:27 +01:00
|
|
|
doc/lightning-invoice.7 \
|
2019-01-07 20:09:59 +01:00
|
|
|
doc/lightning-listchannels.7 \
|
2019-01-11 23:05:46 +01:00
|
|
|
doc/lightning-listforwards.7 \
|
2018-04-26 12:22:09 +02:00
|
|
|
doc/lightning-listfunds.7 \
|
2018-01-16 21:28:46 +01:00
|
|
|
doc/lightning-listinvoices.7 \
|
2019-02-23 06:00:04 +01:00
|
|
|
doc/lightning-listpays.7 \
|
2018-12-05 22:38:07 +01:00
|
|
|
doc/lightning-listpeers.7 \
|
2019-02-23 06:00:04 +01:00
|
|
|
doc/lightning-listsendpays.7 \
|
2018-04-26 12:22:09 +02:00
|
|
|
doc/lightning-newaddr.7 \
|
2018-01-13 12:21:33 +01:00
|
|
|
doc/lightning-pay.7 \
|
2019-08-10 01:22:23 +02:00
|
|
|
doc/lightning-plugin.7 \
|
2019-11-14 17:51:28 +01:00
|
|
|
doc/lightning-sendonion.7 \
|
2017-01-23 01:05:27 +01:00
|
|
|
doc/lightning-sendpay.7 \
|
2019-03-09 21:40:38 +01:00
|
|
|
doc/lightning-setchannelfee.7 \
|
2019-10-13 07:19:37 +02:00
|
|
|
doc/lightning-signmessage.7 \
|
2019-06-05 09:00:05 +02:00
|
|
|
doc/lightning-txprepare.7 \
|
|
|
|
doc/lightning-txdiscard.7 \
|
|
|
|
doc/lightning-txsend.7 \
|
2017-01-23 01:09:43 +01:00
|
|
|
doc/lightning-waitinvoice.7 \
|
2018-03-08 01:19:55 +01:00
|
|
|
doc/lightning-waitanyinvoice.7 \
|
2019-12-26 11:19:09 +01:00
|
|
|
doc/lightning-waitblockheight.7 \
|
2018-04-26 12:12:17 +02:00
|
|
|
doc/lightning-waitsendpay.7 \
|
2018-04-26 12:22:09 +02:00
|
|
|
doc/lightning-withdraw.7
|
2017-01-23 01:05:27 +01:00
|
|
|
|
2019-08-10 13:24:33 +02:00
|
|
|
doc-all: $(MANPAGES) doc/index.rst
|
2017-01-23 01:05:27 +01:00
|
|
|
|
2019-08-10 01:23:11 +02:00
|
|
|
$(MANPAGES): doc/%: doc/%.md
|
2019-08-31 14:30:56 +02:00
|
|
|
if $(CHANGED_FROM_GIT); then mrkd $< $@; else touch $@; fi
|
2017-01-23 01:05:27 +01:00
|
|
|
|
|
|
|
doc/protocol-%.svg: test/test_protocol
|
|
|
|
test/test_protocol --svg < test/commits/$*.script > $@
|
|
|
|
|
|
|
|
protocol-diagrams: $(patsubst %.script, doc/protocol-%.svg, $(notdir $(wildcard test/commits/*.script)))
|
|
|
|
|
|
|
|
doc/deployable-lightning.pdf: doc/deployable-lightning.lyx doc/bitcoin.bib
|
|
|
|
lyx -E pdf $@ $<
|
|
|
|
|
|
|
|
doc/deployable-lightning.tex: doc/deployable-lightning.lyx
|
|
|
|
lyx -E latex $@ $<
|
|
|
|
|
|
|
|
state-diagrams: doc/normal-states.svg doc/simplified-states.svg doc/error-states.svg doc/full-states.svg
|
|
|
|
|
|
|
|
%.svg: %.dot
|
|
|
|
dot -Tsvg $< > $@ || (rm -f $@; false)
|
|
|
|
|
|
|
|
doc/simplified-states.dot: test/test_state_coverage
|
|
|
|
test/test_state_coverage --dot --dot-simplify > $@
|
|
|
|
|
|
|
|
doc/normal-states.dot: test/test_state_coverage
|
|
|
|
test/test_state_coverage --dot > $@
|
|
|
|
|
|
|
|
doc/error-states.dot: test/test_state_coverage
|
|
|
|
test/test_state_coverage --dot-all --dot-include-errors > $@
|
|
|
|
|
|
|
|
doc/full-states.dot: test/test_state_coverage
|
|
|
|
test/test_state_coverage --dot-all --dot-include-errors --dot-include-nops > $@
|
|
|
|
|
|
|
|
maintainer-clean: doc-maintainer-clean
|
|
|
|
clean: doc-clean
|
2018-05-17 06:46:22 +02:00
|
|
|
check: check-manpages
|
|
|
|
|
2019-08-22 08:17:24 +02:00
|
|
|
# This needs plugins, too.
|
|
|
|
check-manpages: all-programs
|
2019-08-10 12:50:31 +02:00
|
|
|
@tools/check-manpage.sh cli/lightning-cli doc/lightning-cli.1.md
|
|
|
|
@tools/check-manpage.sh "lightningd/lightningd --lightning-dir=/tmp/" doc/lightningd-config.5.md
|
2017-01-23 01:05:27 +01:00
|
|
|
|
|
|
|
doc-maintainer-clean:
|
|
|
|
$(RM) doc/deployable-lightning.pdf
|
|
|
|
$(RM) $(MANPAGES)
|
|
|
|
|
|
|
|
doc-clean:
|
|
|
|
$(RM) doc/deployable-lightning.{aux,bbl,blg,dvi,log,out,tex}
|
|
|
|
|
2019-08-10 13:24:33 +02:00
|
|
|
doc/index.rst:
|
2020-01-31 11:28:10 +01:00
|
|
|
(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.$$$$ $@
|
2019-08-10 13:24:33 +02:00
|
|
|
|
|
|
|
.PHONY: doc/index.rst
|