mirror of
https://github.com/SwallowOS/xorg_lib_libxtrans
synced 2025-11-06 07:01:51 +08:00
doc: use new macros XORG_WITH_GROFF and PS2PDF
These control the usage of doc tools Also use XORG_ENABLE_DOCS to control generation of docs Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
This commit is contained in:
8
.gitignore
vendored
8
.gitignore
vendored
@@ -71,8 +71,14 @@ core
|
|||||||
*.tar.bz2
|
*.tar.bz2
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
#
|
#
|
||||||
# Add & Override patterns for libxtrans
|
# Add & Override patterns for libxtrans
|
||||||
#
|
#
|
||||||
# Edit the following section as needed
|
# Edit the following section as needed
|
||||||
# For example, !report.pc overrides *.pc. See 'man gitignore'
|
# For example, !report.pc overrides *.pc. See 'man gitignore'
|
||||||
#
|
#
|
||||||
|
Xtrans.html
|
||||||
|
Xtrans.pdf
|
||||||
|
Xtrans.txt
|
||||||
|
index.Xtrans.html.raw
|
||||||
|
index.Xtrans.ps.raw
|
||||||
|
index.Xtrans.txt.raw
|
||||||
|
|||||||
@@ -32,13 +32,15 @@ dist-hook: ChangeLog INSTALL
|
|||||||
# Rules to convert documentation from troff to other formats
|
# Rules to convert documentation from troff to other formats
|
||||||
doc_sources = Xtrans.mm
|
doc_sources = Xtrans.mm
|
||||||
|
|
||||||
|
if ENABLE_DOCS
|
||||||
|
if HAVE_GROFF
|
||||||
|
|
||||||
if HAVE_PS2PDF
|
if HAVE_PS2PDF
|
||||||
printable_format = .pdf
|
printable_format = .pdf
|
||||||
else
|
else
|
||||||
printable_format = .ps
|
printable_format = .ps
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if BUILD_DOCS
|
|
||||||
doc_DATA = $(doc_sources:.mm=.txt) \
|
doc_DATA = $(doc_sources:.mm=.txt) \
|
||||||
$(doc_sources:.mm=$(printable_format)) \
|
$(doc_sources:.mm=$(printable_format)) \
|
||||||
$(doc_sources:.mm=.html)
|
$(doc_sources:.mm=.html)
|
||||||
@@ -69,4 +71,5 @@ SUFFIXES = .mm .ps .txt .html .pdf
|
|||||||
.ps.pdf:
|
.ps.pdf:
|
||||||
$(AM_V_GEN) $(PS2PDF) $< $@
|
$(AM_V_GEN) $(PS2PDF) $< $@
|
||||||
|
|
||||||
endif BUILD_DOCS
|
endif HAVE_GROFF
|
||||||
|
endif ENABLE_DOCS
|
||||||
|
|||||||
25
configure.ac
25
configure.ac
@@ -25,11 +25,14 @@ AC_INIT(xtrans, [1.2.5], [https://bugs.freedesktop.org/enter_bug.cgi?product=xor
|
|||||||
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
# Require xorg-macros 1.3 or later: XORG_DEFAULT_OPTIONS
|
# Require xorg-macrosr: XORG_DEFAULT_OPTIONS
|
||||||
m4_ifndef([XORG_MACROS_VERSION],
|
m4_ifndef([XORG_MACROS_VERSION],
|
||||||
[m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
|
[m4_fatal([must install xorg-macros 1.6 or later before running autoconf/autogen])])
|
||||||
XORG_MACROS_VERSION(1.3)
|
XORG_MACROS_VERSION(1.6)
|
||||||
XORG_DEFAULT_OPTIONS
|
XORG_DEFAULT_OPTIONS
|
||||||
|
XORG_ENABLE_DOCS
|
||||||
|
XORG_WITH_GROFF
|
||||||
|
XORG_WITH_PS2PDF
|
||||||
|
|
||||||
# Because xtrans is included into other modules rather than being linked
|
# Because xtrans is included into other modules rather than being linked
|
||||||
# with, these defines have to be added to the cflags line
|
# with, these defines have to be added to the cflags line
|
||||||
@@ -49,21 +52,5 @@ sticky_bit_define="-DHAS_STICKY_DIR_BIT"
|
|||||||
|
|
||||||
AC_SUBST(sticky_bit_define)
|
AC_SUBST(sticky_bit_define)
|
||||||
|
|
||||||
# Documentation is currently provided in troff format, built on request
|
|
||||||
AC_PATH_PROGS([GROFF], [groff], [none], [$PATH:/usr/gnu/bin])
|
|
||||||
AC_PATH_PROGS([PS2PDF], [ps2pdf], [none], [$PATH:/usr/gnu/bin])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to build documentation])
|
|
||||||
AC_ARG_ENABLE(docs, AC_HELP_STRING([--enable-docs],
|
|
||||||
[Enable building of documentation]),
|
|
||||||
[build_docs="${enableval}"], [build_docs="no"])
|
|
||||||
AC_MSG_RESULT([${build_docs}])
|
|
||||||
if test "x${build_docs}" = xyes && test "x${GROFF}" = xnone ; then
|
|
||||||
AC_MSG_ERROR([can't build documentation without groff])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AM_CONDITIONAL(BUILD_DOCS, [test x$build_docs = xyes])
|
|
||||||
AM_CONDITIONAL(HAVE_PS2PDF, [test x$PS2PDF != xnone])
|
|
||||||
|
|
||||||
AC_OUTPUT([Makefile
|
AC_OUTPUT([Makefile
|
||||||
xtrans.pc])
|
xtrans.pc])
|
||||||
|
|||||||
Reference in New Issue
Block a user