build: man pages: use asciidoctor instead of asciidoc (#2234)

This commit is contained in:
Joseph Herlant 2018-04-04 02:28:50 -07:00 committed by Daniel Hahler
parent 5e6f534365
commit d9cc56538f
4 changed files with 9 additions and 19 deletions

View File

@ -39,7 +39,8 @@ install:
# Install build dependencies. # Install build dependencies.
# See also `apt-cache showsrc awesome | grep -E '^(Version|Build-Depends)'`. # See also `apt-cache showsrc awesome | grep -E '^(Version|Build-Depends)'`.
- sudo apt-get install -y libcairo2-dev gir1.2-gtk-3.0 xmlto asciidoc libpango1.0-dev libxcb-xtest0-dev libxcb-icccm4-dev libxcb-randr0-dev libxcb-keysyms1-dev libxcb-xinerama0-dev libdbus-1-dev libxdg-basedir-dev libstartup-notification0-dev imagemagick libxcb1-dev libxcb-shape0-dev libxcb-util0-dev libx11-xcb-dev libxcb-cursor-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev - sudo apt-get install -y libcairo2-dev gir1.2-gtk-3.0 libpango1.0-dev libxcb-xtest0-dev libxcb-icccm4-dev libxcb-randr0-dev libxcb-keysyms1-dev libxcb-xinerama0-dev libdbus-1-dev libxdg-basedir-dev libstartup-notification0-dev imagemagick libxcb1-dev libxcb-shape0-dev libxcb-util0-dev libx11-xcb-dev libxcb-cursor-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev
- sudo gem install asciidoctor
# Deps for tests. # Deps for tests.
- sudo apt-get install -y dbus-x11 xterm xdotool xterm xvfb zsh x11-apps - sudo apt-get install -y dbus-x11 xterm xdotool xterm xvfb zsh x11-apps

View File

@ -230,7 +230,6 @@ if(GENERATE_MANPAGES)
# set the final filenames # set the final filenames
set(txtfile ${SOURCE_DIR}/${relpath}/${basename2}.txt) set(txtfile ${SOURCE_DIR}/${relpath}/${basename2}.txt)
set(xmlfile ${BUILD_DIR}/${relpath2}/${basename}.xml)
set(gzfile ${BUILD_DIR}/${relpath2}/${basename}.gz) set(gzfile ${BUILD_DIR}/${relpath2}/${basename}.gz)
set(manfile ${BUILD_DIR}/${relpath2}/${basename}) set(manfile ${BUILD_DIR}/${relpath2}/${basename})
@ -240,16 +239,11 @@ if(GENERATE_MANPAGES)
set(asciilang ${lang}) set(asciilang ${lang})
endif() endif()
add_custom_command( add_custom_command(
COMMAND ${ASCIIDOC_EXECUTABLE} -a lang=${asciilang} -d manpage -b docbook -o ${xmlfile} - < ${txtfile} COMMAND ${ASCIIDOCTOR_EXECUTABLE} -a lang=${asciilang} -d manpage -b manpage -o ${manfile} - < ${txtfile}
WORKING_DIRECTORY ${BUILD_DIR}/${relpath2} WORKING_DIRECTORY ${BUILD_DIR}/${relpath2}
OUTPUT ${xmlfile} OUTPUT ${manfile}
DEPENDS ${txtfile} DEPENDS ${txtfile}
VERBATIM) VERBATIM)
add_custom_command(
COMMAND ${XMLTO_EXECUTABLE} man ${xmlfile}
OUTPUT ${manfile}
WORKING_DIRECTORY ${BUILD_DIR}/${relpath2}
DEPENDS ${xmlfile})
if(COMPRESS_MANPAGES) if(COMPRESS_MANPAGES)
add_custom_command( add_custom_command(

View File

@ -37,8 +37,7 @@ endmacro()
a_find_program(GIT_EXECUTABLE git FALSE) a_find_program(GIT_EXECUTABLE git FALSE)
# programs needed for man pages # programs needed for man pages
a_find_program(ASCIIDOC_EXECUTABLE asciidoc FALSE) a_find_program(ASCIIDOCTOR_EXECUTABLE asciidoctor FALSE)
a_find_program(XMLTO_EXECUTABLE xmlto FALSE)
a_find_program(GZIP_EXECUTABLE gzip FALSE) a_find_program(GZIP_EXECUTABLE gzip FALSE)
# Lua documentation # Lua documentation
if(GENERATE_DOC) if(GENERATE_DOC)
@ -77,12 +76,9 @@ endif()
# {{{ Check if documentation can be build # {{{ Check if documentation can be build
if(GENERATE_MANPAGES) if(GENERATE_MANPAGES)
if(NOT ASCIIDOC_EXECUTABLE OR NOT XMLTO_EXECUTABLE OR (COMPRESS_MANPAGES AND NOT GZIP_EXECUTABLE)) if(NOT ASCIIDOCTOR_EXECUTABLE OR (COMPRESS_MANPAGES AND NOT GZIP_EXECUTABLE))
if(NOT ASCIIDOC_EXECUTABLE) if(NOT ASCIIDOCTOR_EXECUTABLE)
SET(missing "asciidoc") SET(missing "asciidoctor")
endif()
if(NOT XMLTO_EXECUTABLE)
SET(missing ${missing} " xmlto")
endif() endif()
if(COMPRESS_MANPAGES AND NOT GZIP_EXECUTABLE) if(COMPRESS_MANPAGES AND NOT GZIP_EXECUTABLE)
SET(missing ${missing} " gzip") SET(missing ${missing} " gzip")

View File

@ -66,8 +66,7 @@ Additionally, the following optional dependencies exist:
- [DBus](https://www.freedesktop.org/wiki/Software/dbus/) for DBus integration - [DBus](https://www.freedesktop.org/wiki/Software/dbus/) for DBus integration
and the `awesome-client` utility and the `awesome-client` utility
- [asciidoc](http://www.methods.co.nz/asciidoc/) and - [asciidoctor](https://asciidoctor.org/) for generating man pages
[xmlto](https://fedorahosted.org/xmlto/) for generating man pages
- [gzip](http://www.gzip.org/) for compressing man pages - [gzip](http://www.gzip.org/) for compressing man pages
- [ldoc >= 1.4.5](https://stevedonovan.github.io/ldoc/) for generating the - [ldoc >= 1.4.5](https://stevedonovan.github.io/ldoc/) for generating the
documentation documentation