Build with AsciiDoc as well as Asciidoctor
This commit is contained in:
		@@ -204,20 +204,31 @@ install (DIRECTORY plugins/xC/
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# Generate documentation from text markup
 | 
					# Generate documentation from text markup
 | 
				
			||||||
find_program (ASCIIDOCTOR_EXECUTABLE asciidoctor)
 | 
					find_program (ASCIIDOCTOR_EXECUTABLE asciidoctor)
 | 
				
			||||||
if (NOT ASCIIDOCTOR_EXECUTABLE)
 | 
					find_program (A2X_EXECUTABLE a2x)
 | 
				
			||||||
	message (FATAL_ERROR "asciidoctor not found")
 | 
					if (NOT ASCIIDOCTOR_EXECUTABLE AND NOT A2X_EXECUTABLE)
 | 
				
			||||||
 | 
						message (FATAL_ERROR "Neither asciidoctor nor a2x were found")
 | 
				
			||||||
endif ()
 | 
					endif ()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
foreach (page xB xC xD)
 | 
					foreach (page xB xC xD)
 | 
				
			||||||
	set (page_output "${PROJECT_BINARY_DIR}/${page}.1")
 | 
						set (page_output "${PROJECT_BINARY_DIR}/${page}.1")
 | 
				
			||||||
	list (APPEND project_MAN_PAGES "${page_output}")
 | 
						list (APPEND project_MAN_PAGES "${page_output}")
 | 
				
			||||||
	add_custom_command (OUTPUT ${page_output}
 | 
						if (ASCIIDOCTOR_EXECUTABLE)
 | 
				
			||||||
		COMMAND ${ASCIIDOCTOR_EXECUTABLE} -b manpage
 | 
							add_custom_command (OUTPUT ${page_output}
 | 
				
			||||||
			-a release-version=${project_version}
 | 
								COMMAND ${ASCIIDOCTOR_EXECUTABLE} -b manpage
 | 
				
			||||||
			"${PROJECT_SOURCE_DIR}/${page}.adoc"
 | 
									-a release-version=${project_version}
 | 
				
			||||||
			-o "${page_output}"
 | 
									-o "${page_output}"
 | 
				
			||||||
		DEPENDS ${page}.adoc
 | 
									"${PROJECT_SOURCE_DIR}/${page}.adoc"
 | 
				
			||||||
		COMMENT "Generating man page for ${page}" VERBATIM)
 | 
								DEPENDS ${page}.adoc
 | 
				
			||||||
 | 
								COMMENT "Generating man page for ${page}" VERBATIM)
 | 
				
			||||||
 | 
						elseif (A2X_EXECUTABLE)
 | 
				
			||||||
 | 
							add_custom_command (OUTPUT ${page_output}
 | 
				
			||||||
 | 
								COMMAND ${A2X_EXECUTABLE} --doctype manpage --format manpage
 | 
				
			||||||
 | 
									-a release-version=${project_version}
 | 
				
			||||||
 | 
									-D "${PROJECT_BINARY_DIR}"
 | 
				
			||||||
 | 
									"${PROJECT_SOURCE_DIR}/${page}.adoc"
 | 
				
			||||||
 | 
								DEPENDS ${page}.adoc
 | 
				
			||||||
 | 
								COMMENT "Generating man page for ${page}" VERBATIM)
 | 
				
			||||||
 | 
						endif ()
 | 
				
			||||||
endforeach ()
 | 
					endforeach ()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
add_custom_target (docs ALL DEPENDS ${project_MAN_PAGES})
 | 
					add_custom_target (docs ALL DEPENDS ${project_MAN_PAGES})
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -71,7 +71,8 @@ a package with the latest development version from Archlinux's AUR.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
Building
 | 
					Building
 | 
				
			||||||
--------
 | 
					--------
 | 
				
			||||||
Build dependencies: CMake, pkg-config, asciidoctor, awk, liberty (included) +
 | 
					Build dependencies: CMake, pkg-config, asciidoctor or asciidoc, awk,
 | 
				
			||||||
 | 
					                    liberty (included) +
 | 
				
			||||||
Runtime dependencies: openssl +
 | 
					Runtime dependencies: openssl +
 | 
				
			||||||
Additionally for 'xC': curses, libffi, lua >= 5.3 (optional),
 | 
					Additionally for 'xC': curses, libffi, lua >= 5.3 (optional),
 | 
				
			||||||
                       readline >= 6.0 or libedit >= 2013-07-12
 | 
					                       readline >= 6.0 or libedit >= 2013-07-12
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								xB.adoc
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								xB.adoc
									
									
									
									
									
								
							@@ -65,9 +65,9 @@ for RPC, with the following subcommands:
 | 
				
			|||||||
	exists, the value will be empty.  The response will be delivered in
 | 
						exists, the value will be empty.  The response will be delivered in
 | 
				
			||||||
	the following format:
 | 
						the following format:
 | 
				
			||||||
+
 | 
					+
 | 
				
			||||||
```
 | 
					....
 | 
				
			||||||
XB :value
 | 
					XB :value
 | 
				
			||||||
```
 | 
					....
 | 
				
			||||||
+
 | 
					+
 | 
				
			||||||
This is particularly useful for retrieving the *prefix* string.
 | 
					This is particularly useful for retrieving the *prefix* string.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								xC.adoc
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								xC.adoc
									
									
									
									
									
								
							@@ -25,9 +25,9 @@ Options
 | 
				
			|||||||
	other formatting marks to ANSI codes retrieved from the *terminfo*(5)
 | 
						other formatting marks to ANSI codes retrieved from the *terminfo*(5)
 | 
				
			||||||
	database:
 | 
						database:
 | 
				
			||||||
+
 | 
					+
 | 
				
			||||||
```
 | 
					....
 | 
				
			||||||
printf '\x02bold\x02\n' | xC -f
 | 
					printf '\x02bold\x02\n' | xC -f
 | 
				
			||||||
```
 | 
					....
 | 
				
			||||||
+
 | 
					+
 | 
				
			||||||
This feature may be used to preview server MOTD files.
 | 
					This feature may be used to preview server MOTD files.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user