doc/man: put AsciiDoc attributes in their own file
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 17 May 2016 23:30:39 +0000 (19:30 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 May 2016 05:05:02 +0000 (01:05 -0400)
This facilitates the generation of man pages using another
asciidoc.conf file, but keeping the same attributes, without
having to split the generated configuration file.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
.gitignore
configure.ac
doc/man/Makefile.am
doc/man/asciidoc-attrs.conf.in [new file with mode: 0644]
doc/man/asciidoc.conf [new file with mode: 0644]
doc/man/asciidoc.conf.in [deleted file]

index f9fd809e28dc8c5e83c14113c42e9d7a247cde89..ac78292e8cc1cd5ad8186bc1498f734048a8b3d7 100644 (file)
@@ -113,7 +113,7 @@ tests/regression/ust/python-logging/test_python_logging
 /doc/man/*.8
 /doc/man/*.xml
 /doc/man/*.html
-/doc/man/asciidoc.conf
+/doc/man/asciidoc-attrs.conf
 !/doc/man/lttng-health-check.3
 
 /benchmark/
index ddb294b218ba09c1b11ae17d2112b646da06e279..c94da7adc32c46308df2fd01e28fd94f5a6aff8e 100644 (file)
@@ -931,7 +931,7 @@ AC_CONFIG_FILES([
        Makefile
        doc/Makefile
        doc/man/Makefile
-       doc/man/asciidoc.conf
+       doc/man/asciidoc-attrs.conf
        include/Makefile
        extras/Makefile
        extras/bindings/Makefile
index 22f569c5c0e5d5355fc10ec4e96421cb15bcba25..860c8be209a2fff01034c4a90578fd1c6bc405e3 100644 (file)
@@ -53,6 +53,7 @@ COMMON_TXT = \
 
 # config
 ASCIIDOC_CONF = $(builddir)/asciidoc.conf
+ASCIIDOC_ATTRS_CONF = $(builddir)/asciidoc-attrs.conf
 XSL_FILES = \
        manpage.xsl \
        manpage-callouts.xsl \
@@ -76,7 +77,7 @@ if MAN_PAGES_OPT
 # at this point, we know the user asked to build the man pages
 if HAVE_ASCIIDOC_XMLTO
 # tools
-ADOC = $(ASCIIDOC) -f $(ASCIIDOC_CONF) -d manpage
+ADOC = $(ASCIIDOC) -f $(ASCIIDOC_CONF) -f $(ASCIIDOC_ATTRS_CONF) -d manpage
 ADOC_DOCBOOK = $(ADOC) -b docbook
 XTO = $(XMLTO) -m $(firstword $(XSL_SRC_FILES)) man
 
@@ -140,4 +141,5 @@ dist-hook:
 endif # !MAN_PAGES_OPT
 
 # always distribute the source files
-EXTRA_DIST = $(MAN_TXT) $(COMMON_TXT) $(XSL_SRC_FILES) $(ASCIIDOC_CONF).in
+EXTRA_DIST = $(MAN_TXT) $(COMMON_TXT) $(XSL_SRC_FILES) \
+       $(ASCIIDOC_CONF) $(ASCIIDOC_ATTRS_CONF).in
diff --git a/doc/man/asciidoc-attrs.conf.in b/doc/man/asciidoc-attrs.conf.in
new file mode 100644 (file)
index 0000000..83f59cd
--- /dev/null
@@ -0,0 +1,63 @@
+[attributes]
+# default values
+default_agent_tcp_port="@DEFAULT_AGENT_TCP_PORT@"
+default_app_socket_rw_timeout="@DEFAULT_APP_SOCKET_RW_TIMEOUT@"
+default_channel_subbuf_size="@DEFAULT_CHANNEL_SUBBUF_SIZE@"
+default_channel_tracefile_count="@DEFAULT_CHANNEL_TRACEFILE_COUNT@"
+default_channel_tracefile_size="@DEFAULT_CHANNEL_TRACEFILE_SIZE@"
+default_kernel_channel_live_timer="@DEFAULT_KERNEL_CHANNEL_LIVE_TIMER@"
+default_kernel_channel_read_timer="@DEFAULT_KERNEL_CHANNEL_READ_TIMER@"
+default_kernel_channel_subbuf_num="@DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM@"
+default_kernel_channel_subbuf_size="@DEFAULT_KERNEL_CHANNEL_SUBBUF_SIZE@"
+default_kernel_channel_switch_timer="@DEFAULT_KERNEL_CHANNEL_SWITCH_TIMER@"
+default_lttng_live_timer="@DEFAULT_LTTNG_LIVE_TIMER@"
+default_metadata_cache_size="@DEFAULT_METADATA_CACHE_SIZE@"
+default_metadata_read_timer="@DEFAULT_METADATA_READ_TIMER@"
+default_metadata_subbuf_num="@DEFAULT_METADATA_SUBBUF_NUM@"
+default_metadata_subbuf_size="@DEFAULT_METADATA_SUBBUF_SIZE@"
+default_metadata_switch_timer="@DEFAULT_METADATA_SWITCH_TIMER@"
+default_network_control_port="@DEFAULT_NETWORK_CONTROL_PORT@"
+default_network_data_port="@DEFAULT_NETWORK_DATA_PORT@"
+default_network_viewer_port="@DEFAULT_NETWORK_VIEWER_PORT@"
+default_ust_pid_channel_live_timer="@DEFAULT_UST_PID_CHANNEL_LIVE_TIMER@"
+default_ust_pid_channel_read_timer="@DEFAULT_UST_PID_CHANNEL_READ_TIMER@"
+default_ust_pid_channel_subbuf_num="@DEFAULT_UST_PID_CHANNEL_SUBBUF_NUM@"
+default_ust_pid_channel_subbuf_size="@DEFAULT_UST_PID_CHANNEL_SUBBUF_SIZE@"
+default_ust_pid_channel_switch_timer="@DEFAULT_UST_PID_CHANNEL_SWITCH_TIMER@"
+default_ust_uid_channel_live_timer="@DEFAULT_UST_UID_CHANNEL_LIVE_TIMER@"
+default_ust_uid_channel_read_timer="@DEFAULT_UST_UID_CHANNEL_READ_TIMER@"
+default_ust_uid_channel_subbuf_num="@DEFAULT_UST_UID_CHANNEL_SUBBUF_NUM@"
+default_ust_uid_channel_subbuf_size="@DEFAULT_UST_UID_CHANNEL_SUBBUF_SIZE@"
+default_ust_uid_channel_switch_timer="@DEFAULT_UST_UID_CHANNEL_SWITCH_TIMER@"
+default_agent_bind_address="@DEFAULT_AGENT_BIND_ADDRESS@"
+default_network_control_bind_address="@DEFAULT_NETWORK_CONTROL_BIND_ADDRESS@"
+default_network_data_bind_address="@DEFAULT_NETWORK_DATA_BIND_ADDRESS@"
+default_network_viewer_bind_address="@DEFAULT_NETWORK_VIEWER_BIND_ADDRESS@"
+lttng_version="@PACKAGE_VERSION@"
+system_sessions_dir="@CONFDIR@/lttng/sessions"
+system_sessions_auto_dir="@CONFDIR@/lttng/sessions/auto"
+system_lttng_conf="@CONFDIR@/lttng/lttng.conf"
+
+# command short descriptions
+cmd_descr_add_context="@CMD_DESCR_ADD_CONTEXT@"
+cmd_descr_calibrate="@CMD_DESCR_CALIBRATE@"
+cmd_descr_create="@CMD_DESCR_CREATE@"
+cmd_descr_destroy="@CMD_DESCR_DESTROY@"
+cmd_descr_disable_channel="@CMD_DESCR_DISABLE_CHANNEL@"
+cmd_descr_disable_event="@CMD_DESCR_DISABLE_EVENT@"
+cmd_descr_enable_channel="@CMD_DESCR_ENABLE_CHANNEL@"
+cmd_descr_enable_event="@CMD_DESCR_ENABLE_EVENT@"
+cmd_descr_help="@CMD_DESCR_HELP@"
+cmd_descr_list="@CMD_DESCR_LIST@"
+cmd_descr_load="@CMD_DESCR_LOAD@"
+cmd_descr_metadata="@CMD_DESCR_METADATA@"
+cmd_descr_save="@CMD_DESCR_SAVE@"
+cmd_descr_set_session="@CMD_DESCR_SET_SESSION@"
+cmd_descr_snapshot="@CMD_DESCR_SNAPSHOT@"
+cmd_descr_start="@CMD_DESCR_START@"
+cmd_descr_status="@CMD_DESCR_STATUS@"
+cmd_descr_stop="@CMD_DESCR_STOP@"
+cmd_descr_track="@CMD_DESCR_TRACK@"
+cmd_descr_untrack="@CMD_DESCR_UNTRACK@"
+cmd_descr_version="@CMD_DESCR_VERSION@"
+cmd_descr_view="@CMD_DESCR_VIEW@"
diff --git a/doc/man/asciidoc.conf b/doc/man/asciidoc.conf
new file mode 100644 (file)
index 0000000..70bd7d6
--- /dev/null
@@ -0,0 +1,118 @@
+[macros]
+
+# man macro
+#
+# Inspired by linkgit macro:
+# <https://github.com/git/git/blob/master/Documentation/asciidoc.conf>
+#
+# Usage: man:command(manpage-section)
+(?su)[\\]?(?P<name>man):(?P<target>\S*?)\((?P<attrlist>.*?)\)=
+
+# linkgenoptions macro
+#
+# Usage: linkgenoptions:(text)
+(?su)[\\]?(?P<name>linkgenoptions):\((?P<text>.*?)\)=
+
+# no link option macro
+#
+# Usage: nloption:--option-name
+(?su)[\\]?(?P<name>nloption):(?P<opt>--?[a-zA-Z0-9-]*)=
+
+# lttng(1) general option macro
+#
+# Usage: genoption:--option-name
+(?su)[\\]?(?P<name>genoption):(?P<opt>--?[a-zA-Z0-9-]*)=
+
+# option macro
+#
+# Usage: option:--option-name
+(?su)[\\]?(?P<name>option):(?P<opt>--?[a-zA-Z0-9-]*)=
+
+# not macro
+#
+# Usage: :not:
+:not:=not
+
+# escwc macro
+#
+# Usage: :escwc:
+:escwc:=escwc
+
+# man macro expansions
+ifdef::doctype-manpage[]
+ifdef::backend-docbook[]
+[man-inlinemacro]
+{0%{target}}
+{0#<citerefentry>}
+{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
+{0#</citerefentry>}
+endif::backend-docbook[]
+endif::doctype-manpage[]
+
+# linkgenoptions macro expansions
+ifdef::doctype-manpage[]
+ifdef::backend-docbook[]
+[linkgenoptions-inlinemacro]
+{text}
+endif::backend-docbook[]
+endif::doctype-manpage[]
+
+# option macro expansions
+ifdef::doctype-manpage[]
+ifdef::backend-docbook[]
+[option-inlinemacro]
+<literal>{opt}</literal>
+endif::backend-docbook[]
+endif::doctype-manpage[]
+
+# no link option macro expansions
+ifdef::doctype-manpage[]
+ifdef::backend-docbook[]
+[nloption-inlinemacro]
+<literal>{opt}</literal>
+endif::backend-docbook[]
+endif::doctype-manpage[]
+
+# lttng(1) general option macro expansions
+ifdef::doctype-manpage[]
+ifdef::backend-docbook[]
+[genoption-inlinemacro]
+<literal>{opt}</literal>
+endif::backend-docbook[]
+endif::doctype-manpage[]
+
+# not macro expansions
+ifdef::doctype-manpage[]
+ifdef::backend-docbook[]
+[not-inlinemacro]
+NOT
+endif::backend-docbook[]
+endif::doctype-manpage[]
+
+# escwc macro expansions
+ifdef::doctype-manpage[]
+ifdef::backend-docbook[]
+[escwc-inlinemacro]
+<literal>\e*</literal>
+endif::backend-docbook[]
+endif::doctype-manpage[]
+
+# configure XML man page header
+ifdef::doctype-manpage[]
+ifdef::backend-docbook[]
+[header]
+template::[header-declarations]
+<refentry>
+<refmeta>
+<refentrytitle>{mantitle}</refentrytitle>
+<manvolnum>{manvolnum}</manvolnum>
+<refmiscinfo class="source">LTTng</refmiscinfo>
+<refmiscinfo class="version">{lttng_version}</refmiscinfo>
+<refmiscinfo class="manual">LTTng Manual</refmiscinfo>
+</refmeta>
+<refnamediv>
+  <refname>{manname}</refname>
+  <refpurpose>{manpurpose}</refpurpose>
+</refnamediv>
+endif::backend-docbook[]
+endif::doctype-manpage[]
diff --git a/doc/man/asciidoc.conf.in b/doc/man/asciidoc.conf.in
deleted file mode 100644 (file)
index 3da5ac8..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-[macros]
-
-# man macro
-#
-# Inspired by linkgit macro:
-# <https://github.com/git/git/blob/master/Documentation/asciidoc.conf>
-#
-# Usage: man:command(manpage-section)
-(?su)[\\]?(?P<name>man):(?P<target>\S*?)\((?P<attrlist>.*?)\)=
-
-# linkgenoptions macro
-#
-# Usage: linkgenoptions:(text)
-(?su)[\\]?(?P<name>linkgenoptions):\((?P<text>.*?)\)=
-
-# no link option macro
-#
-# Usage: nloption:--option-name
-(?su)[\\]?(?P<name>nloption):(?P<opt>--?[a-zA-Z0-9-]*)=
-
-# lttng(1) general option macro
-#
-# Usage: genoption:--option-name
-(?su)[\\]?(?P<name>genoption):(?P<opt>--?[a-zA-Z0-9-]*)=
-
-# option macro
-#
-# Usage: option:--option-name
-(?su)[\\]?(?P<name>option):(?P<opt>--?[a-zA-Z0-9-]*)=
-
-# not macro
-#
-# Usage: :not:
-:not:=not
-
-# escwc macro
-#
-# Usage: :escwc:
-:escwc:=escwc
-
-# man macro expansions
-ifdef::doctype-manpage[]
-ifdef::backend-docbook[]
-[man-inlinemacro]
-{0%{target}}
-{0#<citerefentry>}
-{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
-{0#</citerefentry>}
-endif::backend-docbook[]
-endif::doctype-manpage[]
-
-# linkgenoptions macro expansions
-ifdef::doctype-manpage[]
-ifdef::backend-docbook[]
-[linkgenoptions-inlinemacro]
-{text}
-endif::backend-docbook[]
-endif::doctype-manpage[]
-
-# option macro expansions
-ifdef::doctype-manpage[]
-ifdef::backend-docbook[]
-[option-inlinemacro]
-<literal>{opt}</literal>
-endif::backend-docbook[]
-endif::doctype-manpage[]
-
-# no link option macro expansions
-ifdef::doctype-manpage[]
-ifdef::backend-docbook[]
-[nloption-inlinemacro]
-<literal>{opt}</literal>
-endif::backend-docbook[]
-endif::doctype-manpage[]
-
-# lttng(1) general option macro expansions
-ifdef::doctype-manpage[]
-ifdef::backend-docbook[]
-[genoption-inlinemacro]
-<literal>{opt}</literal>
-endif::backend-docbook[]
-endif::doctype-manpage[]
-
-# not macro expansions
-ifdef::doctype-manpage[]
-ifdef::backend-docbook[]
-[not-inlinemacro]
-NOT
-endif::backend-docbook[]
-endif::doctype-manpage[]
-
-# escwc macro expansions
-ifdef::doctype-manpage[]
-ifdef::backend-docbook[]
-[escwc-inlinemacro]
-<literal>\e*</literal>
-endif::backend-docbook[]
-endif::doctype-manpage[]
-
-# configure XML man page header
-ifdef::doctype-manpage[]
-ifdef::backend-docbook[]
-[header]
-template::[header-declarations]
-<refentry>
-<refmeta>
-<refentrytitle>{mantitle}</refentrytitle>
-<manvolnum>{manvolnum}</manvolnum>
-<refmiscinfo class="source">LTTng</refmiscinfo>
-<refmiscinfo class="version">{lttng_version}</refmiscinfo>
-<refmiscinfo class="manual">LTTng Manual</refmiscinfo>
-</refmeta>
-<refnamediv>
-  <refname>{manname}</refname>
-  <refpurpose>{manpurpose}</refpurpose>
-</refnamediv>
-endif::backend-docbook[]
-endif::doctype-manpage[]
-
-[attributes]
-# default values
-default_agent_tcp_port="@DEFAULT_AGENT_TCP_PORT@"
-default_app_socket_rw_timeout="@DEFAULT_APP_SOCKET_RW_TIMEOUT@"
-default_channel_subbuf_size="@DEFAULT_CHANNEL_SUBBUF_SIZE@"
-default_channel_tracefile_count="@DEFAULT_CHANNEL_TRACEFILE_COUNT@"
-default_channel_tracefile_size="@DEFAULT_CHANNEL_TRACEFILE_SIZE@"
-default_kernel_channel_live_timer="@DEFAULT_KERNEL_CHANNEL_LIVE_TIMER@"
-default_kernel_channel_read_timer="@DEFAULT_KERNEL_CHANNEL_READ_TIMER@"
-default_kernel_channel_subbuf_num="@DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM@"
-default_kernel_channel_subbuf_size="@DEFAULT_KERNEL_CHANNEL_SUBBUF_SIZE@"
-default_kernel_channel_switch_timer="@DEFAULT_KERNEL_CHANNEL_SWITCH_TIMER@"
-default_lttng_live_timer="@DEFAULT_LTTNG_LIVE_TIMER@"
-default_metadata_cache_size="@DEFAULT_METADATA_CACHE_SIZE@"
-default_metadata_read_timer="@DEFAULT_METADATA_READ_TIMER@"
-default_metadata_subbuf_num="@DEFAULT_METADATA_SUBBUF_NUM@"
-default_metadata_subbuf_size="@DEFAULT_METADATA_SUBBUF_SIZE@"
-default_metadata_switch_timer="@DEFAULT_METADATA_SWITCH_TIMER@"
-default_network_control_port="@DEFAULT_NETWORK_CONTROL_PORT@"
-default_network_data_port="@DEFAULT_NETWORK_DATA_PORT@"
-default_network_viewer_port="@DEFAULT_NETWORK_VIEWER_PORT@"
-default_ust_pid_channel_live_timer="@DEFAULT_UST_PID_CHANNEL_LIVE_TIMER@"
-default_ust_pid_channel_read_timer="@DEFAULT_UST_PID_CHANNEL_READ_TIMER@"
-default_ust_pid_channel_subbuf_num="@DEFAULT_UST_PID_CHANNEL_SUBBUF_NUM@"
-default_ust_pid_channel_subbuf_size="@DEFAULT_UST_PID_CHANNEL_SUBBUF_SIZE@"
-default_ust_pid_channel_switch_timer="@DEFAULT_UST_PID_CHANNEL_SWITCH_TIMER@"
-default_ust_uid_channel_live_timer="@DEFAULT_UST_UID_CHANNEL_LIVE_TIMER@"
-default_ust_uid_channel_read_timer="@DEFAULT_UST_UID_CHANNEL_READ_TIMER@"
-default_ust_uid_channel_subbuf_num="@DEFAULT_UST_UID_CHANNEL_SUBBUF_NUM@"
-default_ust_uid_channel_subbuf_size="@DEFAULT_UST_UID_CHANNEL_SUBBUF_SIZE@"
-default_ust_uid_channel_switch_timer="@DEFAULT_UST_UID_CHANNEL_SWITCH_TIMER@"
-default_agent_bind_address="@DEFAULT_AGENT_BIND_ADDRESS@"
-default_network_control_bind_address="@DEFAULT_NETWORK_CONTROL_BIND_ADDRESS@"
-default_network_data_bind_address="@DEFAULT_NETWORK_DATA_BIND_ADDRESS@"
-default_network_viewer_bind_address="@DEFAULT_NETWORK_VIEWER_BIND_ADDRESS@"
-lttng_version="@PACKAGE_VERSION@"
-system_sessions_dir="@CONFDIR@/lttng/sessions"
-system_sessions_auto_dir="@CONFDIR@/lttng/sessions/auto"
-system_lttng_conf="@CONFDIR@/lttng/lttng.conf"
-
-# command short descriptions
-cmd_descr_add_context="@CMD_DESCR_ADD_CONTEXT@"
-cmd_descr_calibrate="@CMD_DESCR_CALIBRATE@"
-cmd_descr_create="@CMD_DESCR_CREATE@"
-cmd_descr_destroy="@CMD_DESCR_DESTROY@"
-cmd_descr_disable_channel="@CMD_DESCR_DISABLE_CHANNEL@"
-cmd_descr_disable_event="@CMD_DESCR_DISABLE_EVENT@"
-cmd_descr_enable_channel="@CMD_DESCR_ENABLE_CHANNEL@"
-cmd_descr_enable_event="@CMD_DESCR_ENABLE_EVENT@"
-cmd_descr_help="@CMD_DESCR_HELP@"
-cmd_descr_list="@CMD_DESCR_LIST@"
-cmd_descr_load="@CMD_DESCR_LOAD@"
-cmd_descr_metadata="@CMD_DESCR_METADATA@"
-cmd_descr_save="@CMD_DESCR_SAVE@"
-cmd_descr_set_session="@CMD_DESCR_SET_SESSION@"
-cmd_descr_snapshot="@CMD_DESCR_SNAPSHOT@"
-cmd_descr_start="@CMD_DESCR_START@"
-cmd_descr_status="@CMD_DESCR_STATUS@"
-cmd_descr_stop="@CMD_DESCR_STOP@"
-cmd_descr_track="@CMD_DESCR_TRACK@"
-cmd_descr_untrack="@CMD_DESCR_UNTRACK@"
-cmd_descr_version="@CMD_DESCR_VERSION@"
-cmd_descr_view="@CMD_DESCR_VIEW@"
This page took 0.043404 seconds and 4 git commands to generate.