[PATCH] Fix for bug #54070

Mario Sopena <[email protected]>
Newsgroups gmane.comp.gnome.mono.documentation,gmane.comp.gnome.mono.devel
Message-ID <[email protected]>
Hey,

    this patch fixes the bug
http://bugzilla.ximian.com/show_bug.cgi?id=54070 by making the
documentation errors conditional.

If mcs is not found, a warning text is displayed and the errors arent built.

Any comment before commiting?

Mario

_______________________________________________
Mono-docs-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-docs-list
monodoc.diff (text/x-patch, 1.6 KB)
Index: monodoc/configure.in
===================================================================
--- monodoc/configure.in	(revision 50360)
+++ monodoc/configure.in	(working copy)
@@ -14,6 +14,8 @@
 AC_PATH_PROG(RUNTIME, mono, no)
 AC_PATH_PROG(CSC, mcs, no)
 
+AC_CHECK_FILE(../mcs, build_cserrors=yes, build_cserrors=no)
+AM_CONDITIONAL(BUILD_CSERRORS, test "x$build_cserrors" = "xyes")
 
 if test "x$GACUTIL" = "xno" ; then
         AC_MSG_ERROR([No gacutil tool found])
@@ -60,3 +62,10 @@
 scripts/mdvalidater
 scripts/mdcs2ecma
 ])
+
+if test "x$build_cserrors" = "xno" ; then
+	echo "---"
+	echo "The sources of the mono compiler (mcs) were not found."
+	echo "To include the COMPILER ERRORS in the documentation,"
+	echo "download the mcs sources and rerun autogen.sh"
+fi
Index: monodoc/class/Makefile.am
===================================================================
--- monodoc/class/Makefile.am	(revision 50360)
+++ monodoc/class/Makefile.am	(working copy)
@@ -1,5 +1,6 @@
 sourcesdir = $(libdir)/monodoc/sources
 
+if BUILD_CSERRORS
 sources_DATA = \
 	ecma334.tree ecma334.zip ecma334.source 		\
 	netdocs.tree netdocs.zip netdocs.source			\
@@ -7,6 +8,14 @@
 	cs-errors.tree cs-errors.zip cs-errors.source 		\
 	Mono.tree Mono.zip Mono.source 				\
 	Novell.source Novell.zip Novell.tree
+else
+sources_DATA = \
+	ecma334.tree ecma334.zip ecma334.source 		\
+	netdocs.tree netdocs.zip netdocs.source			\
+	nunit-docs.tree nunit-docs.zip nunit-docs.source	\
+	Mono.tree Mono.zip Mono.source 				\
+	Novell.source Novell.zip Novell.tree
+endif
 
 ASSEMBLER = ../engine/assembler.exe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.