[monodoc] Add EcmaUrlParser.jay to EXTRA_DIST
[mono.git] / mcs / tools / monodoc / Makefile
index d4e38ad059b403f75b72f2807ac7ef2579bde00b..c7fc32db205fa804d7a2fca9d3ccaf59fb6b978f 100644 (file)
@@ -5,7 +5,10 @@ include ../../build/rules.make
 LIBRARY = monodoc.dll
 LIBRARY_PACKAGE = monodoc
 # Remove a bunch of "obsolete"-type warning for Lucene.NET
-LOCAL_MCS_FLAGS = /nowarn:618,612,672,809
+# 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              \
@@ -69,28 +72,19 @@ RESOURCE_FILES = \
        Resources/mono-ecma-css.xsl       \
        Resources/mono-ecma-impl.xsl      \
        Resources/mono-ecma.css           \
-       Resources/mono-ecma.xsl         \
+       Resources/mono-ecma.xsl                 \
+       Resources/toc-html.xsl           \
        $(IMAGES)
 
-MAN_TEST_FILES = \
-       Test/man-provider-test.cs   \
-       Test/man-test1.1            \
-       Test/man-test1.html         \
-       Test/man-test2.1            \
-       Test/man-test2.html         \
-       Test/man-test3.1            \
-       Test/man-test3.html         \
-       Test/man-test4.1            \
-       Test/man-test4.html
-
 EXTRA_DISTFILES = \
        monodoc.dll.config.in   \
-       $(RESOURCE_FILES)       \
-       $(MAN_TEST_FILES)
+       $(RESOURCE_FILES)   \
+       Monodoc.Ecma/EcmaUrlParser.jay
 
 LIB_MCS_FLAGS = \
+       /unsafe                                                           \
        /codepage:utf8                                                    \
-       /nowarn:169,164,162,168,219,618,612                                      \
+       /nowarn:169,164,162,168,219,618,612                               \
        /r:Commons.Xml.Relaxng                                            \
        /resource:../../docs/monodoc.xml,monodoc.xml                      \
        /resource:Resources/base.css,base.css                             \
@@ -109,59 +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                   \
-       $(IMAGE_RESOURCE_COMMAND)                                         \
+       /resource:Resources/toc-html.xsl,toc-html.xsl                     \
+       $(IMAGE_RESOURCE_COMMAND)                                                             \
        /r:ICSharpCode.SharpZipLib                                        \
        /r:$(corlib)                                                      \
        /r:System.dll                                                     \
        /r:System.Core.dll                                                \
-       /r:System.Configuration.dll                                       \
-       /r:System.Web.Services.dll                                        \
-       /r:System.Xml.dll
-
-include ../../build/library.make
+       /r:System.Xml.dll                                                 \
+       /r:System.Xml.Linq.dll                                            \
+       /r:System.Configuration.dll
 
-$(the_lib): Makefile $(RESOURCE_FILES)
+TEST_MCS_FLAGS = /r:System.Core.dll /r:System.Xml.dll
 
-all-local: $(the_lib).config
+DOC_SOURCE_DIRS = \
+       ../../docs \
+       ../../../docs
 
-$(the_lib).config: Makefile
-       sed 's,@monodoc_refdir@,$(mono_libdir)/monodoc,g' monodoc.dll.config.in > $@
+DOC_SOURCES = $(foreach dir,$(DOC_SOURCE_DIRS),$(wildcard $(dir)/*.source $(dir)/*.tree $(dir)/*.zip))
 
-test: Test/man-provider-test.exe
-
-run-test-local: check-man-provider
-
-run-test-update: check-man-provider-update
+include ../../build/library.make
 
-Test/man-provider-test.exe: Test/man-provider-test.cs $(the_lib)
-       $(CSCOMPILE) -target:exe -out:$@ $< /r:$(the_lib)
+$(the_lib): Makefile $(RESOURCE_FILES)
 
-my_mono = \
-       MONO_REGISTRY_PATH="$(HOME)/.mono/registry" \
-       $(TEST_RUNTIME) \
-       $(RUNTIME_FLAGS)
+all-local: $(the_lib).config Monodoc.Ecma/EcmaUrlParser.cs
 
-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
+test-local: setup-doc-sources
 
-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
+dist-local: Monodoc.Ecma/EcmaUrlParser.cs
 
-clean-local: cleanup
+$(the_lib).config: Makefile monodoc.dll.config.in
+       sed 's,@monodoc_refdir@,$(mono_libdir)/monodoc,g' monodoc.dll.config.in > $@
 
-cleanup:
-       -rm -f Test/man-provider-test.exe*
+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 $@
 
-API_SERVER = root@api.xamarin.com
+parser.exe: Monodoc.Ecma/EcmaUrlParser.cs Monodoc.Ecma/EcmaUrlTokenizer.cs Monodoc.Ecma/EcmaUrlParserDriver.cs Monodoc.Ecma/EcmaDesc.cs
+       mcs /out:$@ /debug $^
 
-push:
-       make PROFILE=net_4_0 MCS_FLAGS=/debug
-       scp "../../class/lib/net_4_0/monodoc.dll*" $(API_SERVER):/srv/monodoc/
-       ssh $(API_SERVER) "/etc/init.d/apache2 reload"
-       ssh $(API_SERVER) "echo On `date -u +"%F %R"` UTC by `whoami` based on revision: `git log -n1 --oneline` >> /srv/monodoc/Changelog"
+setup-doc-sources: $(DOC_SOURCES)
+       mkdir -p ./Test/monodoc/sources/
+       cp $(DOC_SOURCES) ./Test/monodoc/sources/