Allow detection of collateindex.pl in stylesheet directory or in path,

which covers some recent installation schemes.

Add Mandrake installation layout to directories to check for stylesheets.

Allow documentation build to proceed if stylesheets were not found, in case
the stylesheets might be found through the SGML catalog mechanism.
This commit is contained in:
Peter Eisentraut 2002-04-14 17:23:20 +00:00
parent 08479bcbca
commit 2e32eca8d0
5 changed files with 143 additions and 44 deletions

View File

@ -1,4 +1,4 @@
# $Header: /cvsroot/pgsql/config/docbook.m4,v 1.2 2002/03/29 17:32:53 petere Exp $ # $Header: /cvsroot/pgsql/config/docbook.m4,v 1.3 2002/04/14 17:23:20 petere Exp $
# PGAC_PROG_JADE # PGAC_PROG_JADE
# -------------- # --------------
@ -47,7 +47,8 @@ AC_SUBST([have_docbook])
# PGAC_PATH_DOCBOOK_STYLESHEETS # PGAC_PATH_DOCBOOK_STYLESHEETS
# ----------------------------- # -----------------------------
AC_DEFUN([PGAC_PATH_DOCBOOK_STYLESHEETS], AC_DEFUN([PGAC_PATH_DOCBOOK_STYLESHEETS],
[AC_MSG_CHECKING([for DocBook stylesheets]) [AC_ARG_VAR(DOCBOOKSTYLE, [location of DocBook stylesheets])dnl
AC_MSG_CHECKING([for DocBook stylesheets])
AC_CACHE_VAL([pgac_cv_path_stylesheets], AC_CACHE_VAL([pgac_cv_path_stylesheets],
[if test -n "$DOCBOOKSTYLE"; then [if test -n "$DOCBOOKSTYLE"; then
pgac_cv_path_stylesheets=$DOCBOOKSTYLE pgac_cv_path_stylesheets=$DOCBOOKSTYLE
@ -57,7 +58,8 @@ else
for pgac_postfix in \ for pgac_postfix in \
sgml/stylesheets/nwalsh-modular \ sgml/stylesheets/nwalsh-modular \
sgml/stylesheets/docbook \ sgml/stylesheets/docbook \
sgml/docbook/dsssl/modular sgml/docbook/dsssl/modular \
sgml/docbook/dsssl-stylesheets
do do
pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
if test -r "$pgac_candidate/html/docbook.dsl" \ if test -r "$pgac_candidate/html/docbook.dsl" \
@ -77,3 +79,15 @@ if test -n "$DOCBOOKSTYLE"; then
else else
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
fi])# PGAC_PATH_DOCBOOK_STYLESHEETS fi])# PGAC_PATH_DOCBOOK_STYLESHEETS
# PGAC_PATH_COLLATEINDEX
# ----------------------
AC_DEFUN([PGAC_PATH_COLLATEINDEX],
[AC_REQUIRE([PGAC_PATH_DOCBOOK_STYLESHEETS])dnl
if test -n "$DOCBOOKSTYLE"; then
AC_PATH_PROGS(COLLATEINDEX, collateindex.pl, [],
[$DOCBOOKSTYLE/bin $PATH])
else
AC_PATH_PROGS(COLLATEINDEX, collateindex.pl)
fi])# PGAC_PATH_COLLATEINDEX

110
configure vendored
View File

@ -769,6 +769,10 @@ ac_env_CXXCPP_set=${CXXCPP+set}
ac_env_CXXCPP_value=$CXXCPP ac_env_CXXCPP_value=$CXXCPP
ac_cv_env_CXXCPP_set=${CXXCPP+set} ac_cv_env_CXXCPP_set=${CXXCPP+set}
ac_cv_env_CXXCPP_value=$CXXCPP ac_cv_env_CXXCPP_value=$CXXCPP
ac_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
ac_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
ac_cv_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
ac_cv_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
# #
# Report the --help message. # Report the --help message.
@ -896,6 +900,8 @@ Some influential environment variables:
CXX C++ compiler command CXX C++ compiler command
CXXFLAGS C++ compiler flags CXXFLAGS C++ compiler flags
CXXCPP C++ preprocessor CXXCPP C++ preprocessor
DOCBOOKSTYLE
location of DocBook stylesheets
Use these variables to override the choices made by `configure' or to help Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations. it to find libraries and programs with nonstandard names/locations.
@ -16399,9 +16405,7 @@ fi
test -n "$NSGMLS" && break test -n "$NSGMLS" && break
done done
# If you don't have nsgmls you won't get very far, so save the cycles. for ac_prog in openjade jade
if test -n "$NSGMLS"; then
for ac_prog in openjade jade
do do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
@ -16475,7 +16479,7 @@ echo "${ECHO_T}$pgac_cv_check_docbook" >&6
have_docbook=$pgac_cv_check_docbook have_docbook=$pgac_cv_check_docbook
echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
if test "${pgac_cv_path_stylesheets+set}" = set; then if test "${pgac_cv_path_stylesheets+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
@ -16488,7 +16492,8 @@ else
for pgac_postfix in \ for pgac_postfix in \
sgml/stylesheets/nwalsh-modular \ sgml/stylesheets/nwalsh-modular \
sgml/stylesheets/docbook \ sgml/stylesheets/docbook \
sgml/docbook/dsssl/modular sgml/docbook/dsssl/modular \
sgml/docbook/dsssl-stylesheets
do do
pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
if test -r "$pgac_candidate/html/docbook.dsl" \ if test -r "$pgac_candidate/html/docbook.dsl" \
@ -16512,7 +16517,98 @@ else
echo "$as_me:$LINENO: result: no" >&5 echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6 echo "${ECHO_T}no" >&6
fi fi
for ac_prog in sgmlspl if test -n "$DOCBOOKSTYLE"; then
for ac_prog in collateindex.pl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $COLLATEINDEX in
[\\/]* | ?:[\\/]*)
ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $DOCBOOKSTYLE/bin $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
;;
esac
fi
COLLATEINDEX=$ac_cv_path_COLLATEINDEX
if test -n "$COLLATEINDEX"; then
echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
echo "${ECHO_T}$COLLATEINDEX" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$COLLATEINDEX" && break
done
else
for ac_prog in collateindex.pl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $COLLATEINDEX in
[\\/]* | ?:[\\/]*)
ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
;;
esac
fi
COLLATEINDEX=$ac_cv_path_COLLATEINDEX
if test -n "$COLLATEINDEX"; then
echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
echo "${ECHO_T}$COLLATEINDEX" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$COLLATEINDEX" && break
done
fi
for ac_prog in sgmlspl
do do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
@ -16552,7 +16648,6 @@ fi
test -n "$SGMLSPL" && break test -n "$SGMLSPL" && break
done done
fi
# prepare build tree if outside source tree # prepare build tree if outside source tree
@ -17258,6 +17353,7 @@ s,@NSGMLS@,$NSGMLS,;t t
s,@JADE@,$JADE,;t t s,@JADE@,$JADE,;t t
s,@have_docbook@,$have_docbook,;t t s,@have_docbook@,$have_docbook,;t t
s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
s,@COLLATEINDEX@,$COLLATEINDEX,;t t
s,@SGMLSPL@,$SGMLSPL,;t t s,@SGMLSPL@,$SGMLSPL,;t t
s,@vpath_build@,$vpath_build,;t t s,@vpath_build@,$vpath_build,;t t
CEOF CEOF

View File

@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
dnl $Header: /cvsroot/pgsql/configure.in,v 1.177 2002/04/10 22:46:31 petere Exp $ dnl $Header: /cvsroot/pgsql/configure.in,v 1.178 2002/04/14 17:23:20 petere Exp $
dnl Developers, please strive to achieve this order: dnl Developers, please strive to achieve this order:
dnl dnl
@ -1212,13 +1212,11 @@ fi
# Check for DocBook and tools # Check for DocBook and tools
# #
PGAC_PROG_NSGMLS PGAC_PROG_NSGMLS
# If you don't have nsgmls you won't get very far, so save the cycles. PGAC_PROG_JADE
if test -n "$NSGMLS"; then PGAC_CHECK_DOCBOOK([3.1])
PGAC_PROG_JADE PGAC_PATH_DOCBOOK_STYLESHEETS
PGAC_CHECK_DOCBOOK([3.1]) PGAC_PATH_COLLATEINDEX
PGAC_PATH_DOCBOOK_STYLESHEETS AC_CHECK_PROGS(SGMLSPL, sgmlspl)
AC_CHECK_PROGS(SGMLSPL, sgmlspl)
fi
# prepare build tree if outside source tree # prepare build tree if outside source tree

View File

@ -8,7 +8,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.49 2002/01/30 21:54:17 petere Exp $ # $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.50 2002/04/14 17:23:20 petere Exp $
# #
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
@ -19,12 +19,8 @@ include $(top_builddir)/src/Makefile.global
.SECONDARY: .SECONDARY:
.NOTPARALLEL: .NOTPARALLEL:
ifndef DOCBOOKSTYLE ifndef COLLATEINDEX
DOCBOOKSTYLE = /home/projects/pgsql/developers/thomas/db162.d/docbook COLLATEINDEX = $(DOCBOOKSTYLE)/bin/collateindex.pl
endif
ifndef DOCBOOKINDEX
DOCBOOKINDEX = $(DOCBOOKSTYLE)/bin/collateindex.pl
endif endif
ifndef JADE ifndef JADE
@ -58,7 +54,9 @@ ALLBOOKS = admin developer programmer reference tutorial user
ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) bookindex.sgml setindex.sgml ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) bookindex.sgml setindex.sgml
CATALOG = $(DOCBOOKSTYLE)/catalog ifdef DOCBOOKSTYLE
CATALOG = -c $(DOCBOOKSTYLE)/catalog
endif
## ##
@ -84,7 +82,7 @@ man: $(ALLSGML)
## HTML ## HTML
## ##
JADE.html = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -i output-html -t sgml JADE.html = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -i output-html -t sgml
postgres.html: postgres.sgml $(ALLSGML) stylesheet.dsl postgres.html: postgres.sgml $(ALLSGML) stylesheet.dsl
@rm -f *.html @rm -f *.html
@ -100,22 +98,14 @@ programmer.html: catalogs.gif connections.gif
postgres.html: catalogs.gif connections.gif postgres.html: catalogs.gif connections.gif
COLLATEINDEX = $(PERL) $(DOCBOOKINDEX) -f -g -t 'Index' COLLATEINDEX := $(PERL) $(COLLATEINDEX) -f -g -t 'Index'
ifeq (,$(wildcard HTML.index)) ifeq (,$(wildcard HTML.index))
bookindex.sgml: bookindex.sgml:
ifeq (,$(wildcard $(COLLATEINDEX)))
touch $@
else
$(COLLATEINDEX) -o $@ -N $(COLLATEINDEX) -o $@ -N
endif
setindex.sgml: setindex.sgml:
ifeq (,$(wildcard $(COLLATEINDEX)))
touch $@
else
$(COLLATEINDEX) -x -o $@ -N $(COLLATEINDEX) -x -o $@ -N
endif
else else
bookindex.sgml: HTML.index bookindex.sgml: HTML.index
$(COLLATEINDEX) -i 'bookindex' -o $@ $< $(COLLATEINDEX) -i 'bookindex' -o $@ $<
@ -131,19 +121,19 @@ endif
# RTF to allow minor editing for hardcopy # RTF to allow minor editing for hardcopy
$(addsuffix .rtf, $(ALLBOOKS)): %.rtf: %.sgml $(ALLSGML) stylesheet.dsl $(addsuffix .rtf, $(ALLBOOKS)): %.rtf: %.sgml $(ALLSGML) stylesheet.dsl
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -t rtf -V rtf-backend -i output-print book-decl.sgml $< $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -t rtf -V rtf-backend -i output-print book-decl.sgml $<
# TeX # TeX
# Regular TeX and pdfTeX have slightly differing requirements, so we # Regular TeX and pdfTeX have slightly differing requirements, so we
# need to distinguish the path we're taking. # need to distinguish the path we're taking.
$(addsuffix .tex-ps, $(ALLBOOKS)): %.tex-ps: %.sgml $(ALLSGML) stylesheet.dsl $(addsuffix .tex-ps, $(ALLBOOKS)): %.tex-ps: %.sgml $(ALLSGML) stylesheet.dsl
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -t tex -V tex-backend -i output-print -V texdvi-output -o $@ book-decl.sgml $< $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -t tex -V tex-backend -i output-print -V texdvi-output -o $@ book-decl.sgml $<
programmer.tex-ps: catalogs.eps connections.eps programmer.tex-ps: catalogs.eps connections.eps
$(addsuffix .tex-pdf, $(ALLBOOKS)): %.tex-pdf: %.sgml $(ALLSGML) stylesheet.dsl $(addsuffix .tex-pdf, $(ALLBOOKS)): %.tex-pdf: %.sgml $(ALLSGML) stylesheet.dsl
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -t tex -V tex-backend -i output-print -V texpdf-output -o $@ book-decl.sgml $< $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -t tex -V tex-backend -i output-print -V texpdf-output -o $@ book-decl.sgml $<
programmer.tex-pdf: catalogs.pdf connections.pdf programmer.tex-pdf: catalogs.pdf connections.pdf
@ -168,7 +158,7 @@ programmer.tex-pdf: catalogs.pdf connections.pdf
# for debugging DSSSL code, and possibly to interface to some other # for debugging DSSSL code, and possibly to interface to some other
# tools that can make use of this. # tools that can make use of this.
$(addsuffix .fot, $(ALLBOOKS)): %.fot: %.sgml $(ALLSGML) stylesheet.dsl $(addsuffix .fot, $(ALLBOOKS)): %.fot: %.sgml $(ALLSGML) stylesheet.dsl
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -t fot -i output-print -o $@ book-decl.sgml $< $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -t fot -i output-print -o $@ book-decl.sgml $<
# Graphics # Graphics
@ -187,7 +177,7 @@ $(addsuffix .fot, $(ALLBOOKS)): %.fot: %.sgml $(ALLSGML) stylesheet.dsl
## Semi-automatic generation of some text files. ## Semi-automatic generation of some text files.
## ##
JADE.text = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -i output-text -t sgml JADE.text = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -i output-text -t sgml
INSTALL HISTORY regress_README: % : %.html INSTALL HISTORY regress_README: % : %.html
@echo "|";\ @echo "|";\
@ -219,10 +209,10 @@ regress_README.html: regress.sgml
check: $(addprefix check-, $(ALLBOOKS)) check-postgres check: $(addprefix check-, $(ALLBOOKS)) check-postgres
# Quick syntax check without style processing # Quick syntax check without style processing
$(addprefix check-, $(ALLBOOKS)): check-%: %.sgml $(addprefix check-, $(ALLBOOKS)): check-%: %.sgml bookindex.sgml
$(NSGMLS) $(SGMLINCLUDE) -s book-decl.sgml $< $(NSGMLS) $(SGMLINCLUDE) -s book-decl.sgml $<
check-postgres: postgres.sgml check-postgres: postgres.sgml setindex.sgml
$(NSGMLS) $(SGMLINCLUDE) -s $< $(NSGMLS) $(SGMLINCLUDE) -s $<

View File

@ -1,5 +1,5 @@
# -*-makefile-*- # -*-makefile-*-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.145 2002/04/10 16:45:25 petere Exp $ # $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.146 2002/04/14 17:23:20 petere Exp $
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets, # All PostgreSQL makefiles include this file and use the variables it sets,
@ -153,6 +153,7 @@ TCLSH = @TCLSH@
have_docbook = @have_docbook@ have_docbook = @have_docbook@
DOCBOOKSTYLE = @DOCBOOKSTYLE@ DOCBOOKSTYLE = @DOCBOOKSTYLE@
COLLATEINDEX = @COLLATEINDEX@
########################################################################## ##########################################################################