From: cpickett Date: Fri, 13 Oct 2006 03:15:57 +0000 (+0000) Subject: * various fixes to doc building and installation X-Git-Tag: 0.10.0~874 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4684340cddf9aff885880b6d49aad45592adc4e4;p=check * various fixes to doc building and installation git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@279 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- diff --git a/Makefile.am b/Makefile.am index c0b144f..a9e0bed 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,19 +2,26 @@ SUBDIRS=src tests doc rpm -## install the following extra data with docs +## what to clean + +CLEANFILES=*~\ + $(PACKAGE)-$(VERSION).tar.gz\ + $(PACKAGE)-$(VERSION).rpm\ + ChangeLog.bak + +## what additional things to distribute + +EXTRA_DIST= ChangeLogOld $(m4data_DATA) + +## install docs +datarootdir = $(prefix)/share +docdir = $(datarootdir)/doc/$(PACKAGE) doc_DATA = ChangeLog ChangeLogOld NEWS README COPYING.LESSER -## install check.m4 so clients can use it +## install check.m4 with AM_PATH_CHECK in it m4datadir = $(datadir)/aclocal m4data_DATA = check.m4 -EXTRA_DIST= ChangeLogOld $(m4data_DATA) - -CLEANFILES=*~\ - ${PACKAGE}-${VERSION}*.gz\ - ${PACKAGE}-${VERSION}*.rpm\ - ChangeLog.bak rpm: dist (cd rpm && ${MAKE} ${AM_MAKEFLAGS} rpm) diff --git a/configure.ac b/configure.ac index d9ac195..59c8bad 100644 --- a/configure.ac +++ b/configure.ac @@ -60,11 +60,14 @@ fi AC_CHECK_PROGS(GCOV, gcov, false) AC_CHECK_PROGS(LCOV, lcov, false) AC_CHECK_PROGS(GENHTML, genhtml, false) + +# check for docbook2html, and if we don't have it issue a warning, +# otherwise define HAVE_DOCBOOK2HTML to enable building docs AC_CHECK_PROG(have_docbook2html,docbook2html,yes) if test x"$have_docbook2html" != "xyes" ; then - AC_MSG_WARN([required tools not found, not building docs]) + AC_MSG_WARN([docbook2html missing, not building docs; install docbook-utils or sgml2x]) fi -AM_CONDITIONAL(MAKE_DOC, test x"$have_docbook2html" = "xyes") +AM_CONDITIONAL(HAVE_DOCBOOK2HTML, test x"$have_docbook2html" = "xyes") # Checks for libraries. @@ -73,7 +76,6 @@ AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([fcntl.h stddef.h stdint.h stdlib.h string.h sys/time.h unistd.h]) - # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_PID_T diff --git a/doc/Makefile.am b/doc/Makefile.am index e2bcc83..f70d65d 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,21 +1,32 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS=money +SUBDIRS = money -SUFFIXES = .html +## source files sgml_docs = tutorial.sgml + +## built files + html_docs = *.html $(html_docs): $(sgml_docs) docbook2html -o . $< -EXTRA_DIST = $(sgml_docs) $(html_docs) +## what to clean + +CLEANFILES = *~ + +## what to distribute + +EXTRA_DIST = $(sgml_docs) + +## what to install + +datarootdir = $(prefix)/share -if MAKE_DOC -doc_DATA = $(sgml_docs) $(html_docs) -CLEANFILES = $(html_docs) *~ -else -doc_DATA = $(sgml_docs) -CLEANFILES=*~ +if HAVE_DOCBOOK2HTML + tutorialdir=$(datarootdir)/doc/$(PACKAGE)/tutorial + tutorial_DATA=$(html_docs) + CLEANFILES += $(html_docs) endif diff --git a/doc/money/Makefile.am b/doc/money/Makefile.am index 8eb6e23..4d8c790 100644 --- a/doc/money/Makefile.am +++ b/doc/money/Makefile.am @@ -1,12 +1,24 @@ ## Process this file with automake to produce Makefile.in -example_docs =\ +## source files + +examples =\ money.h\ money.c\ check_money.c\ configure.in.money\ Makefile.am.money -EXTRA_DIST = $(example_docs) +## what to clean + +CLEANFILES = *~ + +## what to distribute + +EXTRA_DIST = $(examples) + +## what to install -exampledoc_DATA = $(example_docs) \ No newline at end of file +datarootdir = $(prefix)/share +examplesdir = $(datarootdir)/doc/$(PACKAGE)/examples +examples_DATA = $(examples)