]> granicus.if.org Git - check/commitdiff
* various fixes to doc building and installation
authorcpickett <cpickett@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Fri, 13 Oct 2006 03:15:57 +0000 (03:15 +0000)
committercpickett <cpickett@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Fri, 13 Oct 2006 03:15:57 +0000 (03:15 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@279 64e312b2-a51f-0410-8e61-82d0ca0eb02a

Makefile.am
configure.ac
doc/Makefile.am
doc/money/Makefile.am

index c0b144fff7ca63aed5ff2eae5ac4f9b216fc811b..a9e0bedef9a0514daa0ec3caab8155b7edcf134c 100644 (file)
@@ -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)
index d9ac1953634d2b0c490e39c2a3b57b60459f1e9e..59c8bad569c64176335f50fc919fa01b93890a63 100644 (file)
@@ -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
index e2bcc8327e53924b84a15edce758a33a4faa3126..f70d65d95b45d2518c1e3047508e8781136b76db 100644 (file)
@@ -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
index 8eb6e23bc525e27862d46c9297fd04a363532480..4d8c790fce4115669cfc21993836806e64820a17 100644 (file)
@@ -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)