[yelp] Convert docs subdirectory to non-recursive make



commit d93027a5710d78b0060555c7910a0db97a91c9cd
Author: David King <amigadave amigadave com>
Date:   Wed Oct 21 15:10:32 2015 +0100

    Convert docs subdirectory to non-recursive make

 Makefile.am                 |   46 +++++++++++++++++++++++++++++++++++++-----
 configure.ac                |    1 -
 docs/Makefile.am            |    1 -
 docs/libyelp/version.xml.in |    2 +-
 4 files changed, 41 insertions(+), 9 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 3d36d2e..0914673 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
-SUBDIRS = po data docs
+SUBDIRS = po data
 
 # Libtool is utterly broken when it comes to ordering library dependencies.
 # Hack around this awfulness: https://lists.gnu.org/archive/html/libtool/2004-10/msg00051.html
@@ -248,10 +248,6 @@ yelp_LDADD = \
 
 yelp_LDFLAGS = $(WARN_LDFLAGS)
 
-install-exec-hook:
-       rm -f $(DESTDIR)$(bindir)/gnome-help && \
-       $(LN_S) yelp $(DESTDIR)$(bindir)/gnome-help
-
 YELP_COMMON_CFLAGS =                           \
        $(YELP_CFLAGS)                          \
        $(WARN_CFLAGS)                          \
@@ -311,6 +307,39 @@ tests_test_view_LDADD = \
        $(YELP_COMMON_LDADD) \
        libyelp/libyelp.la
 
+gtkdoc_builddir = $(top_builddir)/docs/libyelp
+gtkdoc_distdir = $(top_distdir)/docs/libyelp
+gtkdoc_srcdir = $(top_srcdir)/docs/libyelp
+
+all-local: $(bin_PROGRAMS)
+       cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) all
+check-local:
+       cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) check
+clean-local:
+       cd $(gtkdoc_builddir) && if test -e Makefile ; then \
+               $(MAKE) $(AM_MAKEFLAGS) clean ; \
+       fi
+distclean-local:
+       cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) distclean
+docs: $(lib_LTLIBRARIES)
+       cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) docs
+install-data-local:
+       cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) install-data
+uninstall-local:
+       cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) uninstall
+
+dist-hook:
+       $(MKDIR_P) $(gtkdoc_distdir)
+       cp $(gtkdoc_srcdir)/Makefile.am $(gtkdoc_srcdir)/Makefile.in $(gtkdoc_distdir)
+       cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) \
+               distdir="../../$(gtkdoc_distdir)" \
+               top_distdir="../../$(top_distdir)" \
+               dist-hook
+
+install-exec-hook:
+       rm -f $(DESTDIR)$(bindir)/gnome-help && \
+       $(LN_S) yelp $(DESTDIR)$(bindir)/gnome-help
+
 @INTLTOOL_DESKTOP_RULE@
 
 desktopdir = $(datadir)/applications
@@ -401,7 +430,10 @@ dist_noinst_DATA = \
        data/domains/yelp.pot \
        data/domains/yelp.xml.in \
        data/domains/yelp.xml \
-       libyelp/yelp-marshal.list
+       docs/libyelp/libyelp-docs.xml \
+       docs/libyelp/version.xml.in \
+       libyelp/yelp-marshal.list \
+       gtk-doc.make
 
 dist_noinst_SCRIPTS = \
        autogen.sh
@@ -415,3 +447,5 @@ DISTCHECK_CONFIGURE_FLAGS = \
        --enable-bz2 \
        --enable-gtk-doc \
        --enable-lzma
+
+.PHONY: docs
diff --git a/configure.ac b/configure.ac
index 711f071..dc0bee9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -152,7 +152,6 @@ GTK_DOC_CHECK([1.13],[--flavour no-tmpl])
 
 AC_CONFIG_FILES([
 Makefile
-docs/Makefile
 docs/libyelp/Makefile
 docs/libyelp/version.xml
 data/Makefile
diff --git a/docs/libyelp/version.xml.in b/docs/libyelp/version.xml.in
index d78bda9..a24f987 100644
--- a/docs/libyelp/version.xml.in
+++ b/docs/libyelp/version.xml.in
@@ -1 +1 @@
- VERSION@
+ PACKAGE_VERSION@


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]