[PATCH] man: use placeholders for man section number
evgeny litvinenko
evgeny.v.litvinenko at gmail.com
Sat Nov 7 06:03:16 PST 2015
xsltproc generates man pages with suffix 7
but Makefile.am uses MISC_MAN_SUFFIX which is defined as 5
in xorg-macros.m4 on Solaris.
This leads to the build error:
sed: can't read drm-mm.5: No such file or directory
Also Linux man section 7 corresponds to Solaris section 5.
---
man/Makefile.am | 9 ++++++---
man/drm-kms.xml | 10 +++++-----
man/drm-memory.xml | 32 ++++++++++++++++----------------
man/drm.xml | 10 +++++-----
man/drmAvailable.xml | 2 +-
man/drmHandleEvent.xml | 4 ++--
man/drmModeGetResources.xml | 4 ++--
7 files changed, 37 insertions(+), 34 deletions(-)
diff --git a/man/Makefile.am b/man/Makefile.am
index 00eb423..c5f0a35 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -53,10 +53,13 @@ XSLTPROC_PROCESS_MAN = \
$(miscman_aliases_DATA): $(miscman_DATA)
$(AM_V_GEN)if test -n "$@" ; then $(SED) -i -e 's/^\.so
\([a-z_]\+\)\.\([0-9]\)$$/\.so man\2\/\1\.\2/' "$@" ; fi
-SUFFIXES = .$(LIB_MAN_SUFFIX) .$(MISC_MAN_SUFFIX) .xml
+SUFFIXES = .$(LIB_MAN_SUFFIX) .$(MISC_MAN_SUFFIX) .xml .sed
-.xml.$(LIB_MAN_SUFFIX):
+.sed.$(LIB_MAN_SUFFIX):
$(XSLTPROC_PROCESS_MAN)
-.xml.$(MISC_MAN_SUFFIX):
+.sed.$(MISC_MAN_SUFFIX):
$(XSLTPROC_PROCESS_MAN)
+
+.xml.sed:
+ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < "$<" > "$@"
diff --git a/man/drm-kms.xml b/man/drm-kms.xml
index 5f04157..f26d119 100644
--- a/man/drm-kms.xml
+++ b/man/drm-kms.xml
@@ -24,7 +24,7 @@
<refmeta>
<refentrytitle>drm-kms</refentrytitle>
- <manvolnum>7</manvolnum>
+ <manvolnum>__miscmansuffix__</manvolnum>
</refmeta>
<refnamediv>
@@ -133,7 +133,7 @@
through the API which is used as backing storage. The
framebuffer itself is only an abstract object with
no data. It
just refers to memory buffers that must be created with the
-
<citerefentry><refentrytitle>drm-memory</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+
<citerefentry><refentrytitle>drm-memory</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>
API.</para>
</listitem>
</varlistentry>
@@ -176,7 +176,7 @@
<para>After you have a working connector+CRTC+mode combination, you need
to create a framebuffer that is used for scanout. Memory buffer
allocation is driver-depedent and described in
- <citerefentry><refentrytitle>drm-memory</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
+ <citerefentry><refentrytitle>drm-memory</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>.
You need to create a buffer big enough for your selected mode. Now
you can create a framebuffer object that uses your memory-buffer as
scanout buffer. You can do this with
@@ -316,8 +316,8 @@ static int modeset_find_crtc(int fd, drmModeRes
*res, drmModeConnector *conn)
<refsect1>
<title>See Also</title>
<para>
- <citerefentry><refentrytitle>drm</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>drm-memory</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>drm</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>drm-memory</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>,
<citerefentry><refentrytitle>drmModeGetResources</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>drmModeGetConnector</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>drmModeGetEncoder</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
diff --git a/man/drm-memory.xml b/man/drm-memory.xml
index 6b4f075..2a91903 100644
--- a/man/drm-memory.xml
+++ b/man/drm-memory.xml
@@ -24,7 +24,7 @@
<refmeta>
<refentrytitle>drm-memory</refentrytitle>
- <manvolnum>7</manvolnum>
+ <manvolnum>__miscmansuffix__</manvolnum>
</refmeta>
<refnamediv>
@@ -214,7 +214,7 @@ struct drm_mode_destroy_dumb {
<para>Objects are referenced from user-space using handles.
These are, for
all intents and purposes, equivalent to file descriptors but avoid
the overhead. Newer kernel drivers also support the
- <citerefentry><refentrytitle>drm-prime</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>drm-prime</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>
infrastructure which can return real file-descriptor for
gem-handles
using the linux dma-buf API. Objects may be published
with a name so
that other applications and processes can access them. The name
@@ -235,9 +235,9 @@ struct drm_mode_destroy_dumb {
use-cases including scanout, rendering, cursors and CPU-access. See
the libgbm library for more information or look at the
driver-dependent man-pages (for example
- <citerefentry><refentrytitle>drm-intel</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>drm-intel</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>
or
- <citerefentry><refentrytitle>drm-radeon</refentrytitle><manvolnum>7</manvolnum></citerefentry>).</para>
+ <citerefentry><refentrytitle>drm-radeon</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>).</para>
<para>Gem-buffers can be closed with the
<constant>DRM_IOCTL_GEM_CLOSE</constant> ioctl. It takes
as argument
@@ -266,7 +266,7 @@ struct drm_gem_close {
to the current DRM-Master, can <emphasis>guess</emphasis> the name
and open or access the gem-object. If you want more fine-grained
access control, you can use the new
- <citerefentry><refentrytitle>drm-prime</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>drm-prime</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>
API to retrieve file-descriptors for gem-handles. To create a name
for a gem-handle, you use the
<constant>DRM_IOCTL_GEM_FLINK</constant> ioctl. It takes
as argument
@@ -322,12 +322,12 @@ struct drm_gem_open {
OpenGL so it is not provided. But if you need more detailed
information for a specific driver, you may have a look into the
driver-manpages, including
- <citerefentry><refentrytitle>drm-intel</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>drm-radeon</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>drm-intel</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>drm-radeon</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>
and
- <citerefentry><refentrytitle>drm-nouveau</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
+ <citerefentry><refentrytitle>drm-nouveau</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>.
However, the
- <citerefentry><refentrytitle>drm-prime</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>drm-prime</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>
infrastructure and the generic gem API as described here allow
display-managers to handle graphics-buffers and render-clients
without any deeper knowledge of the GPU that is used. Moreover, it
@@ -351,7 +351,7 @@ struct drm_gem_open {
buffer with 32 bits-per-pixel and a color-depth of 24 bits. The
buffer is then bound to a framebuffer which can be used for
scanout with the KMS API (see
- <citerefentry><refentrytitle>drm-kms</refentrytitle><manvolnum>7</manvolnum></citerefentry>).</para>
+ <citerefentry><refentrytitle>drm-kms</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>).</para>
<programlisting>
struct drm_mode_create_dumb creq;
@@ -417,14 +417,14 @@ memset(map, 0, creq.size);
<refsect1>
<title>See Also</title>
<para>
- <citerefentry><refentrytitle>drm</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>drm-kms</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>drm-prime</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>drm</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>drm-kms</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>drm-prime</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>,
<citerefentry><refentrytitle>drmAvailable</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>drmOpen</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>drm-intel</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>drm-radeon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>drm-nouveau</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>drm-intel</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>drm-radeon</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>drm-nouveau</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>
diff --git a/man/drm.xml b/man/drm.xml
index 5a49fe1..afa15b8 100644
--- a/man/drm.xml
+++ b/man/drm.xml
@@ -24,7 +24,7 @@
<refmeta>
<refentrytitle>drm</refentrytitle>
- <manvolnum>7</manvolnum>
+ <manvolnum>__miscmansuffix__</manvolnum>
</refmeta>
<refnamediv>
@@ -91,7 +91,7 @@
hardware-driver supports it, you can use the KMS API provided by
DRM. This includes allocating framebuffers, selecting modes and
managing CRTCs and encoders. See
- <citerefentry><refentrytitle>drm-kms</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>drm-kms</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>
for more.</para>
</refsect2>
@@ -112,7 +112,7 @@
<emphasis>libgbm</emphasis> (Graphics Buffer Manager) from the
<emphasis>mesa-project</emphasis>. For more information on DRM
memory-management, see
- <citerefentry><refentrytitle>drm-memory</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
+ <citerefentry><refentrytitle>drm-memory</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>.</para>
</refsect2>
</refsect1>
@@ -126,8 +126,8 @@
<refsect1>
<title>See Also</title>
<para>
- <citerefentry><refentrytitle>drm-kms</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>drm-memory</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>drm-kms</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>drm-memory</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>,
<citerefentry><refentrytitle>drmSetMaster</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>drmAuthMagic</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>drmAvailable</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
diff --git a/man/drmAvailable.xml b/man/drmAvailable.xml
index 55bef94..15ee165 100644
--- a/man/drmAvailable.xml
+++ b/man/drmAvailable.xml
@@ -68,7 +68,7 @@
<refsect1>
<title>See Also</title>
<para>
- <citerefentry><refentrytitle>drm</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>drm</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>,
<citerefentry><refentrytitle>drmOpen</refentrytitle><manvolnum>3</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/man/drmHandleEvent.xml b/man/drmHandleEvent.xml
index b1006e5..e6dc0e2 100644
--- a/man/drmHandleEvent.xml
+++ b/man/drmHandleEvent.xml
@@ -93,8 +93,8 @@ typedef struct _drmEventContext {
<refsect1>
<title>See Also</title>
<para>
- <citerefentry><refentrytitle>drm</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>drm-kms</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>drm</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>drm-kms</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>,
<citerefentry><refentrytitle>drmModePageFlip</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>drmWaitVBlank</refentrytitle><manvolnum>3</manvolnum></citerefentry>
</para>
diff --git a/man/drmModeGetResources.xml b/man/drmModeGetResources.xml
index 2f5e8c2..b4cf770 100644
--- a/man/drmModeGetResources.xml
+++ b/man/drmModeGetResources.xml
@@ -123,8 +123,8 @@ typedef struct _drmModeRes {
<refsect1>
<title>See Also</title>
<para>
- <citerefentry><refentrytitle>drm</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>drm-kms</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>drm</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>drm-kms</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>,
<citerefentry><refentrytitle>drmModeGetFB</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>drmModeAddFB</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>drmModeAddFB2</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
--
2.6.1.121.g99f6436
More information about the dri-devel
mailing list