Mercurial > hg > octave-lyh
changeset 10092:02453ee20140
allow building of docs to be disabled
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 13 Jan 2010 03:40:45 -0500 |
parents | a115046d462d |
children | d90736774da2 |
files | ChangeLog Makefile.am configure.ac |
diffstat | 3 files changed, 32 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-01-13 John W. Eaton <jwe@octave.org> + + * configure.ac: Handle --enable-docs. Print warning in summary + if building documentation is disabled. + * Makefile.am (SUBDIRS): Use @DOCDIR@ instead of doc. + (dist-hook): New target, conditional on AMCOND_BUILD_DOCS. + 2010-01-09 John W. Eaton <jwe@octave.org> * configure.ac: Don't check for nlink_t.
--- a/Makefile.am +++ b/Makefile.am @@ -69,7 +69,13 @@ include m4/module.mk # Subdirectories in which to run `make all'. -SUBDIRS = libgnu libcruft liboctave src scripts doc examples test +SUBDIRS = libgnu libcruft liboctave src scripts @DOCDIR@ examples test + +if AMCOND_BUILD_DOCS +else +dist-hook: + echo "Documentation disabled. Cannot package distribution!" ; exit 1; +endif BUILT_SHELL_FILES = \ mkoctfile$(SCRIPTS_EXE_SUFFIX) \
--- a/configure.ac +++ b/configure.ac @@ -152,6 +152,19 @@ AC_DEFINE(BOUNDS_CHECKING, 1, [Define to use internal bounds checking.]) fi +### Make it possible to disable running Make in the doc directory. +### Useful for building on systems without TeX, for example. +DOCDIR=doc +AC_ARG_ENABLE(docs, + [AS_HELP_STRING([--enable-docs], [build documentation (default is yes)])], + [if test "$enableval" = no; then + DOCDIR= + warn_docs="building documentation disabled; make dist will fail" + AC_MSG_WARN([$warn_docs]) + fi], []) +AC_SUBST(DOCDIR) +AM_CONDITIONAL([AMCOND_BUILD_DOCS], [test -n "$DOCDIR"]) + ### If possible, use a 64-bit integer type for array dimensions and indexing. USE_64_BIT_IDX_T=false @@ -2281,6 +2294,11 @@ warn_msg_printed=true fi +if test -n "$warn_docs"; then + AC_MSG_WARN([$warn_docs]) + warn_msg_printed=true +fi + if test -n "$warn_64_bit"; then AC_MSG_WARN([$warn_64_bit]) warn_msg_printed=true