Merge pull request #1659 from alexanderkyte/stringbuilder-referencesource
[mono.git] / mcs / tools / mdoc / Makefile
index 6216e388a8644f13a313886a489d59fb8bcd9ffb..ab95b1437c5686e1a8a21abee976d823aa435ba2 100644 (file)
@@ -3,10 +3,10 @@ SUBDIRS =
 include ../../build/rules.make
 
 MDOC_COMMON_FLAGS = \
-       /resource:../monodoc/Resources/mdoc-html-format.xsl,mdoc-html-format.xsl    \
-       /resource:../monodoc/Resources/mdoc-html-utils.xsl,mdoc-html-utils.xsl      \
-       /resource:../monodoc/Resources/mdoc-sections-css.xsl,mdoc-sections-css.xsl  \
-       /resource:../monodoc/Resources/mono-ecma-css.xsl,mono-ecma-css.xsl          \
+       /resource:../../class/monodoc/Resources/mdoc-html-format.xsl,mdoc-html-format.xsl    \
+       /resource:../../class/monodoc/Resources/mdoc-html-utils.xsl,mdoc-html-utils.xsl      \
+       /resource:../../class/monodoc/Resources/mdoc-sections-css.xsl,mdoc-sections-css.xsl  \
+       /resource:../../class/monodoc/Resources/mono-ecma-css.xsl,mono-ecma-css.xsl          \
        /resource:Resources/defaulttemplate.xsl,defaulttemplate.xsl                 \
        /resource:Resources/monodoc-ecma.xsd,monodoc-ecma.xsd                       \
        /resource:Resources/msitomsx.xsl,msitomsx.xsl                               \
@@ -18,9 +18,9 @@ MDOC_COMMON_FLAGS = \
        /r:Mono.Cecil.dll
 
 LOCAL_MCS_FLAGS = $(MDOC_COMMON_FLAGS) \
-       /r:$(topdir)/class/lib/net_2_0/monodoc.dll
+       /r:monodoc.dll
 PROGRAM = mdoc.exe
-PROGRAM_DEPS = $(topdir)/class/lib/net_2_0/monodoc.dll
+PROGRAM_DEPS = $(topdir)/class/lib/$(PROFILE)/monodoc.dll
 
 ifdef NET
 all : copy-with-deps
@@ -28,16 +28,16 @@ all : copy-with-deps
 copy-with-deps:
        -mkdir mdoc-net
        cp $(PROGRAM) mdoc-net
-       cp $(topdir)/class/lib/net_4_0/Commons.Xml.Relaxng.dll mdoc-net
-       cp $(topdir)/class/lib/net_4_0/ICSharpCode.SharpZipLib.dll mdoc-net
-       cp $(topdir)/class/lib/net_4_0/Mono.Cecil.dll mdoc-net
-       cp $(topdir)/class/lib/net_2_0/monodoc.dll mdoc-net
+       cp $(topdir)/class/lib/$(PROFILE)/Commons.Xml.Relaxng.dll mdoc-net
+       cp $(topdir)/class/lib/$(PROFILE)/ICSharpCode.SharpZipLib.dll mdoc-net
+       cp $(topdir)/class/lib/$(PROFILE)/Mono.Cecil.dll mdoc-net
+       cp $(topdir)/class/lib/$(PROFILE)/monodoc.dll mdoc-net
 endif
 
 MONODOC_RESOURCES = \
-       ../monodoc/Resources/mdoc-html-utils.xsl    \
-       ../monodoc/Resources/mdoc-sections-css.xsl  \
-       ../monodoc/Resources/mono-ecma-css.xsl
+       ../../class/monodoc/Resources/mdoc-html-utils.xsl    \
+       ../../class/monodoc/Resources/mdoc-sections-css.xsl  \
+       ../../class/monodoc/Resources/mono-ecma-css.xsl
 
 MDOC_RESOURCES = \
        Resources/defaulttemplate.xsl     \
@@ -47,6 +47,7 @@ MDOC_RESOURCES = \
        Resources/stylesheet.xsl
 
 MDOC_TEST_FILES = \
+       Test/CLILibraryTypes.dtd                                  \
        Test/DocTest-v1.cs                                        \
        Test/DocTest-v2.patch                                     \
        Test/msxdoc-expected.importslashdoc.xml                   \
@@ -61,12 +62,17 @@ EXTRA_DISTFILES = \
 
 $(PROGRAM) : $(MDOC_RESOURCES) $(MONODOC_RESOURCES) $(PROGRAM_DEPS)
 
+PROGRAM_COMPILE = $(CSCOMPILE) -platform:x86
+
 include ../../build/executable.make
 
+$(PROGRAM) : $(build_lib)
+       cp $< $@
+
 $(PROGRAM) : Makefile
 
 MONO = \
-       MONO_PATH="$(topdir)/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" \
+       MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" \
        $(RUNTIME) $(RUNTIME_FLAGS)
 
 dist-local: dist-default dist-tests
@@ -85,9 +91,29 @@ cleanup:
        -rm -Rf Test/en.actual Test/html.actual
        -rm -f monodocer1.exe*
 
+Test/DocTest-addNonGeneric.dll:
+       $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-addNonGeneric.cs
+
+Test/DocTest-addNonGeneric-v2.dll:
+       $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-addNonGeneric.cs /define:V2
+
+Test/DocTest-DropNS-classic-secondary.dll:
+       @echo $(value @)
+       $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-DropNS-classic-secondary.cs
+
+Test/DocTest-DropNS-classic.dll:
+       @echo $(value @)
+       $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-DropNS-classic.cs
+
+Test/DocTest-DropNS-unified.dll:
+       $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-DropNS-unified.cs
+
 Test/DocTest.dll: 
        $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest.cs
 
+Test/DocTest-InternalInterface.dll: 
+       $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-InternalInterface.cs
+
 Test/DocTest.dll-v1: 
        -rm -f Test/DocTest.cs
        cp Test/DocTest-v1.cs Test/DocTest.cs
@@ -101,6 +127,55 @@ Test/DocTest.dll-v2:
        -rm -f Test/DocTest.dll
        $(MAKE) TEST_CSCFLAGS=$(TEST_CSCFLAGS) Test/DocTest.dll
 
+check-monodocer-addNonGeneric: $(PROGRAM)
+       -rm -Rf Test/en.actual
+       # first, make a docset with the generic method
+       $(MAKE) Test/DocTest-addNonGeneric.dll
+       $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-addNonGeneric.dll
+
+       # now add a non-generic version of the method and update several times
+       $(MAKE) Test/DocTest-addNonGeneric-v2.dll
+       $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-addNonGeneric-v2.dll
+       $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-addNonGeneric-v2.dll
+       $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-addNonGeneric-v2.dll
+       diff --exclude=.svn -rup Test/en.expected-addNonGeneric Test/en.actual
+
+check-monodocer-dropns-classic: $(PROGRAM)
+       # tests the simplest --dropns case, a single class where the root namespace was dropped.
+       -rm -Rf Test/en.actual
+       $(MAKE) Test/DocTest-DropNS-classic.dll
+       $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-DropNS-classic.dll
+       $(MAKE) update-monodocer-dropns-unified
+       diff --exclude=.svn -rup Test/en.expected-dropns-classic-v1 Test/en.actual
+
+check-monodocer-dropns-classic-withsecondary: $(PROGRAM)
+       # tests case where a secondary assembly is included with a --dropns parameter
+       -rm -Rf Test/en.actual
+       $(MAKE) Test/DocTest-DropNS-classic.dll
+       $(MAKE) Test/DocTest-DropNS-classic-secondary.dll
+       $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-DropNS-classic.dll Test/DocTest-DropNS-classic-secondary.dll
+       $(MAKE) update-monodocer-dropns-unified-withsecondary
+       diff --exclude=.svn -rup Test/en.expected-dropns-classic-withsecondary Test/en.actual
+
+update-monodocer-dropns-unified: $(PROGRAM)
+       $(MAKE) Test/DocTest-DropNS-unified.dll
+       $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-DropNS-unified.dll --dropns Test/DocTest-DropNS-unified.dll=MyFramework
+
+update-monodocer-dropns-unified-withsecondary: $(PROGRAM)
+       $(MAKE) Test/DocTest-DropNS-unified.dll
+       $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-DropNS-unified.dll Test/DocTest-DropNS-classic-secondary.dll --dropns Test/DocTest-DropNS-unified.dll=MyFramework
+
+update-monodocer-dropns-classic-secondary: $(PROGRAM)
+       $(MAKE) Test/DocTest-DropNS-classic-secondary.dll
+       $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-DropNS-classic-secondary.dll
+
+check-monodocer-internal-interface: $(PROGRAM)
+       # Tests to make sure internal interfaces that are explicitly implemented are not documented
+       -rm -Rf Test/en.actual
+       $(MAKE) Test/DocTest-InternalInterface.dll
+       $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-InternalInterface.dll
+       diff --exclude=.svn -rup Test/en.expected-internal-interface Test/en.actual
+
 check-monodocer-update: $(PROGRAM)
        find Test/en.expected -name \*.xml -exec rm "{}" \;
        $(MAKE) Test/DocTest.dll-v1
@@ -109,9 +184,9 @@ check-monodocer-update: $(PROGRAM)
 check-monodocer: $(PROGRAM)
        -rm -Rf Test/en.actual
        $(MAKE) Test/DocTest.dll-v1
-       $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest.dll
+       $(MONO) $(PROGRAM) update --debug --exceptions=all -o Test/en.actual Test/DocTest.dll
        diff --exclude=.svn -rup Test/en.expected Test/en.actual
-       $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest.dll 
+       $(MONO) $(PROGRAM) update --debug --exceptions=all -o Test/en.actual Test/DocTest.dll 
        diff --exclude=.svn -rup Test/en.expected Test/en.actual
 
 check-monodocer-since-update: $(PROGRAM)
@@ -125,9 +200,9 @@ check-monodocer-since-update: $(PROGRAM)
 check-monodocer-since: $(PROGRAM)
        rm -Rf Test/en.actual
        $(MAKE) Test/DocTest.dll-v1
-       $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest.dll 
+       $(MONO) $(PROGRAM) --debug update --exceptions=all -o Test/en.actual Test/DocTest.dll 
        $(MAKE) Test/DocTest.dll-v2
-       $(MONO) $(PROGRAM) update --exceptions=all --since="Version 2.0" \
+       $(MONO) $(PROGRAM) --debug update --exceptions=all --since="Version 2.0" \
                -o Test/en.actual Test/DocTest.dll 
        diff --exclude=.svn -rup Test/en.expected.since Test/en.actual
 
@@ -144,30 +219,30 @@ check-monodocer-delete-update: $(PROGRAM)
 check-monodocer-delete: $(PROGRAM)
        rm -Rf Test/en.actual
        $(MAKE) Test/DocTest.dll-v1
-       $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest.dll
+       $(MONO) $(PROGRAM) --debug update --exceptions=all -o Test/en.actual Test/DocTest.dll
        $(MAKE) Test/DocTest.dll-v2
-       $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest.dll
+       $(MONO) $(PROGRAM) --debug update --exceptions=all -o Test/en.actual Test/DocTest.dll
        $(MAKE) Test/DocTest.dll-v1
-       $(MONO) $(PROGRAM) update -fno-assembly-versions --delete --exceptions=all -o Test/en.actual Test/DocTest.dll
+       $(MONO) $(PROGRAM) --debug update -fno-assembly-versions --delete --exceptions=all -o Test/en.actual Test/DocTest.dll
        diff --exclude=.svn -rup Test/en.expected.delete Test/en.actual
 
 check-monodocer-importslashdoc-update: $(PROGRAM)
        find Test/en.expected.importslashdoc -name \*.xml -exec rm "{}" \;
        $(MAKE) Test/DocTest.dll-v1 TEST_CSCFLAGS=-doc:Test/DocTest.xml
-       $(MONO) $(PROGRAM) update --exceptions=all -i Test/DocTest.xml \
+       $(MONO) $(PROGRAM) --debug update --exceptions=all -i Test/DocTest.xml \
                -o Test/en.expected.importslashdoc Test/DocTest.dll 
 
 check-monodocer-importslashdoc: $(PROGRAM)
        rm -Rf Test/en.actual
        $(MAKE) Test/DocTest.dll-v1 TEST_CSCFLAGS=-doc:Test/DocTest.xml
-       $(MONO) $(PROGRAM) update --exceptions=all -i Test/DocTest.xml \
+       $(MONO) $(PROGRAM) --debug update --exceptions=all -i Test/DocTest.xml \
                -o Test/en.actual Test/DocTest.dll 
        diff --exclude=.svn -rup Test/en.expected.importslashdoc Test/en.actual
 
 check-monodocer-importecmadoc-update: $(PROGRAM)
        find Test/en.expected.importecmadoc -name \*.xml -exec rm "{}" \;
        $(MAKE) Test/DocTest.dll-v1
-       $(MONO) $(PROGRAM) update --exceptions=all -i Test/TestEcmaDocs.xml \
+       $(MONO) $(PROGRAM) --debug update --exceptions=all -i Test/TestEcmaDocs.xml \
                '--type=System.Action`1' --type=System.AsyncCallback \
                --type=System.Environment --type=System.Array \
                -o Test/en.expected.importecmadoc Test/DocTest.dll 
@@ -175,7 +250,7 @@ check-monodocer-importecmadoc-update: $(PROGRAM)
 check-monodocer-importecmadoc: $(PROGRAM)
        rm -Rf Test/en.actual
        $(MAKE) Test/DocTest.dll-v1
-       $(MONO) $(PROGRAM) update --exceptions=all -i Test/TestEcmaDocs.xml \
+       $(MONO) $(PROGRAM) --debug update --exceptions=all -i Test/TestEcmaDocs.xml \
                '--type=System.Action`1' --type=System.AsyncCallback \
                --type=System.Environment --type=System.Array \
                -o Test/en.actual Test/DocTest.dll 
@@ -257,8 +332,14 @@ check-doc-tools-update: check-monodocer-since-update \
        check-monodocer-importecmadoc-update \
        check-monodocer-importslashdoc-update \
        check-monodocer-update \
+       check-monodocer-dropns-classic \
+       check-monodocer-dropns-classic-withsecondary \
+       check-monodocer-internal-interface \
        check-monodocer-delete-update \
        check-mdoc-export-html-update \
        check-mdoc-export-msxdoc-update \
-       check-mdoc-validate-update
+       check-mdoc-validate-update 
+
+check: check-doc-tools \
+       check-doc-tools-update