1 1.1 nia BASE=ctwm.1 2 1.1 nia 3 1.1 nia HTML=${BASE}.html 4 1.1 nia 5 1.1 nia html: ${HTML} 6 1.1 nia man: ${BASE} 7 1.1 nia 8 1.1 nia all: html man 9 1.1 nia 10 1.1 nia all_set_version: all 11 1.1 nia sed -i '' -e "s/@ctwm_version_str@/`head -1 ../../VERSION`/" ${HTML} ${BASE} 12 1.1 nia 13 1.1 nia clean: 14 1.1 nia rm -f ${BASE} ${HTML} 15 1.1 nia 16 1.1 nia 17 1.1 nia # asciidoc vs asciidoctor notes: 18 1.1 nia # 19 1.1 nia # Note that asciidoctor has a slightly changed dialect, so there may be 20 1.1 nia # minor differences in the output. Also, the manpage generation requires 21 1.1 nia # 1.5.3+. At the moment, we're trying to work with both. Current trends 22 1.1 nia # suggest that at some point asciidoctor will be the de facto 23 1.1 nia # asciidoc-world implementation, so we may drop the py-asciidoc at some 24 1.1 nia # point. For the moment, asciidoctor is treated as the standard 25 1.1 nia # renderer, with asciidoc being a fallback we try to keep working well. 26 1.1 nia 27 1.1 nia 28 1.1 nia # Generating HTML output by various means 29 1.1 nia html-asciidoc: ${BASE}.adoc 30 1.1 nia asciidoc -atoc -anumbered -o ${BASE}.html ${BASE}.adoc 31 1.1 nia 32 1.1 nia html-asciidoctor: ${BASE}.adoc 33 1.1 nia asciidoctor -atoc -anumbered -o ${BASE}.html ${BASE}.adoc 34 1.1 nia 35 1.1 nia 36 1.1 nia # Manpage output. x-ref comment above about asciidoctor versions 37 1.1 nia man-asciidoc-a2x: ${BASE}.adoc 38 1.1 nia a2x --doctype manpage --format manpage ${BASE}.adoc 39 1.1 nia 40 1.1 nia man-asciidoc-adoc: ${BASE}.adoc 41 1.1 nia asciidoc -b docbook -d manpage -o ${BASE}.xml ${BASE}.adoc 42 1.1 nia xmlto man ${BASE}.xml 43 1.1 nia 44 1.1 nia man-asciidoctor: ${BASE}.adoc 45 1.1 nia asciidoctor -b manpage -o ${BASE} ${BASE}.adoc 46 1.1 nia 47 1.1 nia 48 1.1 nia 49 1.1 nia # Set which are used by default. Set to asciidoctor since it's massively 50 1.1 nia # faster. 51 1.1 nia ${HTML}: ${BASE}.adoc 52 1.1 nia @${MAKE} html-asciidoctor 53 1.1 nia 54 1.1 nia ${BASE}: ${BASE}.adoc 55 1.1 nia @${MAKE} man-asciidoctor 56 1.1 nia 57