From 538f1579e86fdcf471cea58945bf8c674d5b91e7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 2 Jan 2013 18:07:13 -0600 Subject: [PATCH] Trying to fix distcheck Doesn't work though :(. Building docs is very fragile... At least, if docbook is present, distcheck passes now. --- Makefile.am | 11 +++++++++-- configure.ac | 4 ---- doc/Makefile.am | 8 ++++++++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index cbc3df0..6aee88a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,10 +21,15 @@ # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -DOCSRC=@DOCSRC@ SUBDIRS=fontconfig fc-case fc-lang fc-glyphname src \ fc-cache fc-cat fc-list fc-match fc-pattern fc-query fc-scan \ - conf.d $(DOCSRC) test + conf.d test +if ENABLE_DOCS +SUBDIRS += doc +DIST_SUBDIRS = $(SUBDIRS) +else +DIST_SUBDIRS = $(SUBDIRS) doc +endif AUTOMAKE_OPTIONS = dist-bzip2 ACLOCAL_AMFLAGS = -I m4 @@ -149,4 +154,6 @@ debuild-dirs: distdir cp -a $(distdir) $(distdir).orig $(RM) -r $(distdir).orig/debian +DISTCHECK_CONFIGURE_FLAGS = + -include $(top_srcdir)/git.mk diff --git a/configure.ac b/configure.ac index 3a89e7e..3f0ffbf 100644 --- a/configure.ac +++ b/configure.ac @@ -633,7 +633,6 @@ AC_ARG_ENABLE(docs, AM_CONDITIONAL(ENABLE_DOCS, test "x$enable_docs" = xyes) if test "x$enable_docs" = xyes; then - DOCSRC="doc" tmp=funcs.$$ cat $srcdir/doc/*.fncs | awk ' /^@TITLE@/ { if (!done) { printf ("%s\n", $2); done = 1; } } @@ -643,11 +642,8 @@ if test "x$enable_docs" = xyes; then echo DOCMAN3 $DOCMAN3 rm -f $tmp else - DOCSRC="" DOCMAN3="" fi - -AC_SUBST(DOCSRC) AC_SUBST(DOCMAN3) diff --git a/doc/Makefile.am b/doc/Makefile.am index cf1fb89..c6b095c 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -199,10 +199,18 @@ all-local: $(BUILT_DOCS) $(HTML_DIR)/* clean-local: $(RM) -r $(HTML_DIR) devel-man [ "x$(builddir)" != "x$(srcdir)" ] && $(RM) $(builddir)/*.sgml || : +dist-local-check-docs-enabled: + @true else htmldoc_DATA += $(srcdir)/$(HTML_DIR)/* all-local: clean-local: +dist-local-check-docs-enabled: + @echo "*** --enable-man must be used in order to make dist" + @false endif +# force doc rebulid after configure +dist-hook-local: dist-local-check-docs-enabled + -include $(top_srcdir)/git.mk -- 2.7.4