~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Auto-generate man pages for all StGit commands
[stgit]
/
Documentation
/
Makefile
diff --git
a/Documentation/Makefile
b/Documentation/Makefile
index
c53c4af
..
1c14fe3
100644
(file)
--- 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=$(wildcard stg*.txt) $(COMMANDS_TXT)
DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT))
DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT))
@@
-57,7
+60,10
@@
doc.dep : $(wildcard *.txt) build-docdep.perl
-include doc.dep
clean:
-include doc.dep
clean:
- rm -f *.xml *.html *.pdf *.1 doc.dep
+ rm -f *.xml *.html *.pdf *.1 doc.dep $(COMMANDS_TXT)
+
+$(COMMANDS_TXT): $(shell find .. -name '*.py')
+ ../stg-build --asciidoc $(basename $(subst stg-,,$@)) > $@
%.html : %.txt
$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf $(ASCIIDOC_EXTRA) $<
%.html : %.txt
$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf $(ASCIIDOC_EXTRA) $<