1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

Make the docs system somewhat more user-friendly:

- Configure now prints a summary of what output formats the docs can be built
 in using the utilities that it found and prints the names of the missing
 utilities for the formats that can't be built.
 - Add 'make all' that builds all the docs that can be built using the
 utilities that were found (the current 'make all' has been renamed to
 'make help' and is still the first target in the Makefile)
 - Add a few utility functions for autoconf
(This used to be commit 48cc8b693f182653ac7b9bcccc92c72cf062c1ea)
This commit is contained in:
Jelmer Vernooij 2004-04-23 14:23:36 +00:00 committed by Gerald W. Carter
parent a48fcbf0b4
commit bcb40631df
3 changed files with 76 additions and 24 deletions

View File

@ -63,7 +63,7 @@ HOWTODIR_IMAGES_EPS=$(patsubst %.png,%.eps,$(wildcard $(IMAGEPROJDIR)/*.png))
HOWTODIR_DEPS = $(HOWTODIR)/*.xml $(HOWTODIR)/attributions.xml $(MANPAGEDIR)/*.xml $(SMBDOTCONFDOC)/smb.conf.5.xml $(SMBDOTCONFDOC)/parameters.all.xml $(SMBDOTCONFDOC)/parameters.global.xml $(SMBDOTCONFDOC)/parameters.service.xml
DEVDOCDIR_DEPS = $(DEVDOCDIR)/*.xml $(DEVDOCDIR)/attributions.xml
all:
help:
@echo "Supported make targets:"
@echo "release - Build the docs needed for a Samba release"
@echo "pdf - Build PDF version of book"
@ -80,8 +80,11 @@ all:
@echo "undocumented - Output list of undocumented smb.conf options"
@echo "samples - Extract examples"
@echo "files - Extract other files"
@echo "all - Build all docs that can be build using the utilities found by configure"
@echo "everything - Build all of the above"
all: @TARGETS@
everything: manpages pdf html-single html htmlman txt ps
release: manpages htmlman html html-single pdf guide

35
docs/aclocal.m4 vendored Normal file
View File

@ -0,0 +1,35 @@
dnl DOCS_DEFINE_TARGET
dnl arg1: Target that is defined
dnl arg2: Requirement
dnl arg3: Official name
dnl arg4: Makefile target name
AC_DEFUN(DOCS_DEFINE_TARGET, [
if test "x$$1_REQUIRES" = x; then
$1_REQUIRES="$$2_REQUIRES"
else
$1_REQUIRES="$$1_REQUIRES $$2_REQUIRES"
fi
if test x"$$1_REQUIRES" = x; then
TARGETS="$TARGETS $4"
else
AC_MSG_RESULT([Building the $3 requires : $$1_REQUIRES])
fi
])
dnl DOCS_TARGET_REQUIRE_PROGRAM
dnl arg1: program variable
dnl arg2: program executable name
dnl arg3: target that requires it
AC_DEFUN(DOCS_TARGET_REQUIRE_PROGRAM, [
AC_PATH_PROG([$1], [$2])
if test x"$$1" = x; then
if test x"$$3_REQUIRES" = x; then
$3_REQUIRES="$2"
else
$3_REQUIRES="$$3_REQUIRES $2"
fi
fi
])

View File

@ -1,18 +1,5 @@
AC_INIT(entities/global.entities)
AC_PATH_PROG(XSLTPROC, xsltproc)
if test "x$XSLTPROC" = x; then
AC_MSG_ERROR("xsltproc is required")
fi
AC_PATH_PROG(PDFLATEX, pdflatex)
if test "x$PDFLATEX" = x; then
AC_MSG_ERROR("pdflatex is required")
fi
AC_PATH_PROG(MAKEINDEX, makeindex)
if test "x$MAKEINDEX" = x; then
AC_MSG_ERROR("makeindex is required")
fi
PAPERSIZE=""
DUPLICATE_ULINKS=""
@ -34,16 +21,6 @@ AC_ARG_WITH(fontsize,
[ --with-fontsize Specify the fontsize in points (default: 10.5) ],
[ test "$withval" && FONTSIZE="$withval" ])
AC_PATH_PROG(RM, rm)
AC_PATH_PROG(WGET, wget)
AC_PATH_PROG(LATEX, latex)
AC_PATH_PROG(DVIPS, dvips)
AC_PATH_PROG(PNGTOPNM, pngtopnm)
AC_PATH_PROG(PNMTOPS, pnmtops)
AC_PATH_PROG(PERL, perl)
AC_PATH_PROG(XMLTO, xmlto)
AC_PATH_PROG(PLUCKERBUILD, plucker-build, [echo -e 'No plucker-build utility was found, ignoring following options:\n'])
AC_PATH_PROG(EPSTOPDF, epstopdf)
DOC_BUILD_DATE=`date '+%d-%m-%Y'`
AC_SUBST(DOC_BUILD_DATE)
@ -52,4 +29,41 @@ AC_SUBST(DUPLICATE_ULINKS)
AC_SUBST(FONTSIZE)
AC_SUBST(DOCROP)
DOCS_TARGET_REQUIRE_PROGRAM(XSLTPROC, xsltproc, ALL)
DOCS_TARGET_REQUIRE_PROGRAM(RM, rm, ALL)
DOCS_TARGET_REQUIRE_PROGRAM(MAKEINDEX, makeindex, LATEX)
DOCS_TARGET_REQUIRE_PROGRAM(WGET, wget, LATEX)
DOCS_TARGET_REQUIRE_PROGRAM(PDFLATEX, pdflatex, PDF)
DOCS_TARGET_REQUIRE_PROGRAM(EPSTOPDF, epstopdf, PDF)
DOCS_TARGET_REQUIRE_PROGRAM(PNGTOPNM, pngtopnm, PS)
DOCS_TARGET_REQUIRE_PROGRAM(PNMTOPS, pnmtops, PS)
DOCS_TARGET_REQUIRE_PROGRAM(LATEX, latex, PS)
DOCS_TARGET_REQUIRE_PROGRAM(DVIPS, dvips, PS)
DOCS_TARGET_REQUIRE_PROGRAM(PLUCKERBUILD, plucker-build, PLUCKER)
DOCS_TARGET_REQUIRE_PROGRAM(XMLTO, xmlto, TXT)
DOCS_TARGET_REQUIRE_PROGRAM(PERL, perl, UNDOCUMENTED)
AC_MSG_RESULT([])
AC_MSG_RESULT([Summary:])
AC_MSG_RESULT([--------------])
DOCS_DEFINE_TARGET(ALL, [], [base requirements], [])
DOCS_DEFINE_TARGET(LATEX, ALL, [LaTeX versions], [tex])
DOCS_DEFINE_TARGET(PDF, LATEX, [PDF versions], [pdf])
DOCS_DEFINE_TARGET(PS, LATEX, [PostScript versions], [ps])
DOCS_DEFINE_TARGET(HTML, ALL, [HTML versions], [html])
DOCS_DEFINE_TARGET(MANPAGES, ALL, [manpages], [manpages])
DOCS_DEFINE_TARGET(PLUCKER, HTML, [plucker versions], [plucker])
DOCS_DEFINE_TARGET(UNDOCUMENTED, MANPAGES, [list of undocumented options], [undocumented])
DOCS_DEFINE_TARGET(TXT, ALL, [text versions], [txt])
if test x"$TARGETS" = x; then
AC_MSG_ERROR([You won't be able to build any of the docs])
else
AC_MSG_RESULT([You will be able to build: $TARGETS])
fi
AC_SUBST(TARGETS)
AC_OUTPUT( Makefile settings.xsl )