X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/fd52912d651e59701714b4b957757bca4725a728..85aaed816bde469b3de72e80d8f8ed7830302fbf:/Documentation/Makefile diff --git a/Documentation/Makefile b/Documentation/Makefile index c53c4af..165e222 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -1,4 +1,7 @@ -MAN1_TXT=$(wildcard stg*.txt) +COMMANDS = $(shell ../stg-build --commands) +COMMANDS_TXT = $(patsubst %,stg-%.txt,$(COMMANDS)) + +MAN1_TXT= stg.txt $(COMMANDS_TXT) DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT)) @@ -57,7 +60,15 @@ doc.dep : $(wildcard *.txt) build-docdep.perl -include doc.dep clean: - rm -f *.xml *.html *.pdf *.1 doc.dep + rm -f *.xml *.html *.pdf *.1 doc.dep $(COMMANDS_TXT) command-list.txt + +ALL_PY = $(shell find ../stgit -name '*.py') + +$(COMMANDS_TXT): $(ALL_PY) + ../stg-build --asciidoc $(basename $(subst stg-,,$@)) > $@ + +command-list.txt: $(ALL_PY) + ../stg-build --cmd-list > $@ %.html : %.txt $(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf $(ASCIIDOC_EXTRA) $<