[glib] Fix up man page handling



commit e6e7015bbd253b01b51186a931cdd58dfb4390f2
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Apr 23 14:52:26 2010 -0400

    Fix up man page handling
    
    Turns out the formatted man pages did not end up in the tarballs. Doh.

 docs/reference/gio/Makefile.am |   32 +++++++++++++++++++++-----------
 1 files changed, 21 insertions(+), 11 deletions(-)
---
diff --git a/docs/reference/gio/Makefile.am b/docs/reference/gio/Makefile.am
index cac6899..fbcc32d 100644
--- a/docs/reference/gio/Makefile.am
+++ b/docs/reference/gio/Makefile.am
@@ -133,27 +133,37 @@ include $(top_srcdir)/gtk-doc.make
 EXTRA_DIST +=			\
 	version.xml.in
 
-if ENABLE_MAN
-
 man_MANS =			\
 	gio-querymodules.1	\
 	gschema-compile.1	\
 	gsettings.1	\
 	gsettings-schema-convert.1
 
-$(man_MANS) : sgml-build.stamp
+if ENABLE_MAN
 
-%.1 : %.xml
+.xml.1:
 	@XSLTPROC@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
 
+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
 
-DISTCLEANFILES = $(man_MANS)
+MAINTAINERCLEANFILES = $(man_MANS) $(BUILT_SOURCES)
+
+EXTRA_DIST += $(man_MANS)
 
-BUILT_EXTRA_DIST = $(man_MANS)
+dist-hook-local: dist-local-check-mans-enabled gio-docs-clean all-local
 
-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
+gio-docs-clean: clean
+	cd $(srcdir) && rm -rf xml html



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