From e452c704c59700496227dccb3161efd34ca709ba Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Wed, 27 May 2009 20:44:24 +0000 Subject: [PATCH] xml-doc-building-glue-20090527 LICENSE IPL10 FIXES 124804 add configure switches for building docs. generate version files needed. --- acinclude.m4 | 16 ++++++++++++++++ configure.in | 19 +++++++++++++++++++ doc/xml/AdminGuide/{Makefile => Makefile.in} | 15 ++++++++++----- .../QuickStartUnix/{Makefile => Makefile.in} | 15 ++++++++++----- doc/xml/UserGuide/{Makefile => Makefile.in} | 15 ++++++++++----- src/config/Makefile.component | 2 ++ src/config/Makefile.config.in | 3 +++ src/config/Makefile.in | 4 ++-- ...le.version-CML => Makefile.version-CML.in} | 3 ++- src/config/Makefile.version-NOCML.in | 1 - 10 files changed, 74 insertions(+), 19 deletions(-) rename doc/xml/AdminGuide/{Makefile => Makefile.in} (79%) rename doc/xml/QuickStartUnix/{Makefile => Makefile.in} (76%) rename doc/xml/UserGuide/{Makefile => Makefile.in} (76%) create mode 100644 src/config/Makefile.component rename src/config/{Makefile.version-CML => Makefile.version-CML.in} (94%) diff --git a/acinclude.m4 b/acinclude.m4 index a330b94e1..daa97ca07 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -300,6 +300,17 @@ AC_ARG_ENABLE([optimize-pam], , [enable_optimize_pam="yes"]) +AC_ARG_WITH([xslt-processor], + AS_HELP_STRING([--with-xslt-processor=ARG], + [which XSLT processor to use (possible choices are: libxslt, saxon, xalan-j, xsltproc)]), + XSLTPROC="$withval", + XSLTPROC="libxslt") + +AC_ARG_WITH([html-xsl], + AS_HELP_STRING([--with-html-xsl], + [build HTML documentation using Norman Walsh's DocBook XSL stylesheets (default is no; specify a path to chunk.xsl or docbook.xsl)]), + HTML_XSL="$withval", + HTML_XSL=no) enable_login="no" @@ -1648,6 +1659,9 @@ if test "x$enable_pthreaded_ubik" = "xyes"; then ENABLE_PTHREADED_UBIK=yes fi +VERSFILE=AFS_component_version_number +AC_SUBST(VERSFILE) + AC_SUBST(AFS_SYSNAME) AC_SUBST(AFS_PARAM_COMMON) AC_SUBST(ENABLE_KERNEL_MODULE) @@ -1667,6 +1681,8 @@ AC_SUBST(TOP_LIBDIR) AC_SUBST(DEST) AC_SUBST(DARWIN_INFOFILE) AC_SUBST(IRIX_BUILD_IP35) +AC_SUBST(HTML_XSL) +AC_SUBST(XSLTPROC) OPENAFS_OSCONF OPENAFS_KRB5CONF diff --git a/configure.in b/configure.in index 0445e798e..f5c80cab7 100644 --- a/configure.in +++ b/configure.in @@ -20,10 +20,28 @@ if test -d 'doc/man-pages' ; then else MAN_MAKEFILE= fi +if test -f 'doc/xml/AdminGuide/Makefile.in' ; then + ADMINGUIDE_MAKEFILE="doc/xml/AdminGuide/Makefile" +else + ADMINGUIDE_MAKEFILE= +fi +if test -f 'doc/xml/QuickStartUnix/Makefile.in' ; then + QSUNIX_MAKEFILE="doc/xml/QuickStartUnix/Makefile" +else + QSUNIX_MAKEFILE= +fi +if test -f 'doc/xml/UserGuide/Makefile.in' ; then + USERGUIDE_MAKEFILE="doc/xml/UserGuide/Makefile" +else + USERGUIDE_MAKEFILE= +fi AC_OUTPUT( \ Makefile \ ${MAN_MAKEFILE} \ +${ADMINGUIDE_MAKEFILE} \ +${QSUNIX_MAKEFILE} \ +${USERGUIDE_MAKEFILE} \ src/afs/Makefile \ src/afsd/Makefile \ src/afsmonitor/Makefile \ @@ -47,6 +65,7 @@ src/comerr/Makefile \ src/comerr/test/Makefile \ src/config/Makefile \ src/config/Makefile.config \ +src/config/Makefile.version-CML \ src/config/Makefile.version-NOCML \ src/config/shlib-build \ src/config/shlib-install \ diff --git a/doc/xml/AdminGuide/Makefile b/doc/xml/AdminGuide/Makefile.in similarity index 79% rename from doc/xml/AdminGuide/Makefile rename to doc/xml/AdminGuide/Makefile.in index 42d2a528f..55befc478 100644 --- a/doc/xml/AdminGuide/Makefile +++ b/doc/xml/AdminGuide/Makefile.in @@ -13,18 +13,23 @@ # HTML_XSL is possibly specific to Debian and may need to be modified on other # systems. +all: pdf html + +include @TOP_OBJDIR@/src/config/Makefile.config +VERSFILE=version +include @TOP_OBJDIR@/src/config/Makefile.version + BOOK = auagd000.xml SRCS = $(BOOK) auagd005.xml auagd006.xml auagd007.xml auagd008.xml \ auagd009.xml auagd010.xml auagd011.xml auagd012.xml auagd013.xml \ auagd014.xml auagd015.xml auagd016.xml auagd017.xml auagd018.xml \ auagd019.xml auagd020.xml auagd021.xml auagd022.xml auagd023.xml \ auagd024.xml auagd025.xml -HTML_XSL = /usr/share/xml/docbook/stylesheet/nwalsh/html/chunk.xsl - -all: pdf html +HTML_XSL = @HTML_XSL@ +XSLTPROC = @XSLTPROC@ -html: $(SRCS) - xsltproc --param navig.graphics 1 \ +html: $(SRCS) $(VERSFILE).xml + $(XSLTPROC) --param navig.graphics 1 \ --stringparam navig.graphics.path ../ $(HTML_XSL) $(BOOK) pdf: $(SRCS) diff --git a/doc/xml/QuickStartUnix/Makefile b/doc/xml/QuickStartUnix/Makefile.in similarity index 76% rename from doc/xml/QuickStartUnix/Makefile rename to doc/xml/QuickStartUnix/Makefile.in index 3ce5d8260..30cb05cc3 100644 --- a/doc/xml/QuickStartUnix/Makefile +++ b/doc/xml/QuickStartUnix/Makefile.in @@ -13,15 +13,20 @@ # HTML_XSL is specific to Debian and will need to be modified on other # systems until we have a better mechanism for finding the correct path. +all: pdf html + +include @TOP_OBJDIR@/src/config/Makefile.config +VERSFILE=version +include @TOP_OBJDIR@/src/config/Makefile.version + BOOK = auqbg000.xml SRCS = $(BOOK) auqbg003.xml auqbg004.xml auqbg005.xml auqbg006.xml \ auqbg007.xml auqbg008.xml appendix.xml -HTML_XSL = /usr/share/xml/docbook/stylesheet/nwalsh/html/chunk.xsl - -all: pdf html +HTML_XSL = @HTML_XSL@ +XSLTPROC = @XSLTPROC@ -html: $(SRCS) - xsltproc --param navig.graphics 1 \ +html: $(SRCS) $(VERSFILE).xml + $(XSLTPROC) --param navig.graphics 1 \ --stringparam navig.graphics.path ../ $(HTML_XSL) $(BOOK) pdf: $(SRCS) diff --git a/doc/xml/UserGuide/Makefile b/doc/xml/UserGuide/Makefile.in similarity index 76% rename from doc/xml/UserGuide/Makefile rename to doc/xml/UserGuide/Makefile.in index 7b4077733..40409dab6 100644 --- a/doc/xml/UserGuide/Makefile +++ b/doc/xml/UserGuide/Makefile.in @@ -13,16 +13,21 @@ # HTML_XSL is possibly specific to Debian and may need to be modified on other # systems. +all: pdf html + +include @TOP_OBJDIR@/src/config/Makefile.config +VERSFILE=version +include @TOP_OBJDIR@/src/config/Makefile.version + BOOK = auusg000.xml SRCS = $(BOOK) auusg003.xml auusg004.xml auusg005.xml auusg006.xml \ auusg007.xml auusg008.xml auusg009.xml auusg010.xml auusg011.xml \ auusg012.xml -HTML_XSL = /usr/share/xml/docbook/stylesheet/nwalsh/html/chunk.xsl - -all: pdf html +HTML_XSL = @HTML_XSL@ +XSLTPROC = @XSLTPROC@ -html: $(SRCS) - xsltproc --param navig.graphics 1 \ +html: $(SRCS) $(VERSFILE).xml + $(XSLTPROC) --param navig.graphics 1 \ --stringparam navig.graphics.path ../ $(HTML_XSL) $(BOOK) pdf: $(SRCS) diff --git a/src/config/Makefile.component b/src/config/Makefile.component new file mode 100644 index 000000000..c1ec1dd0b --- /dev/null +++ b/src/config/Makefile.component @@ -0,0 +1,2 @@ +include Makefile.config +include Makefile.version diff --git a/src/config/Makefile.config.in b/src/config/Makefile.config.in index a12a9d7ce..b873f5812 100644 --- a/src/config/Makefile.config.in +++ b/src/config/Makefile.config.in @@ -129,3 +129,6 @@ LDFLAGS=${XLDFLAGS} ${ARCHFLAGS} .c.o: $(CCOBJ) $(CFLAGS) -c $< + +# Default component version file, will be overridden later if necessary +VERSFILE=@VERSFILE@ \ No newline at end of file diff --git a/src/config/Makefile.in b/src/config/Makefile.in index 0149efa21..951711fa7 100644 --- a/src/config/Makefile.in +++ b/src/config/Makefile.in @@ -28,7 +28,7 @@ all: config mkvers \ Makefile.version: ${srcdir}/Makefile.version-CML Makefile.version-NOCML $(RM) -f Makefile.version - if [ -r SRC/../CML/state ] ; \ + if [ -r @TOP_SRCDIR@/CML/state ] ; \ then $(CP) ${srcdir}/Makefile.version-CML Makefile.version ; \ else $(CP) Makefile.version-NOCML Makefile.version ; \ fi @@ -37,7 +37,7 @@ Makefile.version: ${srcdir}/Makefile.version-CML Makefile.version-NOCML # AFS component version string file generation targets # AFS_component_version_number.c: Makefile.version - $(MAKE) -f Makefile.version AFS_component_version_number.c + $(MAKE) -f Makefile.component AFS_component_version_number.c # # App build/install targets diff --git a/src/config/Makefile.version-CML b/src/config/Makefile.version-CML.in similarity index 94% rename from src/config/Makefile.version-CML rename to src/config/Makefile.version-CML.in index 7df4aaf00..e77e110ce 100644 --- a/src/config/Makefile.version-CML +++ b/src/config/Makefile.version-CML.in @@ -5,7 +5,8 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html -VERSFILE=AFS_component_version_number +PACKAGE=@PACKAGE@ +VERSION=@VERSION@ $(VERSFILE).o: $(VERSFILE).c diff --git a/src/config/Makefile.version-NOCML.in b/src/config/Makefile.version-NOCML.in index e42cee234..179a92904 100644 --- a/src/config/Makefile.version-NOCML.in +++ b/src/config/Makefile.version-NOCML.in @@ -7,7 +7,6 @@ PACKAGE=@PACKAGE@ VERSION=@VERSION@ -VERSFILE=AFS_component_version_number $(VERSFILE).o: $(VERSFILE).c -- 2.39.5