[Mono-docs-list] Monodoc split, redux

Peter Williams peter@newton.cx
Sun, 20 Feb 2005 19:02:41 -0500


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

Hi all,

On Tue, 2005-02-01 at 22:09 -0500, Miguel de Icaza wrote:
> Lets look at this issue after 1.1.4 is officially out.

Ok, as a first step to splitting things up, I have a patch that
separates the GUI tools and backend tools into different directories
within the Monodoc source tree: the backend tools are moved into a new
subdirectory called 'Monodoc'. So once the sdk-tools / mono-tools /
whatever deal is worked out, it should be easier to grab only the GUI
bits and split them out. Does this look good? (Notice that all the SVN
file moves aren't shown; a fair number of files have to be moved from
browser/ to Monodoc/.)

Peter

-- 
Peter Williams                          peter@newton.cx

"[Ninjas] are cool; and by cool, I mean totally sweet."
                              -- REAL Ultimate Power

--=-lvoHWG9Gliq4fzBgqojx
Content-Disposition: attachment; filename=dirsplit.diff
Content-Type: text/x-patch; name=dirsplit.diff; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Index: browser/ChangeLog
===================================================================
--- browser/ChangeLog	(revision 40961)
+++ browser/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2005-02-20  Peter Williams  <peter@newton.cx>
+
+	* Makefile.am: Remove most of the build rules and put them in the
+	new Monodoc/ directory that contains the non-GUI code.
+
 2005-02-03  Atsushi Enomoto  <atsushi@ximian.com>
 
 	* xhtml-provider.cs : added more URI scheme. Without them monkeyguide
Index: browser/Makefile.am
===================================================================
--- browser/Makefile.am	(revision 40961)
+++ browser/Makefile.am	(working copy)
@@ -1,13 +1,8 @@
-assemblydir = $(libdir)
-
 if WITH_GTK
-monodoc_gtk_data = browser.exe
+monodoc_gtk_data = browser.exe admin.exe
 endif
 
-monodoc_DATA = $(monodoc_gtk_data) assembler.exe normalize.exe monodoc.xml mod.exe validate.exe cs2ecma.exe
-noinst_DATA = monodoc.dll monodoc.dll.config
-CLEANFILES = monodoc.dll assembler.exe $(monodoc_unix_DATA) normalize.exe mod.exe validate.exe cs2ecma.exe
-DISTCLEANFILE = AssemblyInfo.cs
+monodoc_DATA = $(monodoc_gtk_data) 
 CSC=mcs
 
 if USE_CYGPATH
@@ -18,30 +13,6 @@
 GACROOT=$(DESTDIR)$(libdir)
 endif
 
-monodoc_sources = \
-	$(srcdir)/colorizer.cs		\
-	$(srcdir)/man-provider.cs 	\
-	$(srcdir)/monohb-provider.cs 	\
-	$(srcdir)/xhtml-provider.cs 	\
-	$(srcdir)/ecma-provider.cs	\
-	$(srcdir)/simple-provider.cs 	\
-	$(srcdir)/html-helper.cs	\
-	$(srcdir)/provider.cs 		\
-	$(srcdir)/index.cs 		\
-	$(srcdir)/error-provider.cs 	\
-	$(srcdir)/ecmaspec-provider.cs 	\
-	$(srcdir)/editing.cs 		\
-	$(srcdir)/settings.cs		\
-	$(srcdir)/commentservice.cs	\
-	$(srcdir)/XmlNodeWriter.cs	\
-	AssemblyInfo.cs	
-
-assembler_sources = \
-	$(srcdir)/assembler.cs 
-
-dump_sources      = \
-	$(srcdir)/dump.cs 
-
 browser_sources   = \
 	$(srcdir)/browser.cs		\
 	$(srcdir)/list.cs 		\
@@ -54,103 +25,20 @@
 	$(srcdir)/admin.cs		\
 	$(srcdir)/Contributions.cs
 
-validate_sources = \
-	$(srcdir)/validate.cs
+browser_assemblies = -pkg:gtkhtml-sharp -pkg:glade-sharp -r:System.Web.Services.dll
 
-cs2ecma_sources = \
-	$(srcdir)/cs2ecma.cs
-
-browser_assemblies = -pkg:gtkhtml-sharp -pkg:glade-sharp -r:System.Web.Services
-
 EXTRA_DIST = \
-	$(monodoc_sources) $(assembler_sources) \
-	$(dump_sources) $(browser_sources) 	\
-	$(validate_sources) monodoc-ecma.xsd	\
-	browser.glade monodoc.xml mono-ecma.xsl	\
-	normalize.cs monodoc.dll.config.in	\
-	ecmaspec-html.xsl mod.cs		\
-	AssemblyInfo.cs.in $(cs2ecma_sources)
+	$(browser_sources) $(admin_sources) \
+	browser.glade admin.glade
 
-monodoc_FILES = browser.exe assembler.exe normalize.exe admin.exe validate.exe cs2ecma.exe
+browser.exe: $(browser_sources) $(srcdir)/browser.glade $(srcdir)/../monodoc.png ../Monodoc/monodoc.dll
+	$(CSC) -debug -out:browser.exe $(browser_sources) -resource:$(srcdir)/../monodoc.png,monodoc.png -resource:$(srcdir)/browser.glade,browser.glade  $(browser_assemblies) -r:../Monodoc/monodoc.dll
 
-assembler.exe: $(assembler_sources) monodoc.dll
-	$(CSC) /debug /out:assembler.exe $(assembler_sources) -r:ICSharpCode.SharpZipLib.dll -r:./monodoc.dll
+admin.exe: $(admin_sources) $(srcdir)/admin.glade ../Monodoc/monodoc.dll
+	$(CSC) -debug -out:admin.exe $(admin_sources) -resource:$(srcdir)/admin.glade,admin.glade -r:../Monodoc/monodoc.dll $(browser_assemblies) -r:System.Drawing
 
-browser.exe: $(browser_sources) $(srcdir)/browser.glade $(srcdir)/../monodoc.png monodoc.dll
-	$(CSC) -debug -out:browser.exe $(browser_sources) -resource:$(srcdir)/../monodoc.png,monodoc.png -resource:$(srcdir)/browser.glade,browser.glade  $(browser_assemblies) -r:./monodoc.dll
-
-admin.exe: $(admin_sources) $(srcdir)/admin.glade monodoc.dll
-	$(CSC) -debug -out:admin.exe $(admin_sources) -resource:$(srcdir)/admin.glade,admin.glade -r:./monodoc.dll $(browser_assemblies) -r:System.Drawing
-
-dump.exe: $(dump_sources) monodoc.dll
-	$(CSC) -debug -out:dump.exe $(dump_sources)  -r:ICSharpCode.SharpZipLib.dll -r:./monodoc.dll
-
-normalize.exe: normalize.cs
-	$(CSC) $(srcdir)/normalize.cs -out:normalize.exe
-
-validate.exe: validate.cs $(srcdir)/monodoc-ecma.xsd
-	$(CSC) $(srcdir)/validate.cs -out:validate.exe /resource:$(srcdir)/monodoc-ecma.xsd,monodoc-ecma.xsd
-
-cs2ecma.exe: cs2ecma.cs
-	$(CSC) $(srcdir)/cs2ecma.cs -out:cs2ecma.exe
-
-mono.pub: $(top_srcdir)/mono.pub
-	cp $(top_srcdir)/mono.pub .
-
-monodoc.dll: $(monodoc_sources) mono-ecma.xsl mono.pub
-	$(CSC) -debug -out:monodoc.dll -target:library /resource:$(srcdir)/mono-ecma.xsl,mono-ecma.xsl /resource:$(srcdir)/ecmaspec-html.xsl,ecmaspec-html.xsl $(monodoc_sources) -r:ICSharpCode.SharpZipLib.dll -r:System.Web -r:System.Web.Services
-
-monodoc.dll.config: $(srcdir)/monodoc.dll.config.in Makefile
-	if sed 's,@''monodoc_refdir@,$(monodoc_refdir),' $(srcdir)/monodoc.dll.config.in > $@t; then mv $@t $@; else rm -f $@t ; exit 1; fi
-
 b: browser.exe
 	MONO_PATH=. mono --debug browser.exe
 
 c: admin.exe
 	MONO_PATH=. mono --debug admin.exe
-
-mod.exe: mod.cs monodoc.dll
-	$(CSC) $(srcdir)/mod.cs -r:./monodoc.dll -out:mod.exe
-
-dist-hook:
-	mkdir $(distdir)/web
-	mkdir $(distdir)/web/xtree
-	mkdir $(distdir)/web/xtree/images
-	mkdir $(distdir)/web/xtree/images/msdn
-	mkdir $(distdir)/web/xtree/images/msdn2
-	mkdir $(distdir)/web/xtree/images/xp
-	mkdir $(distdir)/web/ptree
-	cp $(srcdir)/web/index.aspx $(srcdir)/web/monodoc.ashx $(distdir)/web
-	cp $(srcdir)/web/header.html $(srcdir)/web/monodoc.ashx $(distdir)/web
-	cp $(srcdir)/web/web.config $(srcdir)/web/monodoc.ashx $(distdir)/web
-	cp $(srcdir)/web/xtree/images/msdn/*gif $(distdir)/web/xtree/images/msdn
-	cp $(srcdir)/web/xtree/images/msdn2/*gif $(distdir)/web/xtree/images/msdn2
-	cp $(srcdir)/web/xtree/images/xp/*png $(distdir)/web/xtree/images/xp
-	cp $(srcdir)/web/xtree/images/*png $(distdir)/web/xtree/images
-	cp $(srcdir)/web/xtree/*js $(distdir)/web/xtree
-	cp $(srcdir)/web/xtree/*css $(distdir)/web/xtree
-	cp $(srcdir)/web/ptree/*css $(distdir)/web/ptree
-	cp $(srcdir)/web/ptree/*js $(distdir)/web/ptree
-
-
-bin/Monodoc.Contributions.dll: server.cs 
-	-mkdir bin
-	mcs -g server.cs -target:library -out:bin/Monodoc.Contributions.dll -r:System.Web -r:System.Web.Services -r:./monodoc.dll -r:System.Data -r:ByteFX.Data
-
-web: bin/Monodoc.Contributions.dll
-	mono --debug /mono/bin/xsp.exe
-
-db:
-	mysql -u admin -p 
-
-cleandb:
-	mysql -u admin -p < tables.sql
-
-up:
-	scp tables.sql server.cs server.asmx monodoc.dll root@www.go-mono.com:
-
-install-data-local:
-	$(GACUTIL) /i monodoc.dll /f /package gtk-sharp /gacdir $(GACDIR) /root $(GACROOT)
-
-uninstall-local:
-	$(GACUTIL) /u monodoc /package gtk-sharp /gacdir $(GACDIR)
Index: configure.in
===================================================================
--- configure.in	(revision 40961)
+++ configure.in	(working copy)
@@ -46,11 +46,12 @@
 
 AC_OUTPUT([
 Makefile
+Monodoc/Makefile
+Monodoc/AssemblyInfo.cs
 browser/Makefile
 class/Makefile
 extras/Makefile
 tools/Makefile
 monodoc.pc
 monodoc
-browser/AssemblyInfo.cs
 ])
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40961)
+++ ChangeLog	(working copy)
@@ -1,3 +1,12 @@
+2005-02-20  Peter Williams  <peter@newton.cx>
+
+	* Makefile.am (SUBDIRS): Add new Monodoc subdir, put
+	browser after class to make sure we don't need GUI tools
+	to build docs.
+
+	* configure.in: Add output rules for files in new Monodoc/
+	subdir.
+
 2004-01-22  Joshua Tauberer  <tauberer@for.net>
 
 	* monodoc.in: Made the --help text a bit nicer.  Don't
Index: class/Makefile.am
===================================================================
--- class/Makefile.am	(revision 40961)
+++ class/Makefile.am	(working copy)
@@ -8,43 +8,45 @@
 	Mono.tree Mono.zip Mono.source 				\
 	Novell.source Novell.zip Novell.tree
 
+ASSEMBLER = mono --debug ../Monodoc/assembler.exe
+
 #
 # Netdocs contains all the .NET Framework documentation
 #
 netdocs: netdocs.tree
 
 netdocs.tree netdocs.zip: $(srcdir)/*/en/*/*.xml $(srcdir)/*/en/*.xml
-	mono --debug ../browser/assembler.exe --ecma $(srcdir)/corlib/en/ --ecma $(srcdir)/System/en/  --ecma $(srcdir)/System.XML/en/ --ecma $(srcdir)/System.Web/en --ecma $(srcdir)/System.Web.Services/en --ecma $(srcdir)/System.Data/en --ecma $(srcdir)/System.DirectoryServices/en --ecma $(srcdir)/System.Drawing/en --ecma $(srcdir)/System.Security/en -o netdocs 
+	$(ASSEMBLER) --ecma $(srcdir)/corlib/en/ --ecma $(srcdir)/System/en/  --ecma $(srcdir)/System.XML/en/ --ecma $(srcdir)/System.Web/en --ecma $(srcdir)/System.Web.Services/en --ecma $(srcdir)/System.Data/en --ecma $(srcdir)/System.DirectoryServices/en --ecma $(srcdir)/System.Drawing/en --ecma $(srcdir)/System.Security/en -o netdocs 
 
 #
 # All the Mono.* namespaces go into a single package
 #
 Mono.tree Mono.zip: $(srcdir)/Mono.Cairo/en/*/*.xml $(srcdir)/Mono.Posix/en/*/*.xml $(srcdir)/Mono.Security/en/*/*.xml $(srcdir)/Mono.Security.Win32/en/*/*.xml $(srcdir)/Commons.Xml.Relaxng/en/*/*.xml
-	mono --debug ../browser/assembler.exe --ecma $(srcdir)/Mono.Cairo/en --ecma $(srcdir)/Mono.Posix/en --ecma $(srcdir)/Mono.Security.Win32/en/ --ecma $(srcdir)/Mono.Security/en/ --ecma $(srcdir)/Commons.Xml.Relaxng/en/ -o Mono
+	$(ASSEMBLER) --ecma $(srcdir)/Mono.Cairo/en --ecma $(srcdir)/Mono.Posix/en --ecma $(srcdir)/Mono.Security.Win32/en/ --ecma $(srcdir)/Mono.Security/en/ --ecma $(srcdir)/Commons.Xml.Relaxng/en/ -o Mono
 
 #
 # All the Novell namespaces we handle go into a single file (one for now).
 #
 Novell.tree Novell.zip: $(srcdir)/Novell.Directory.Ldap/en/*/*.xml
-	mono --debug ../browser/assembler.exe --ecma $(srcdir)/Novell.Directory.Ldap/en/ -o Novell
+	$(ASSEMBLER) --ecma $(srcdir)/Novell.Directory.Ldap/en/ -o Novell
 
 #
 # These are the NUnit documents, not sure why we have these, if NUnit is well documented
 #
 nunit-docs.tree nunit-docs.zip: $(srcdir)/nunit/en/*/*.xml $(srcdir)/nunit/en/*.xml
-	mono --debug ../browser/assembler.exe --ecma $(srcdir)/nunit/en/ -o nunit-docs
+	$(ASSEMBLER) --ecma $(srcdir)/nunit/en/ -o nunit-docs
 
 #
 # Generation of C# errors, from the mcs source tree
 #
 cs-errors.tree cs-errors.zip: $(srcdir)/cs-errors.config
-	mono --debug ../browser/assembler.exe --error $(srcdir)/cs-errors.config -o cs-errors
+	$(ASSEMBLER) --error $(srcdir)/cs-errors.config -o cs-errors
 
 #
 # The ECMA C# specification, from Jon Jagger.
 #
 ecma334.tree ecma334.zip: $(srcdir)/../ecma334/*
-	mono --debug ../browser/assembler.exe --ecmaspec $(srcdir)/../ecma334 -o ecma334
+	$(ASSEMBLER) --ecmaspec $(srcdir)/../ecma334 -o ecma334
 
 CLEANFILES = \
 	ecma334.tree ecma334.zip 	\
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 40961)
+++ Makefile.am	(working copy)
@@ -1,4 +1,4 @@
-SUBDIRS = browser class extras tools
+SUBDIRS = Monodoc class browser extras tools
 
 EXTRA_DIST = monodoc.in monodoc.png monodoc.svg monodoc.desktop monodoc.pc mono.pub
 

--=-lvoHWG9Gliq4fzBgqojx
Content-Description: Monodoc/Makefile.am
Content-Disposition: attachment; filename=Makefile.am
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

assemblydir = $(libdir)

monodoc_DATA = assembler.exe normalize.exe monodoc.xml mod.exe validate.exe cs2ecma.exe
noinst_DATA = monodoc.dll monodoc.dll.config
CLEANFILES = monodoc.dll assembler.exe normalize.exe mod.exe validate.exe cs2ecma.exe
DISTCLEANFILE = AssemblyInfo.cs
CSC=mcs

if USE_CYGPATH
GACDIR=`cygpath -w $(libdir)`
GACROOT=`cygpath -w $(DESTDIR)$(libdir)`
else
GACDIR=$(libdir)
GACROOT=$(DESTDIR)$(libdir)
endif

monodoc_sources = \
	$(srcdir)/colorizer.cs		\
	$(srcdir)/man-provider.cs 	\
	$(srcdir)/monohb-provider.cs 	\
	$(srcdir)/xhtml-provider.cs 	\
	$(srcdir)/ecma-provider.cs	\
	$(srcdir)/simple-provider.cs 	\
	$(srcdir)/html-helper.cs	\
	$(srcdir)/provider.cs 		\
	$(srcdir)/index.cs 		\
	$(srcdir)/error-provider.cs 	\
	$(srcdir)/ecmaspec-provider.cs 	\
	$(srcdir)/editing.cs 		\
	$(srcdir)/settings.cs		\
	$(srcdir)/commentservice.cs	\
	AssemblyInfo.cs	

assembler_sources = \
	$(srcdir)/assembler.cs 

dump_sources      = \
	$(srcdir)/dump.cs 

validate_sources = \
	$(srcdir)/validate.cs

cs2ecma_sources = \
	$(srcdir)/cs2ecma.cs

EXTRA_DIST = \
	$(monodoc_sources) $(assembler_sources) \
	$(dump_sources) $(validate_sources) \
	monodoc-ecma.xsd monodoc.xml mono-ecma.xsl \
	normalize.cs monodoc.dll.config.in	\
	ecmaspec-html.xsl mod.cs		\
	AssemblyInfo.cs.in $(cs2ecma_sources)

assembler.exe: $(assembler_sources) monodoc.dll
	$(CSC) /debug /out:assembler.exe $(assembler_sources) -r:ICSharpCode.SharpZipLib.dll -r:./monodoc.dll

dump.exe: $(dump_sources) monodoc.dll
	$(CSC) -debug -out:dump.exe $(dump_sources)  -r:ICSharpCode.SharpZipLib.dll -r:./monodoc.dll

normalize.exe: normalize.cs
	$(CSC) $(srcdir)/normalize.cs -out:normalize.exe

validate.exe: validate.cs $(srcdir)/monodoc-ecma.xsd
	$(CSC) $(srcdir)/validate.cs -out:validate.exe /resource:$(srcdir)/monodoc-ecma.xsd,monodoc-ecma.xsd

cs2ecma.exe: cs2ecma.cs
	$(CSC) $(srcdir)/cs2ecma.cs -out:cs2ecma.exe

mono.pub: $(top_srcdir)/mono.pub
	cp $(top_srcdir)/mono.pub .

monodoc.dll: $(monodoc_sources) mono-ecma.xsl mono.pub
	$(CSC) -debug -out:monodoc.dll -target:library /resource:$(srcdir)/mono-ecma.xsl,mono-ecma.xsl /resource:$(srcdir)/ecmaspec-html.xsl,ecmaspec-html.xsl $(monodoc_sources) -r:ICSharpCode.SharpZipLib.dll -r:System.Web -r:System.Web.Services

monodoc.dll.config: $(srcdir)/monodoc.dll.config.in Makefile
	if sed 's,@''monodoc_refdir@,$(monodoc_refdir),' $(srcdir)/monodoc.dll.config.in > $@t; then mv $@t $@; else rm -f $@t ; exit 1; fi

mod.exe: mod.cs monodoc.dll
	$(CSC) $(srcdir)/mod.cs -r:./monodoc.dll -out:mod.exe

dist-hook:
	mkdir $(distdir)/web
	mkdir $(distdir)/web/xtree
	mkdir $(distdir)/web/xtree/images
	mkdir $(distdir)/web/xtree/images/msdn
	mkdir $(distdir)/web/xtree/images/msdn2
	mkdir $(distdir)/web/xtree/images/xp
	mkdir $(distdir)/web/ptree
	cp $(srcdir)/web/index.aspx $(srcdir)/web/monodoc.ashx $(distdir)/web
	cp $(srcdir)/web/header.html $(srcdir)/web/monodoc.ashx $(distdir)/web
	cp $(srcdir)/web/web.config $(srcdir)/web/monodoc.ashx $(distdir)/web
	cp $(srcdir)/web/xtree/images/msdn/*gif $(distdir)/web/xtree/images/msdn
	cp $(srcdir)/web/xtree/images/msdn2/*gif $(distdir)/web/xtree/images/msdn2
	cp $(srcdir)/web/xtree/images/xp/*png $(distdir)/web/xtree/images/xp
	cp $(srcdir)/web/xtree/images/*png $(distdir)/web/xtree/images
	cp $(srcdir)/web/xtree/*js $(distdir)/web/xtree
	cp $(srcdir)/web/xtree/*css $(distdir)/web/xtree
	cp $(srcdir)/web/ptree/*css $(distdir)/web/ptree
	cp $(srcdir)/web/ptree/*js $(distdir)/web/ptree


bin/Monodoc.Contributions.dll: server.cs 
	-mkdir bin
	mcs -g server.cs -target:library -out:bin/Monodoc.Contributions.dll -r:System.Web -r:System.Web.Services -r:./monodoc.dll -r:System.Data -r:ByteFX.Data

web: bin/Monodoc.Contributions.dll
	mono --debug /mono/bin/xsp.exe

db:
	mysql -u admin -p 

cleandb:
	mysql -u admin -p < tables.sql

up:
	scp tables.sql server.cs server.asmx monodoc.dll root@www.go-mono.com:

install-data-local:
	$(GACUTIL) /i monodoc.dll /f /package gtk-sharp /gacdir $(GACDIR) /root $(GACROOT)

uninstall-local:
	$(GACUTIL) /u monodoc /package gtk-sharp /gacdir $(GACDIR)

--=-lvoHWG9Gliq4fzBgqojx--