chiark / gitweb /
Generate command lists automatically
[stgit] / Documentation / Makefile
index 1c14fe38de7e29872c995f8dd3aabdd4db6e85cc..85e9600ce3a2dcfb046a1a8055ab4cc949764a2c 100644 (file)
@@ -60,11 +60,16 @@ doc.dep : $(wildcard *.txt) build-docdep.perl
 -include doc.dep
 
 clean:
-       rm -f *.xml *.html *.pdf *.1 doc.dep $(COMMANDS_TXT)
+       rm -f *.xml *.html *.pdf *.1 doc.dep $(COMMANDS_TXT) stg-cmd-list.txt
 
-$(COMMANDS_TXT): $(shell find .. -name '*.py')
+ALL_PY = $(shell find ../stgit -name '*.py')
+
+$(COMMANDS_TXT): $(ALL_PY)
        ../stg-build --asciidoc $(basename $(subst stg-,,$@)) > $@
 
+stg-cmd-list.txt: $(ALL_PY)
+       ../stg-build --cmd-list > $@
+
 %.html : %.txt
        $(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf $(ASCIIDOC_EXTRA) $<