Makefile

changeset 5
1b128d430637
parent 4
fc87d1928dab
equal deleted inserted replaced
4:fc87d1928dab 5:1b128d430637
27 27
28 OBJS= ${SRCS:.md=.html} 28 OBJS= ${SRCS:.md=.html}
29 PANDOC= pandoc 29 PANDOC= pandoc
30 PANDOC_FLAGS= -f markdown -t html5 --no-highlight --template templates/template.html 30 PANDOC_FLAGS= -f markdown -t html5 --no-highlight --template templates/template.html
31 MANDOC= mandoc 31 MANDOC= mandoc
32 MANDOC_HTML= -T html -O man=%N.html 32 MANDOC_MD= -T markdown
33 MANDOC_PDF= -T pdf 33 MANDOC_PDF= -T pdf
34 DIST= ${PROJECT}-${VERSION}.tar.xz 34 DIST= ${PROJECT}-${VERSION}.tar.xz
35 WRKDIR= ${PROJECT}-${VERSION} 35 WRKDIR= ${PROJECT}-${VERSION}
36 36
37 MAN1_HTML= ${MAN1:.1=.html} 37 MAN1_HTML= ${MAN1:.1=.html}
49 49
50 .md.html: 50 .md.html:
51 ${PANDOC} ${PANDOC_FLAGS} -o $@ $< 51 ${PANDOC} ${PANDOC_FLAGS} -o $@ $<
52 52
53 .1.html: 53 .1.html:
54 ${MANDOC} < $< ${MANDOC_HTML} > $@ 54 ${MANDOC} < $< ${MANDOC_MD} | ${PANDOC} ${PANDOC_FLAGS} -M title=${<F} -o $@
55 .8.html: 55 .8.html:
56 ${MANDOC} < $< ${MANDOC_HTML} > $@ 56 ${MANDOC} < $< ${MANDOC_MD} | ${PANDOC} ${PANDOC_FLAGS} -M title=${<F} -o $@
57 57
58 .1.pdf: 58 .1.pdf:
59 ${MANDOC} < $< ${MANDOC_PDF} > $@ 59 ${MANDOC} < $< ${MANDOC_PDF} > $@
60 .8.pdf: 60 .8.pdf:
61 ${MANDOC} < $< ${MANDOC_PDF} > $@ 61 ${MANDOC} < $< ${MANDOC_PDF} > $@

mercurial