git.iko.soy/typeable/pandoc
on ca712fe help sign in
40 lines 1.1 kB history raw
1ALL := index.html README.html INSTALL.html examples.html pandoc.1.html html2markdown.1.html hsmarkdown.1.html html2x.html
2PANDOC_PATH ?= $(dir $(shell which pandoc))
3MAKEPAGE = $(PANDOC_PATH)/pandoc -s -S -H css -A footer.html
4all : $(ALL)
6.PHONY: clean
7clean:
8 for file in $(ALL); do rm $$file; done; \
9 rm -r example*;
11examples.txt : mkdemos.pl config.xsl S5DEMO README demos math.text
12 PATH=$(PANDOC_PATH):$$PATH ./mkdemos.pl demos $@
13 perl -pi -e 's!(href="(main|(my)?header|footer|example\d+)\.(html|tex|xml|css))"!\1.html"!g' $@
14 for file in $$(ls | egrep '(main|(my)?header|footer|example[0-9]+)\.(html|tex|xml|css)$$'); \
15 do highlight -k monospace -u utf-8 --style emacs $$file > $$file.html; \
16 done
18examples.html : examples.txt
19 $(PANDOC_PATH)/pandoc -s -H css -A footer.html $< > $@
21index.html : index.txt css
22 $(MAKEPAGE) --toc $< > $@
24README.html : README css
25 $(MAKEPAGE) --toc $< > $@
27INSTALL.html : INSTALL css
28 $(MAKEPAGE) --toc $< > $@
30%.html : %.txt css
31 $(MAKEPAGE) $< > $@
33%.1.html : %.1
34 groff -man -T html $< > $@
36%.html : % css
37 $(MAKEPAGE) $< > $@
39upload :
40 make -C .. upload