[monodoc] Add EcmaUrlParser.jay to EXTRA_DIST
[mono.git] / mcs / tools / monodoc / Makefile
index cf2e47ec246fde018cd6b05622329f2afc6861c9..c7fc32db205fa804d7a2fca9d3ccaf59fb6b978f 100644 (file)
@@ -4,8 +4,59 @@ include ../../build/rules.make
 
 LIBRARY = monodoc.dll
 LIBRARY_PACKAGE = monodoc
+# Remove a bunch of "obsolete"-type warning for Lucene.NET
+# also activate legacy mode to compile old monodoc.dll api
+LOCAL_MCS_FLAGS = /nowarn:618,612,672,809 /define:LEGACY_MODE
+
+JAY_FLAGS = -ct
+
+IMAGES = \
+       Resources/images/bc_bg.png              \
+       Resources/images/bc_separator.png       \
+       Resources/images/error.png              \
+       Resources/images/hatch.png              \
+       Resources/images/headerbg.png           \
+       Resources/images/help.png               \
+       Resources/images/house.png              \
+       Resources/images/members.png            \
+       Resources/images/namespace.png          \
+       Resources/images/privclass.png          \
+       Resources/images/privdelegate.png       \
+       Resources/images/privenumeration.png    \
+       Resources/images/privevent.png          \
+       Resources/images/privextension.png      \
+       Resources/images/privfield.png          \
+       Resources/images/privinterface.png      \
+       Resources/images/privmethod.png         \
+       Resources/images/privproperty.png       \
+       Resources/images/privstructure.png      \
+       Resources/images/protclass.png          \
+       Resources/images/protdelegate.png       \
+       Resources/images/protenumeration.png    \
+       Resources/images/protevent.png          \
+       Resources/images/protextension.png      \
+       Resources/images/protfield.png          \
+       Resources/images/protinterface.png      \
+       Resources/images/protmethod.png         \
+       Resources/images/protproperty.png       \
+       Resources/images/protstructure.png      \
+       Resources/images/pubclass.png           \
+       Resources/images/pubdelegate.png        \
+       Resources/images/pubenumeration.png     \
+       Resources/images/pubevent.png           \
+       Resources/images/pubextension.png       \
+       Resources/images/pubfield.png           \
+       Resources/images/pubinterface.png       \
+       Resources/images/pubmethod.png          \
+       Resources/images/pubproperty.png        \
+       Resources/images/pubstructure.png       \
+       Resources/images/reference.png          \
+       Resources/images/treebg.png             
+
+IMAGE_RESOURCE_COMMAND = $(foreach file,$(IMAGES),/resource:$(file),$(notdir $(file)))
 
 RESOURCE_FILES = \
+       ../../docs/monodoc.xml            \
        Resources/base.css                \
        Resources/ecmaspec-html-css.xsl   \
        Resources/ecmaspec-html.xsl       \
@@ -14,34 +65,28 @@ RESOURCE_FILES = \
        Resources/home.html               \
        Resources/Lminus.gif              \
        Resources/Lplus.gif               \
+       Resources/mdoc-html-format.xsl    \
        Resources/mdoc-html-utils.xsl     \
        Resources/mdoc-sections-css.xsl   \
        Resources/mdoc-sections.xsl       \
        Resources/mono-ecma-css.xsl       \
        Resources/mono-ecma-impl.xsl      \
        Resources/mono-ecma.css           \
-       Resources/mono-ecma.xsl
-
-TEST_FILES = \
-       Test/man-provider-test.cs   \
-       Test/man-test-1.1           \
-       Test/man-test-1.html        \
-       Test/man-test-2.1           \
-       Test/man-test-2.html        \
-       Test/man-test-3.1           \
-       Test/man-test-3.html        \
-       Test/man-test-4.1           \
-       Test/man-test-4.html
+       Resources/mono-ecma.xsl                 \
+       Resources/toc-html.xsl           \
+       $(IMAGES)
 
 EXTRA_DISTFILES = \
        monodoc.dll.config.in   \
-       $(RESOURCE_FILES)       \
-       $(TEST_FILES)
+       $(RESOURCE_FILES)   \
+       Monodoc.Ecma/EcmaUrlParser.jay
 
 LIB_MCS_FLAGS = \
+       /unsafe                                                           \
        /codepage:utf8                                                    \
-       /nowarn:169,164,162,168,219                                       \
+       /nowarn:169,164,162,168,219,618,612                               \
        /r:Commons.Xml.Relaxng                                            \
+       /resource:../../docs/monodoc.xml,monodoc.xml                      \
        /resource:Resources/base.css,base.css                             \
        /resource:Resources/ecmaspec-html-css.xsl,ecmaspec-html-css.xsl   \
        /resource:Resources/ecmaspec-html.xsl,ecmaspec-html.xsl           \
@@ -50,6 +95,7 @@ LIB_MCS_FLAGS = \
        /resource:Resources/home.html,home.html                           \
        /resource:Resources/Lminus.gif,Lminus.gif                         \
        /resource:Resources/Lplus.gif,Lplus.gif                           \
+       /resource:Resources/mdoc-html-format.xsl,mdoc-html-format.xsl     \
        /resource:Resources/mdoc-html-utils.xsl,mdoc-html-utils.xsl       \
        /resource:Resources/mdoc-sections-css.xsl,mdoc-sections-css.xsl   \
        /resource:Resources/mdoc-sections.xsl,mdoc-sections.xsl           \
@@ -57,50 +103,43 @@ LIB_MCS_FLAGS = \
        /resource:Resources/mono-ecma-impl.xsl,mono-ecma-impl.xsl         \
        /resource:Resources/mono-ecma.css,mono-ecma.css                   \
        /resource:Resources/mono-ecma.xsl,mono-ecma.xsl                   \
+       /resource:Resources/toc-html.xsl,toc-html.xsl                     \
+       $(IMAGE_RESOURCE_COMMAND)                                                             \
        /r:ICSharpCode.SharpZipLib                                        \
        /r:$(corlib)                                                      \
        /r:System.dll                                                     \
-       /r:System.Web                                                     \
-       /r:System.Web.Services                                            \
-       /r:System.Xml.dll
+       /r:System.Core.dll                                                \
+       /r:System.Xml.dll                                                 \
+       /r:System.Xml.Linq.dll                                            \
+       /r:System.Configuration.dll
 
-include ../../build/library.make
-
-$(the_lib): Makefile $(RESOURCE_FILES)
-
-all-local: $(the_lib).config
+TEST_MCS_FLAGS = /r:System.Core.dll /r:System.Xml.dll
 
-$(the_lib).config: Makefile
-       sed 's,@monodoc_refdir@,$(mono_libdir)/monodoc,g' monodoc.dll.config.in > $@
+DOC_SOURCE_DIRS = \
+       ../../docs \
+       ../../../docs
 
-test: Test/man-provider-test.exe
+DOC_SOURCES = $(foreach dir,$(DOC_SOURCE_DIRS),$(wildcard $(dir)/*.source $(dir)/*.tree $(dir)/*.zip))
 
-run-test-local: check-man-provider
+include ../../build/library.make
 
-run-test-update: check-man-provider-update
+$(the_lib): Makefile $(RESOURCE_FILES)
 
-Test/man-provider-test.exe: Test/man-provider-test.cs $(the_lib)
-       $(CSCOMPILE) -target:exe -out:$@ $< /r:$(the_lib)
+all-local: $(the_lib).config Monodoc.Ecma/EcmaUrlParser.cs
 
-my_mono = \
-       MONO_REGISTRY_PATH="$(HOME)/.mono/registry" \
-       $(TEST_RUNTIME) \
-       $(RUNTIME_FLAGS)
+test-local: setup-doc-sources
 
-check-man-provider: Test/man-provider-test.exe
-       $(my_mono) $< Test/man-test1.1 | diff - Test/man-test1.html
-       $(my_mono) $< Test/man-test2.1 | diff - Test/man-test2.html
-       $(my_mono) $< Test/man-test3.1 | diff - Test/man-test3.html
-       $(my_mono) $< Test/man-test4.1 | diff - Test/man-test4.html
+dist-local: Monodoc.Ecma/EcmaUrlParser.cs
 
-check-man-provider-update: Test/man-provider-test.exe
-       $(my_mono) $< Test/man-test1.1 > Test/man-test1.html
-       $(my_mono) $< Test/man-test2.1 > Test/man-test2.html
-       $(my_mono) $< Test/man-test3.1 > Test/man-test3.html
-       $(my_mono) $< Test/man-test4.1 > Test/man-test4.html
+$(the_lib).config: Makefile monodoc.dll.config.in
+       sed 's,@monodoc_refdir@,$(mono_libdir)/monodoc,g' monodoc.dll.config.in > $@
 
-clean-local: cleanup
+Monodoc.Ecma/EcmaUrlParser.cs: Monodoc.Ecma/EcmaUrlParser.jay $(topdir)/jay/skeleton.cs
+       $(topdir)/jay/jay $(JAY_FLAGS) < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@
 
-cleanup:
-       -rm -f Test/man-provider-test.exe*
+parser.exe: Monodoc.Ecma/EcmaUrlParser.cs Monodoc.Ecma/EcmaUrlTokenizer.cs Monodoc.Ecma/EcmaUrlParserDriver.cs Monodoc.Ecma/EcmaDesc.cs
+       mcs /out:$@ /debug $^
 
+setup-doc-sources: $(DOC_SOURCES)
+       mkdir -p ./Test/monodoc/sources/
+       cp $(DOC_SOURCES) ./Test/monodoc/sources/