[Gtk-sharp-list] conditionally compile docs

John Luke jluke@users.sourceforge.net
Wed, 24 Mar 2004 15:30:37 -0500


--=-090vqotbuNdGYoMHbziA
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hello,
	Attached is a patch to conditionally compile and install the docs if
you already have monodoc installed.  Ok to commit?

--=-090vqotbuNdGYoMHbziA
Content-Disposition: attachment; filename=monodoc.diff
Content-Type: text/x-diff; name=monodoc.diff; charset=UTF-8
Content-Transfer-Encoding: 7bit

? monodoc.diff
Index: ChangeLog
===================================================================
RCS file: /cvs/public/gtk-sharp/ChangeLog,v
retrieving revision 1.710
diff -u -r1.710 ChangeLog
--- ChangeLog	24 Mar 2004 19:38:29 -0000	1.710
+++ ChangeLog	24 Mar 2004 19:57:35 -0000
@@ -2,6 +2,12 @@
 
 	* samples/gconf/Makefile.am:
 	changes SOURCES to FILES to make automake 1.8 happy
+	* configure.in: check for 'monodoc' in path and conditionally
+	set ENABLE_MONODOC, output doc/Makefile
+	* Makefile.am: add doc to SUBDIRS
+	* doc/Makefile.am: conditionally build and install docs base on
+	ENABLE_MONODOC conditional, use monodoc --assemble and --update
+	* doc/makefile: move to Makefile.am
 
 2003-03-24  Jorn Baayen  <jorn@nl.linux.org>
 
Index: Makefile.am
===================================================================
RCS file: /cvs/public/gtk-sharp/Makefile.am,v
retrieving revision 1.1
diff -u -r1.1 Makefile.am
--- Makefile.am	12 Mar 2004 21:18:05 -0000	1.1
+++ Makefile.am	24 Mar 2004 19:57:35 -0000
@@ -1,4 +1,4 @@
-SUBDIRS = sources generator parser glib pango atk gdk gtk glade art gnome gda gnomedb gtkhtml gconf rsvg vte sample
+SUBDIRS = sources generator parser glib pango atk gdk gtk glade art gnome gda gnomedb gtkhtml gconf rsvg vte sample doc
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = gtk-sharp.pc
Index: configure.in
===================================================================
RCS file: /cvs/public/gtk-sharp/configure.in,v
retrieving revision 1.50
diff -u -r1.50 configure.in
--- configure.in	22 Mar 2004 06:23:07 -0000	1.50
+++ configure.in	24 Mar 2004 19:57:35 -0000
@@ -150,6 +150,13 @@
 AC_SUBST(BASE_DEPENDENCIES_CFLAGS)
 AC_SUBST(BASE_DEPENDENCIES_LIBS)
 
+AC_PATH_PROG(MONODOC, monodoc, no)
+if test "x$MONODOC" = "xno" ; then
+enable_monodoc="no"
+else
+enable_monodoc="yes"
+fi
+
 AM_CONDITIONAL(ENABLE_LIBART, test "x$enable_libart" = "xyes")
 AM_CONDITIONAL(ENABLE_GNOME, test "x$enable_gnome" = "xyes")
 AM_CONDITIONAL(ENABLE_GLADE, test "x$enable_glade" = "xyes")
@@ -158,6 +165,7 @@
 AM_CONDITIONAL(ENABLE_RSVG, test "x$enable_rsvg" = "xyes")
 AM_CONDITIONAL(ENABLE_GTKHTML, test "x$enable_gtkhtml" = "xyes")
 AM_CONDITIONAL(ENABLE_VTE, test "x$enable_vte" = "xyes")
+AM_CONDITIONAL(ENABLE_MONODOC, test "x$enable_monodoc" = "xyes")
 
 
 AC_SUBST(CFLAGS)
@@ -168,6 +176,7 @@
 parser/GAPI/Makefile
 generator/Makefile
 generator/gapi-codegen
+doc/Makefile
 glib/Makefile
 glib/glue/Makefile
 pango/Makefile
@@ -227,4 +236,3 @@
 echo "            autogen.sh to include them in the build."
 echo ""
 echo "---"
-
Index: doc/.cvsignore
===================================================================
RCS file: /cvs/public/gtk-sharp/doc/.cvsignore,v
retrieving revision 1.2
diff -u -r1.2 .cvsignore
--- doc/.cvsignore	6 Aug 2003 11:28:39 -0000	1.2
+++ doc/.cvsignore	24 Mar 2004 19:57:35 -0000
@@ -1,3 +1,5 @@
 gtk-sharp-docs.zip
 gtk-sharp-docs.tree
 tmp
+Makefile
+Makefile.in
Index: doc/Makefile.am
===================================================================
RCS file: doc/Makefile.am
diff -N doc/Makefile.am
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ doc/Makefile.am	24 Mar 2004 19:57:35 -0000
@@ -0,0 +1,26 @@
+ASSEMBLER = monodoc --assemble
+UPDATER = monodoc --update
+DIRS = glib pango atk gdk gtk glade art gnome gda gnomedb gconf/GConf gconf/GConf.PropertyEditors rsvg gtkhtml
+
+if ENABLE_MONODOC
+
+all: gtk-sharp-docs.zip gtk-sharp-docs.tree
+
+gtk-sharp-docs.zip gtk-sharp-docs.tree: en/*/*.xml en/*.xml
+	$(ASSEMBLER) --ecma en -o gtk-sharp-docs
+
+update:
+	for i in $(DIRS); do                    		\
+		$(UPDATER) ../$$i/*.dll -o ./en -f || exit 1;	\
+        done
+
+install-data-local: gtk-sharp-docs.zip gtk-sharp-docs.tree 
+	install -m 644 gtk-sharp-docs.zip gtk-sharp-docs.tree `monodoc --get-sourcesdir`
+	install -m 644 gtk-sharp-docs.source `monodoc --get-sourcesdir`
+
+endif
+
+CLEANFILES = gtk-sharp-docs.zip gtk-sharp-docs.tree
+
+EXTRA_DIST = gtk-sharp-docs.source
+
Index: doc/makefile
===================================================================
RCS file: doc/makefile
diff -N doc/makefile
--- doc/makefile	28 Oct 2003 00:47:57 -0000	1.24
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-prefix=/usr
-BROWSER=../../monodoc/browser/browser.exe
-ASSEMBLER=../../monodoc/browser/assembler.exe
-UPDATER=../../monodoc/generator/updater.exe
-DIRS=glib pango atk gdk gtk glade art gnome gda gnomedb gconf/GConf gconf/GConf.PropertyEditors rsvg gtkhtml
-
-all: gtk-sharp-docs.zip gtk-sharp-docs.tree
-
-b:
-	mono --debug $(BROWSER)
-
-gtk-sharp-docs.zip gtk-sharp-docs.tree: en/*/*.xml en/*.xml
-	mono $(ASSEMBLER) --ecma en -o gtk-sharp-docs
-
-update:
-	for i in $(DIRS); do                    		\
-		mono --debug $(UPDATER) ../$$i/*.dll -o ./en -f || exit 1;	\
-        done
-
-install: gtk-sharp-docs.zip gtk-sharp-docs.tree 
-	install -m 644 gtk-sharp-docs.zip gtk-sharp-docs.tree `monodoc --get-sourcesdir`
-	install -m 644 gtk-sharp-docs.source `monodoc --get-sourcesdir`
-
-clean:
-	rm -f *.tree
-	rm -f *zip

--=-090vqotbuNdGYoMHbziA--