Merge pull request #1659 from alexanderkyte/stringbuilder-referencesource
[mono.git] / mcs / tools / mdoc / Makefile
index a469114c4ba9f231775fed45dc1428effe3ea7fa..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_2_0/Commons.Xml.Relaxng.dll mdoc-net
-       cp $(topdir)/class/lib/net_2_0/ICSharpCode.SharpZipLib.dll mdoc-net
-       cp $(topdir)/class/lib/net_2_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,8 +62,13 @@ 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 = \
@@ -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
@@ -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