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