Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use asciidoctor to generate man pages from asciidoc sources #3069

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion debian/control.main-pkg.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ Depends:
tclx,
@QTVCP_DEPENDS@,
procps, psmisc,
udev
udev,
asciidoctor
Recommends:
linuxcnc-doc-en | linuxcnc-doc,
librsvg2-dev,
Expand Down
17 changes: 10 additions & 7 deletions docs/man/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ man1/xyzab-tdr-gui.1
man1/xyzac-trt-gui.1
man1/xyzbc-trt-gui.1

man3/EXPORT_FUNCTION.3
man3/EXPORT_FUNCTION.3rtapi
man3/hal_add_funct_to_thread.3
man3/hal_bit_t.3
man3/hal_bool.3
Expand All @@ -134,6 +134,9 @@ man3/hal_get_lock.3
man3/hal_init.3hal
man3/hal_link.3
man3/hal_malloc.3hal
man3/MODULE_AUTHOR.3rtapi
man3/MODULE_DESCRIPTION.3rtapi
man3/MODULE_LICENSE.3rtapi
man3/hal_param_alias.3hal
man3/hal_param_bit_new.3
man3/hal_param_bit_newf.3
Expand Down Expand Up @@ -211,12 +214,12 @@ man3/rtapi_io.3rtapi
man3/rtapi_is.3rtapi
man3/rtapi_list.3rtapi
man3/rtapi_module_param.3
man3/RTAPI_MP_ARRAY_INT.3
man3/RTAPI_MP_ARRAY_LONG.3
man3/RTAPI_MP_ARRAY_STRING.3
man3/RTAPI_MP_INT.3
man3/RTAPI_MP_LONG.3
man3/RTAPI_MP_STRING.3
man3/RTAPI_MP_ARRAY_INT.3rtapi
man3/RTAPI_MP_ARRAY_LONG.3rtapi
man3/RTAPI_MP_ARRAY_STRING.3rtapi
man3/RTAPI_MP_INT.3rtapi
man3/RTAPI_MP_LONG.3rtapi
man3/RTAPI_MP_STRING.3rtapi
man3/rtapi_mutex.3rtapi
man3/rtapi_open_as_root.3rtapi
man3/rtapi_outb.3
Expand Down
14 changes: 5 additions & 9 deletions docs/src/Submakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ MAN_SRCS = $(sort \
$(wildcard $(DOC_DIR)/man/man1/*.1) \
$(wildcard $(DOC_DIR)/man/man3/*.3*) \
$(wildcard $(DOC_DIR)/man/man9/*.9) \
$(wildcard $(DOC_DIR)/man/es/man1/*.1) \
$(wildcard $(DOC_DIR)/man/es/man3/*.3*) \
$(wildcard $(DOC_DIR)/man/es/man9/*.9) \
$(GENERATED_MANPAGES))

../docs/man/man1/linuxcnc.1: $(DOC_SRCDIR)/man/man1/linuxcnc.1.in config.status
Expand Down Expand Up @@ -999,10 +996,9 @@ TARGETS += manpages
GENERATED_MANPAGES += $(patsubst $(DOC_DIR)/src/man/%.adoc, $(DOC_DIR)/man/%, $(wildcard $(DOC_DIR)/src/man/man?/*.adoc))
$(DOC_DIR)/man/%: $(DOC_DIR)/src/man/%.adoc
@mkdir -p `dirname $@`
a2x -v --doctype manpage \
--format manpage \
--destination-dir `dirname $@` \
--xsltproc-opts="--nonet" \
-a mansource=LinuxCNC \
-a manmanual='LinuxCNC Documentation' \
asciidoctor -b manpage \
-a doctype=manpage \
-a doctitle="$(basename $(@F)) ($(patsubst .%,%,$(suffix $(@F))))" \
-a manname=$(basename $(@F)) \
--destination-dir $(@D) \
$<
2 changes: 1 addition & 1 deletion docs/src/man/man1/millturn.1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

== NAME

millturn, millturngui - Vismach Virtual Machine GUI
millturn - Vismach Virtual Machine GUI

== DESCRIPTION

Expand Down
9 changes: 9 additions & 0 deletions docs/src/man/man3/EXPORT_FUNCTION.3rtapi.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:manvolnum: 3

= EXPORT_FUNCTION(3rtapi)

== NAME

EXPORT_FUNCTION - Specifying module parameters

include::rtapi_module_param.3.body[]
7 changes: 7 additions & 0 deletions docs/src/man/man3/MODULE_AUTHOR.3rtapi.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
= MODULE_AUTOR(3rtapi)

== NAME

MODULE_AUTHOR - Specifying module parameters

include::rtapi_module_param.3.body[]
7 changes: 7 additions & 0 deletions docs/src/man/man3/MODULE_DESCRIPTION.3rtapi.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
= MODULE_DESCRIPTION(3rtapi)

== NAME

MODULE_DESCRIPTION - Specifying module parameters

include::rtapi_module_param.3.adoc[]
7 changes: 7 additions & 0 deletions docs/src/man/man3/MODULE_LICENSE.3rtapi.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
= MODULE_LICENSE(3rtapi)

== NAME

MODULE_LICENSE - Specifying module parameters

include::rtapi_module_param.3.adoc[]
9 changes: 9 additions & 0 deletions docs/src/man/man3/RTAPI_MP_ARRAY_INT.3rtapi.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:manvolnum: 3

= RTAPI_MP_ARRAY_INT(3rtapi)

== NAME

RTAPI_MP_ARRAY_INT - Specifying module parameters

include::rtapi_module_param.3.body[]
9 changes: 9 additions & 0 deletions docs/src/man/man3/RTAPI_MP_ARRAY_LONG.3rtapi.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:manvolnum: 3

= RTAPI_MP_ARRAY_LONG(3rtapi)

== NAME

RTAPI_MP_ARRAY_LONG - Specifying module parameters

include::rtapi_module_param.3.body[]
9 changes: 9 additions & 0 deletions docs/src/man/man3/RTAPI_MP_ARRAY_STRING.3rtapi.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:manvolnum: 3

= RTAPI_MP_ARRAY_STRING(3rtapi)

== NAME

RTAPI_MP_ARRAY_STRING - Specifying module parameters

include::rtapi_module_param.3.body[]
9 changes: 9 additions & 0 deletions docs/src/man/man3/RTAPI_MP_INT.3rtapi.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:manvolnum: 3

= RTAPI_MP_INT(3rtapi)

== NAME

RTAPI_MP_INT - Specifying module parameters

include::rtapi_module_param.3.body[]
9 changes: 9 additions & 0 deletions docs/src/man/man3/RTAPI_MP_LONG.3rtapi.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:manvolnum: 3

= RTAPI_MP_LONG(3rtapi)

== NAME

RTAPI_MP_LONG - Specifying module parameters

include::rtapi_module_param.3.body[]
9 changes: 9 additions & 0 deletions docs/src/man/man3/RTAPI_MP_STRING.3rtapi.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:manvolnum: 3

= RTAPI_MP_STRING(3rtapi)

== NAME

RTAPI_MP_STRING - Specifying module parameters

include::rtapi_module_param.3.body[]
2 changes: 1 addition & 1 deletion docs/src/man/man3/hal_add_funct_to_thread.3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

== NAME

hal_add_funct_to_thread, hal_del_funct_from_thread - cause a function to be executed at regular intervals
hal_add_funct_to_thread - cause a function to be executed at regular intervals

== SYNTAX

Expand Down
9 changes: 9 additions & 0 deletions docs/src/man/man3/hal_bit_t.3.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:manvolnum: 3

= hal_bit_t(3hal)

== NAME

hal_bit_t - typedefs for HAL datatypes

include::hal_type_t.3.body[]
9 changes: 9 additions & 0 deletions docs/src/man/man3/hal_bool.3.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:manvolnum: 3

= hal_bool(3hal)

== NAME

hal_bool - typedefs for HAL datatypes

include::hal_type_t.3.body[]
51 changes: 51 additions & 0 deletions docs/src/man/man3/hal_del_funct_from_thread.3.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
:manvolnum: 3

= hal_del_funct_from_thread(3hal)

== NAME

hal_del_funct_from_thread - cause a function to be executed at regular intervals

== SYNTAX

int hal_add_funct_to_thread(const char *_funct_name_, const char
*_thread_name_, int position)

int hal_del_funct_from_thread(const char *_funct_name_, const char
*_thread_name_)

== ARGUMENTS

funct_name::
The name of the function.
thread_name::
The name of the thread.
position::
The desired location within the thread. This determines when the
function will run, in relation to other functions in the thread. A
positive number indicates the desired location as measured from the
beginning of the thread, and a negative is measured from the end. So
+1 means this function will become the first one to run, +5 means it
will be the fifth one to run, -2 means it will be next to last, and -1
means it will be last. Zero is illegal.

== DESCRIPTION

*hal_add_funct_to_thread* adds a function exported by a realtime HAL
component to a realtime thread. This determines how often and in what
order functions are executed.

*hal_del_funct_from_thread* removes a function from a thread.

== RETURN VALUE

Returns a HAL status code.

== REALTIME CONSIDERATIONS

Call only from realtime init code, not from other realtime or
non-realtime code.

== SEE ALSO

hal_thread_new(3hal), hal_export_funct(3hal)
2 changes: 1 addition & 1 deletion docs/src/man/man3/hal_export_funct.3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

== NAME

hal_export_funct, hal_export_functf - create a realtime function callable from a thread
hal_export_funct - create a realtime function callable from a thread

== SYNTAX

Expand Down
27 changes: 27 additions & 0 deletions docs/src/man/man3/hal_export_functf.3.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
:manvolnum: 3

= hal_export_functf(3hal)

== NAME

hal_export_functf - create a realtime function callable from a thread

== SYNTAX

int hal_export_funct(const char *name, void (*funct) (void *, long),
void *arg, int uses_fp, int reentrant, int comp_id);

== DESCRIPTION

*hal_export_functf* is similar to hal_export_funct except that it also does
printf-style formatting to compute the function name.
If successful, it returns 0.
On failure it returns a negative error code.

== RETURN VALUE

Returns a HAL status code.

== SEE ALSO

hal_export_funct(3hal)
23 changes: 23 additions & 0 deletions docs/src/man/man3/hal_get_lock.3.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
:manvolnum: 3

= hal_get_lock(3hal)

== NAME

hal_get_lock - Get the HAL lock level

== SYNTAX

int hal_get_lock()

== ARGUMENTS

lock_type::
The desired lock type, which may be a bitwise combination of:
*HAL_LOCK_LOAD*, *HAL_LOCK_CONFIG*, *HAL_LOCK_PARAMS*, or
*HAL_LOCK_PARAMS*. *HAL_LOCK_NONE* or 0 locks nothing, and
*HAL_LOCK_ALL locks everything.*

== RETURN VALUE

*hal_get_lock* returns the current HAL lock level or a HAL status code.
9 changes: 9 additions & 0 deletions docs/src/man/man3/hal_port_t.3.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:manvolnum: 3

= hal_port_t(3hal)

== NAME

hal_port_t - typedefs for HAL datatypes

include::hal_type_t.3.body[]
9 changes: 9 additions & 0 deletions docs/src/man/man3/hal_s32_t.3.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:manvolnum: 3

= hal_s32_t(3hal)

== NAME

hal_s32_t - typedefs for HAL datatypes

include::hal_type_t.3.body[]
7 changes: 2 additions & 5 deletions docs/src/man/man3/hal_set_lock.3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@

== NAME

hal_set_lock, hal_get_lock - Set or get the HAL lock level
hal_set_lock - Set the HAL lock level

== SYNTAX

int hal_set_lock(unsigned char _lock_type_)

int hal_get_lock()

== ARGUMENTS

lock_type::
Expand All @@ -22,5 +20,4 @@ lock_type::

== RETURN VALUE

*hal_set_lock* Returns a HAL status code. *hal_get_lock* returns the
current HAL lock level or a HAL status code.
*hal_set_lock* Returns a HAL status code.
Loading
Loading