mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
Added a configure test for xsltproc and DocBook. Added make rules for converting DocBook XML to man pages.
This commit is contained in:
parent
44ebd545f0
commit
57c158cab7
27
Makefile.in
27
Makefile.in
@ -40,6 +40,7 @@ CPP = @CPP@
|
||||
CXX = @CXX@
|
||||
ETAGS = @ETAGS@
|
||||
EXEEXT = @EXEEXT@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
INSTALL = @INSTALL@
|
||||
@ -63,6 +64,8 @@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
|
||||
BOOST_LDFLAGS = @BOOST_LDFLAGS@
|
||||
BOOST_REGEX_LIB = @BOOST_REGEX_LIB@
|
||||
DEBUG_CFLAGS = @DEBUG_CFLAGS@
|
||||
DOCBOOK_MANPAGES_STYLESHEET = @DOCBOOK_MANPAGES_STYLESHEET@
|
||||
DOCBOOK_ROOT = @DOCBOOK_ROOT@
|
||||
EBML_CFLAGS = @EBML_CFLAGS@
|
||||
EBML_LIBS = @EBML_LIBS@
|
||||
EXPAT_CFLAGS = @EXPAT_CFLAGS@
|
||||
@ -94,6 +97,9 @@ VORBIS_LIBS = @VORBIS_LIBS@
|
||||
WXWIDGETS_CFLAGS = @WXWIDGETS_CFLAGS@
|
||||
WXWIDGETS_INCLUDES = @WXWIDGETS_INCLUDES@
|
||||
WXWIDGETS_LIBS = @WXWIDGETS_LIBS@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
|
||||
XSLTPROC_WORKS = @XSLTPROC_WORKS@
|
||||
ZLIB_LIBS = @ZLIB_LIBS@
|
||||
|
||||
WARNING_CFLAGS = -Wall -Wno-sign-compare -Wno-comment
|
||||
@ -152,10 +158,10 @@ DEP_MPEGPARSER = src/mpegparser/libmpegparser.a
|
||||
COMPRESSION_LIBRARIES = $(LZO_LIBS) $(BZ2_LIBS)
|
||||
|
||||
APPLICATIONS = src/mkvmerge@EXEEXT@ src/mkvinfo@EXEEXT@ src/mkvextract@EXEEXT@
|
||||
MANPAGES = doc/mkvmerge.1 doc/mkvinfo.1 doc/mkvextract.1
|
||||
MANPAGES = doc/man/mkvmerge.1 doc/man/mkvinfo.1 doc/man/mkvextract.1
|
||||
ifeq (yes,$(USE_WXWIDGETS))
|
||||
APPLICATIONS += src/mmg/mmg@EXEEXT@
|
||||
MANPAGES += doc/mmg.1
|
||||
MANPAGES += doc/man/mmg.1
|
||||
endif
|
||||
|
||||
TRANSLATIONS = @TRANSLATIONS@
|
||||
@ -217,7 +223,13 @@ ifdef ETAGS
|
||||
endif
|
||||
endif
|
||||
|
||||
all: $(TAGSFILE) $(APPLICATIONS) $(TRANSLATIONS_MOS) $(HTMLHELPBOOKS)
|
||||
# Only rebuild the man pages if both xsltproc and the DocBook
|
||||
# stylesheet have been found by configure.
|
||||
ifeq ($(XSLTPROC_WORKS),yes)
|
||||
MANPAGES_DEP = $(MANPAGES)
|
||||
endif
|
||||
|
||||
all: $(MANPAGES_DEP) $(TAGSFILE) $(APPLICATIONS) $(TRANSLATIONS_MOS) $(HTMLHELPBOOKS)
|
||||
|
||||
install: install-programs install-mans install-trans install-guide
|
||||
|
||||
@ -264,7 +276,7 @@ install-guide:
|
||||
ifeq (1,$(LIBMTXCOMMONDLL))
|
||||
%.o: %.cpp
|
||||
@echo ' CXX ' $<
|
||||
@if echo $@ | grep src.common > /dev/null 2>&1; then \
|
||||
@if echo $@ | $(GREP) src.common > /dev/null 2>&1; then \
|
||||
test x$(V) = "x1" && echo $(CXXCOMPILE) $(CXXFLAGS_SRC_COMMON) -c -o $@ $< ; \
|
||||
$(CXXCOMPILE) $(CXXFLAGS_SRC_COMMON) -c -MMD -o $@ $< ; \
|
||||
./handle_deps $@ $$? ; \
|
||||
@ -294,7 +306,12 @@ endif
|
||||
# HTML help book stuff
|
||||
%.hhk: %.hhc
|
||||
@echo ' GREP ' $<
|
||||
$(Q)grep -v 'name="ID"' $< > $@
|
||||
$(Q)$(GREP) -v 'name="ID"' $< > $@
|
||||
|
||||
# man pages from DocBook XML
|
||||
%.1: %.xml
|
||||
@echo 'XSLTPROC ' $<
|
||||
$(Q)$(XSLTPROC) $(XSLTPROC_FLAGS) -o $@ $(DOCBOOK_MANPAGES_STYLESHEET) $<
|
||||
|
||||
# Qt files
|
||||
%.h: %.ui
|
||||
|
38
ac/ax_docbook.m4
Normal file
38
ac/ax_docbook.m4
Normal file
@ -0,0 +1,38 @@
|
||||
# It's just rude to go over the net to build
|
||||
XSLTPROC_FLAGS=--nonet
|
||||
DOCBOOK_ROOT=
|
||||
for i in /usr/share/xml/docbook/stylesheet/xsl/nwalsh/manpages /usr/share/xml/docbook/stylesheet/nwalsh/manpages /usr/share/xml/docbook/xsl-stylesheets/manpages; do
|
||||
if test -d "$i"; then
|
||||
DOCBOOK_ROOT=$i
|
||||
fi
|
||||
done
|
||||
|
||||
AC_PATH_PROG(XSLTPROC, xsltproc)
|
||||
|
||||
if test "$XSLTPROC" != ""; then
|
||||
DOCBOOK_MANPAGES_STYLESHEET=$DOCBOOK_ROOT/docbook.xsl
|
||||
if test -n "$XSLTPROC"; then
|
||||
AC_CACHE_CHECK([whether xsltproc works],
|
||||
[ac_cv_xsltproc_works],
|
||||
[
|
||||
ac_cv_xsltproc_works=no
|
||||
$XSLTPROC $XSLTPROC_FLAGS $DOCBOOK_MANPAGES_STYLESHEET >/dev/null 2>/dev/null << END
|
||||
<?xml version="1.0" encoding='ISO-8859-1'?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
<book id="test">
|
||||
</book>
|
||||
END
|
||||
if test "$?" = 0; then
|
||||
ac_cv_xsltproc_works=yes
|
||||
fi
|
||||
])
|
||||
|
||||
XSLTPROC_WORKS=$ac_cv_xsltproc_works
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(DOCBOOK_ROOT)
|
||||
AC_SUBST(DOCBOOK_MANPAGES_STYLESHEET)
|
||||
AC_SUBST(XSLTPROC)
|
||||
AC_SUBST(XSLTPROC_FLAGS)
|
||||
AC_SUBST(XSLTPROC_WORKS)
|
@ -40,10 +40,13 @@ m4_include(ac/ax_boost_base.m4)
|
||||
m4_include(ac/ax_boost_regex.m4)
|
||||
m4_include(ac/boost.m4)
|
||||
m4_include(ac/etags.m4)
|
||||
m4_include(ac/ax_docbook.m4)
|
||||
|
||||
AC_OUTPUT(
|
||||
Makefile
|
||||
avilib-0.6.10/Makefile
|
||||
doc/Makefile
|
||||
doc/man/Makefile
|
||||
librmff/Makefile
|
||||
src/Makefile
|
||||
src/common/Makefile
|
||||
|
2
doc/man/Makefile.in
Normal file
2
doc/man/Makefile.in
Normal file
@ -0,0 +1,2 @@
|
||||
all %:
|
||||
@$(MAKE) -C ../.. V=$(V) $@
|
Loading…
Reference in New Issue
Block a user