diff options
author | Keith Packard <keithp@keithp.com> | 2003-06-17 18:28:20 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2003-06-17 18:28:20 +0000 |
commit | 2b45ef3a8a164648647eba1265db6a3d10ea7bad (patch) | |
tree | b0a2f8dcca2317b8d9ba0b05bfe4f97fa6062b65 | |
parent | e5871b5c5bdb09b2e5bb0d79ed03f22a27956a90 (diff) |
Bug 75: dont build docs unless docbook is available. Dont install docs
unless they are pre-built or buildable
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | configure.in | 26 | ||||
-rw-r--r-- | doc/Makefile.am | 2 |
3 files changed, 24 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am index fd10fbb..bf93beb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,7 +21,8 @@ # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -SUBDIRS=fontconfig fc-lang fc-glyphname src fc-cache fc-list fc-match doc test +DOCSRC=@DOCSRC@ +SUBDIRS=fontconfig fc-lang fc-glyphname src fc-cache fc-list fc-match $(DOCSRC) test EXTRA_DIST = \ fontconfig.pc.in \ diff --git a/configure.in b/configure.in index 76e8d44..21652b1 100644 --- a/configure.in +++ b/configure.in @@ -335,16 +335,32 @@ AC_SUBST(ORTH_FILES) AC_CHECK_PROG(HASDOCBOOK, docbook2html, yes, no) -AC_ARG_ENABLE(docs, [ --disable-docs Don't build and install documentation],,enable_docs=yes) +AM_CONDITIONAL(USEDOCBOOK, test "x$HASDOCBOOK" = xyes) -if test "x$enable_docs" = xyes; then - if test "x$HASDOCBOOK" != xyes; then - enable_docs=no - fi +default_docs="yes" +# +# Check if docs exist or can be created +# +if test x$HASDOCBOOK = xno; then + if test -f doc/fonts-conf.5; then + : + else + default_docs="no" + fi fi +AC_ARG_ENABLE(docs, [ --disable-docs Don't build and install documentation],,enable_docs=$default_docs) + AM_CONDITIONAL(ENABLE_DOCS, test "x$enable_docs" = xyes) +if test "x$enable_docs" = xyes; then + DOCSRC="doc" +else + DOCSRC="" +fi + +AC_SUBST(DOCSRC) + # # Figure out where to install documentation # diff --git a/doc/Makefile.am b/doc/Makefile.am index 6a9d782..b98c13b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -93,7 +93,7 @@ EXTRA_DIST = $(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(FNCS_TMPL) SUFFIXES=.fncs .sgml .txt .html -if ENABLE_DOCS +if USEDOCBOOK .fncs.sgml: $(RM) $@ |