[gtk+] Try to fix up man page handling



commit a376adbcea2664a171018bfd7642681afad135ac
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue May 11 13:31:53 2010 -0400

    Try to fix up man page handling

 docs/reference/gtk/Makefile.am |   32 +++++++++++++++++++++++---------
 1 files changed, 23 insertions(+), 9 deletions(-)
---
diff --git a/docs/reference/gtk/Makefile.am b/docs/reference/gtk/Makefile.am
index 72e6233..ced81f0 100644
--- a/docs/reference/gtk/Makefile.am
+++ b/docs/reference/gtk/Makefile.am
@@ -365,24 +365,38 @@ EXTRA_DIST += version.xml.in
 
 ########################################################################
 
-if ENABLE_MAN
-
 man_MANS = 				\
 	gtk-query-immodules-3.0.1	\
 	gtk-update-icon-cache-3.0.1	\
 	gtk-builder-convert-3.0.1
 
-%.1 : %.xml
+if ENABLE_MAN
+
+.xml.1:
 	@XSLTPROC@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
 
-BUILT_EXTRA_DIST = $(man_MANS)
+dist-local-check-mans-enabled:
+	if grep "Man generation disabled" $(man_MANS) >/dev/null; then $(RM) $(man_MANS); fi
+
+else
+
+$(man_MANS):
+	echo Man generation disabled.  Creating dummy $    Configure with --enable-man to enable it.
+	echo Man generation disabled.  Remove this file, configure with --enable-man, and rebuild Pango > $@
+
+dist-local-check-mans-enabled:
+	echo "*** --enable-man must be used in order to make dist"
+	false
 
 endif
 
-dist-hook-local: $(BUILT_EXTRA_DIST)
-	files='$(BUILT_EXTRA_DIST)';				\
-	for f in $$files; do					\
-	  if test -f $$f; then d=.; else d=$(srcdir); fi;	\
-	  cp $$d/$$f $(distdir) || exit 1; done
+MAINTAINERCLEANFILES = $(man_MANS) $(BUILT_SOURCES)
+
+EXTRA_DIST += $(man_MANS)
+
+dist-hook-local: dist-local-check-mans-enabled gtk-docs-clean all-local
+
+gtk-docs-clean: clean
+	cd $(srcdir) && rm -rf xml html
 
 -include $(top_srcdir)/git.mk



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