SUBDIRS =
include ../../build/rules.make
-MDOC_COMMON_FLAGS = \
- /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 \
- /resource:Resources/overview.xsl,overview.xsl \
- /resource:Resources/stylesheet.xsl,stylesheet.xsl \
+MONODOC_RESOURCES = \
+ Resources/mdoc-html-format.xsl \
+ Resources/mdoc-html-utils.xsl \
+ Resources/mdoc-sections-css.xsl \
+ Resources/mono-ecma-css.xsl
+
+MDOC_RESOURCES = \
+ Resources/defaulttemplate.xsl \
+ Resources/monodoc-ecma.xsd \
+ Resources/msitomsx.xsl \
+ Resources/overview.xsl \
+ Resources/stylesheet.xsl
+
+MDOC_RESOURCES_COMMAND = $(foreach file,$(MDOC_RESOURCES),/resource:../../../external/api-doc-tools/mdoc/$(file),$(notdir $(file)))
+
+MONODOC_RESOURCES_COMMAND = $(foreach file,$(MONODOC_RESOURCES),/resource:../../../external/api-doc-tools/monodoc/$(file),$(notdir $(file)))
LIB_REFS = monodoc System System.Xml System.Core Mono.Cecil ICSharpCode.SharpZipLib System.Xml.Linq System.Web
-LOCAL_MCS_FLAGS = $(MDOC_COMMON_FLAGS)
-PROGRAM = mdoc.exe
+LOCAL_MCS_FLAGS = $(MDOC_RESOURCES_COMMAND) $(MONODOC_RESOURCES_COMMAND)
+PROGRAM = $(topdir)/class/lib/$(PROFILE)/mdoc.exe
PROGRAM_DEPS = $(topdir)/class/lib/$(PROFILE)/monodoc.dll
ifdef NET
cp $(topdir)/class/lib/$(PROFILE)/monodoc.dll mdoc-net
endif
-MONODOC_RESOURCES = \
- ../../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 \
- Resources/monodoc-ecma.xsd \
- Resources/msitomsx.xsl \
- Resources/overview.xsl \
- Resources/stylesheet.xsl
-
MDOC_TEST_FILES = \
Test/CLILibraryTypes.dtd \
Test/DocTest-v1.cs \
Test/validate.check.monodocer.importslashdoc \
Test/validate.check.monodocer.since
-EXTRA_DISTFILES = \
- $(MDOC_RESOURCES) \
- $(MDOC_TEST_FILES)
-
MULTI-CLASSIC = Test/DocTest-DropNS-classic.dll Test/DocTest-DropNS-classic-multitest.dll
MULTI-UNIFIED = Test/DocTest-DropNS-unified.dll Test/DocTest-DropNS-unified-multitest.dll
-$(PROGRAM) : $(MDOC_RESOURCES) $(MONODOC_RESOURCES) $(PROGRAM_DEPS)
+$(PROGRAM): $(PROGRAM_DEPS)
-PROGRAM_COMPILE = $(CSCOMPILE) -platform:x86
+PROGRAM_COMPILE = $(CSCOMPILE)
include ../../build/executable.make
-$(PROGRAM) : $(build_lib)
- cp $< $@
-
-$(PROGRAM) : Makefile
-
MONO = \
MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" \
$(RUNTIME) $(RUNTIME_FLAGS)
+DIFF = diff -rup
+DIFF_QUIET = diff --brief
+ifeq ($(BUILD_PLATFORM), win32)
+DIFF = diff -rupZ
+DIFF_QUIET = diff --brief -Z
+endif
+
dist-local: dist-default dist-tests
dist-tests:
Test/DocTest.dll-v2:
-rm -f Test/DocTest.cs
cp Test/DocTest-v1.cs Test/DocTest.cs
- cd Test && patch -p0 < DocTest-v2.patch
+ cd Test && patch --binary -p0 < DocTest-v2.patch
-rm -f Test/DocTest.dll
$(MAKE) TEST_CSCFLAGS=$(TEST_CSCFLAGS) Test/DocTest.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
+ $(DIFF) 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.
$(MAKE) Test/DocTest-DropNS-classic.dll
$(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-DropNS-classic.dll --api-style=classic
$(MAKE) update-monodocer-dropns-unified
- diff --exclude=.svn -rup Test/en.expected-dropns-classic-v1 Test/en.actual
+ $(DIFF) Test/en.expected-dropns-classic-v1 Test/en.actual
check-monodocer-dropns-multi: $(PROGRAM)
-rm -Rf Test/en.actual
$(MAKE) Test/DocTest-DropNS-unified-multitest.dll
# mdoc update for both classic and unified
- $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-CLASSIC) --api-style=classic -multiassembly
- $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-UNIFIED) --api-style=unified --dropns Test/DocTest-DropNS-unified.dll=MyFramework --dropns Test/DocTest-DropNS-unified-multitest.dll=MyFramework -multiassembly
+ $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-CLASSIC) --api-style=classic
+ $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-UNIFIED) --api-style=unified --dropns Test/DocTest-DropNS-unified.dll=MyFramework --dropns Test/DocTest-DropNS-unified-multitest.dll=MyFramework
# now run it again to verify idempotency
- $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-CLASSIC) --api-style=classic -multiassembly
- $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-UNIFIED) --api-style=unified --dropns Test/DocTest-DropNS-unified.dll=MyFramework --dropns Test/DocTest-DropNS-unified-multitest.dll=MyFramework -multiassembly
+ $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-CLASSIC) --api-style=classic
+ $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-UNIFIED) --api-style=unified --dropns Test/DocTest-DropNS-unified.dll=MyFramework --dropns Test/DocTest-DropNS-unified-multitest.dll=MyFramework
- diff --exclude=.svn -rup Test/en.expected-dropns-multi Test/en.actual
+ $(DIFF) Test/en.expected-dropns-multi Test/en.actual
check-monodocer-dropns-multi-withexisting: $(PROGRAM)
$(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-DropNS-unified.dll --api-style=unified --dropns Test/DocTest-DropNS-unified.dll=MyFramework
# mdoc update for both classic and unified
- $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-CLASSIC) --api-style=classic -multiassembly
- $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-UNIFIED) --api-style=unified --dropns Test/DocTest-DropNS-unified.dll=MyFramework --dropns Test/DocTest-DropNS-unified-multitest.dll=MyFramework -multiassembly
+ $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-CLASSIC) --api-style=classic
+ $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-UNIFIED) --api-style=unified --dropns Test/DocTest-DropNS-unified.dll=MyFramework --dropns Test/DocTest-DropNS-unified-multitest.dll=MyFramework
- diff --exclude=.svn -rup Test/en.expected-dropns-multi-withexisting Test/en.actual
+ $(DIFF) Test/en.expected-dropns-multi-withexisting Test/en.actual
check-monodocer-dropns-delete: $(PROGRAM)
-rm -Rf Test/en.actual
$(MONO) $(PROGRAM) update --delete --exceptions=all -o Test/en.actual Test/DocTest-DropNS-classic-deletetest.dll --api-style=classic
$(MAKE) Test/DocTest-DropNS-unified-deletetest-V2.dll
$(MONO) $(PROGRAM) update --delete --exceptions=all -o Test/en.actual Test/DocTest-DropNS-unified-deletetest.dll --api-style=unified --dropns Test/DocTest-DropNS-unified-deletetest.dll=MyFramework
- diff --exclude=.dvn -rup Test/en.expected-dropns-delete Test/en.actual
+ $(DIFF) Test/en.expected-dropns-delete Test/en.actual
check-monodocer-dropns-classic-withsecondary: $(PROGRAM)
# tests case where a secondary assembly is included with a --dropns parameter
$(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 --api-style=classic
$(MAKE) update-monodocer-dropns-unified-withsecondary
- diff --exclude=.svn -rup Test/en.expected-dropns-classic-withsecondary Test/en.actual
+ $(DIFF) Test/en.expected-dropns-classic-withsecondary Test/en.actual
update-monodocer-dropns-unified: $(PROGRAM)
$(MAKE) Test/DocTest-DropNS-unified.dll
-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
+ $(DIFF) Test/en.expected-internal-interface Test/en.actual
check-monodocer-enumerations: $(PROGRAM)
-rm -Rf Test/en.actual
$(MAKE) Test/DocTest-enumerations.dll
$(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-enumerations.dll
- diff --exclude=.svn -rup Test/en.expected-enumerations Test/en.actual
+ $(DIFF) Test/en.expected-enumerations Test/en.actual
check-monodocer-update: $(PROGRAM)
find Test/en.expected -name \*.xml -exec rm "{}" \;
-rm -Rf Test/en.actual
$(MAKE) Test/DocTest.dll-v1
$(MONO) $(PROGRAM) update --debug --exceptions=all -o Test/en.actual Test/DocTest.dll
- diff --exclude=.svn -rup Test/en.expected Test/en.actual
+ $(DIFF) Test/en.expected Test/en.actual
$(MONO) $(PROGRAM) update --debug --exceptions=all -o Test/en.actual Test/DocTest.dll
- diff --exclude=.svn -rup Test/en.expected Test/en.actual
+ $(DIFF) Test/en.expected Test/en.actual
check-monodocer-since-update: $(PROGRAM)
find Test/en.expected.since -name \*.xml -exec rm "{}" \;
$(MAKE) Test/DocTest.dll-v2
$(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
+ $(DIFF) Test/en.expected.since Test/en.actual
check-monodocer-delete-update: $(PROGRAM)
find Test/en.expected.delete -type f -exec rm "{}" \;
$(MONO) $(PROGRAM) --debug update --exceptions=all -o Test/en.actual Test/DocTest.dll
$(MAKE) Test/DocTest.dll-v1
$(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
+ $(DIFF) 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) --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
+ $(DIFF) Test/en.expected.importslashdoc Test/en.actual
check-monodocer-importecmadoc-update: $(PROGRAM)
find Test/en.expected.importecmadoc -name \*.xml -exec rm "{}" \;
'--type=System.Action`1' --type=System.AsyncCallback \
--type=System.Environment --type=System.Array \
-o Test/en.actual Test/DocTest.dll
- diff --exclude=.svn -rup Test/en.expected.importecmadoc Test/en.actual
+ $(DIFF) Test/en.expected.importecmadoc Test/en.actual
check-mdoc-export-html-update: $(PROGRAM)
find Test/html.expected -name \*.html -exec rm "{}" \;
rm -Rf Test/html.actual
$(MONO) $(PROGRAM) export-html -o Test/html.actual \
Test/en.expected.importslashdoc
- diff --exclude=.svn -rup Test/html.expected Test/html.actual
+ $(DIFF) Test/html.expected Test/html.actual
check-mdoc-export-html-with-version: $(PROGRAM)
rm -Rf Test/html.actual.v0 Test/html.actual.since-with-v0 .v0.txt .v2.txt
Test/en.expected.since -with-version 0.0.0.0
(cd Test/html.actual.v0 && find . -type f) | sort > .v0.txt
(cd Test/html.actual.since-with-v0 && find . -type f) | sort > .v2.txt
- diff -rup .v0.txt .v2.txt # assert no types added
+ $(DIFF) .v0.txt .v2.txt # assert no types added
check-md-html-dir: $(PROGRAM)
rm -Rf Test/html.actual
$(MONO) $(PROGRAM) export-html -dest:Test/html.actual $(DIR)
- diff --exclude=.svn -rup Test/html.expected Test/html.actual
+ $(DIFF) Test/html.expected Test/html.actual
check-mdoc-export-msxdoc-update:
$(MONO) $(PROGRAM) export-msxdoc -o - Test/en.expected.importslashdoc \
check-mdoc-export-msxdoc:
$(MONO) $(PROGRAM) export-msxdoc -o - Test/en.expected.importslashdoc \
- | diff --brief - Test/msxdoc-expected.importslashdoc.xml
+ | $(DIFF_QUIET) - Test/msxdoc-expected.importslashdoc.xml
my_abs_top_srcdir = $(shell cd . && pwd)
check-mdoc-validate: $(PROGRAM)
$(MONO) $(PROGRAM) validate -f ecma Test/en.expected 2>&1 | \
sed 's#file://$(my_abs_top_srcdir)/##g' | \
- diff - Test/validate.check.monodocer
+ $(DIFF_QUIET) - Test/validate.check.monodocer
$(MONO) $(PROGRAM) validate -f ecma Test/en.expected.importslashdoc 2>&1 | \
sed 's#file://$(my_abs_top_srcdir)/##g' | \
- diff --brief - Test/validate.check.monodocer.importslashdoc
+ $(DIFF_QUIET) - Test/validate.check.monodocer.importslashdoc
$(MONO) $(PROGRAM) validate -f ecma Test/en.expected.since 2>&1 | \
sed 's#file://$(my_abs_top_srcdir)/##g' | \
- diff --brief - Test/validate.check.monodocer.since
+ $(DIFF_QUIET) - Test/validate.check.monodocer.since
run-test-local: check-doc-tools