Trying to fix distcheck
authorBehdad Esfahbod <behdad@behdad.org>
Thu, 3 Jan 2013 00:07:13 +0000 (18:07 -0600)
committerBehdad Esfahbod <behdad@behdad.org>
Thu, 3 Jan 2013 00:23:55 +0000 (18:23 -0600)
Doesn't work though :(.  Building docs is very fragile...

At least, if docbook is present, distcheck passes now.

Makefile.am
configure.ac
doc/Makefile.am

index cbc3df0..6aee88a 100644 (file)
 #  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
index 3a89e7e..3f0ffbf 100644 (file)
@@ -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)
 
 
index cf1fb89..c6b095c 100644 (file)
@@ -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