1 COMMANDS=$(wildcard ../cmd*.c)
2 OBJS=$(COMMANDS:../%.c=%.o) docgen.o
4 CFLAGS=-Wall -std=c99 -I../.. -I../../cmdproc/include -I../../rpp-lib/rpp/include -DDOCGEN -DNULL=0 -D'CMD_HANDLER(x)=0'
14 $(CC) $(CFLAGS) -c -o $@ $<
20 (echo '<div class="toclimit-2" style="float: right; margin-left: 1em;">__TOC__</div>'; ./docgen wiki) | pandoc -f markdown_strict -t mediawiki > $@
22 doc.mdwn: docgen Makefile
23 # ./docgen wiki | pandoc -f markdown_strict -t markdown_strict > $@
26 doc.html: docgen Makefile
27 ./docgen wiki | pandoc -f markdown_strict -t html --base-header-level=2 > $@
29 doc.tex: docgen Makefile
30 ./docgen pdfdoc > $@.1
31 pandoc -f markdown_strict -t latex --base-header-level=1 $@.1 -o $@.2
32 sed -e 's/\\subsection/\\newpage\\subsection/' $@.2 > $@
35 upload: upload-mw upload-web
38 cat $< | ./wiki-edit.pl TestCommands -
41 WEBDST=$(WEB)test-sw-commands/rpp-test-sw.mdwn
43 ifneq ($(wildcard $(WEBDST)),)
46 git -C $(WEB) add $(WEBDST:$(WEB)%=%)
47 if ! git -C $(WEB) diff --cached --quiet; then git -C $(WEB) commit -m 'Automatic update of command reference' $(WEBDST:$(WEB)%=%) && git -C $(WEB) push; fi