3 include ../../build/rules.make
6 /resource:../../class/monodoc/Resources/mdoc-html-format.xsl,mdoc-html-format.xsl \
7 /resource:../../class/monodoc/Resources/mdoc-html-utils.xsl,mdoc-html-utils.xsl \
8 /resource:../../class/monodoc/Resources/mdoc-sections-css.xsl,mdoc-sections-css.xsl \
9 /resource:../../class/monodoc/Resources/mono-ecma-css.xsl,mono-ecma-css.xsl \
10 /resource:Resources/defaulttemplate.xsl,defaulttemplate.xsl \
11 /resource:Resources/monodoc-ecma.xsd,monodoc-ecma.xsd \
12 /resource:Resources/msitomsx.xsl,msitomsx.xsl \
13 /resource:Resources/overview.xsl,overview.xsl \
14 /resource:Resources/stylesheet.xsl,stylesheet.xsl \
16 /r:System.Xml.Linq.dll \
17 /r:ICSharpCode.SharpZipLib.dll \
20 LOCAL_MCS_FLAGS = $(MDOC_COMMON_FLAGS) \
23 PROGRAM_DEPS = $(topdir)/class/lib/$(PROFILE)/monodoc.dll
30 cp $(PROGRAM) mdoc-net
31 cp $(topdir)/class/lib/$(PROFILE)/Commons.Xml.Relaxng.dll mdoc-net
32 cp $(topdir)/class/lib/$(PROFILE)/ICSharpCode.SharpZipLib.dll mdoc-net
33 cp $(topdir)/class/lib/$(PROFILE)/Mono.Cecil.dll mdoc-net
34 cp $(topdir)/class/lib/$(PROFILE)/monodoc.dll mdoc-net
38 ../../class/monodoc/Resources/mdoc-html-utils.xsl \
39 ../../class/monodoc/Resources/mdoc-sections-css.xsl \
40 ../../class/monodoc/Resources/mono-ecma-css.xsl
43 Resources/defaulttemplate.xsl \
44 Resources/monodoc-ecma.xsd \
45 Resources/msitomsx.xsl \
46 Resources/overview.xsl \
47 Resources/stylesheet.xsl
50 Test/CLILibraryTypes.dtd \
52 Test/DocTest-v2.patch \
53 Test/msxdoc-expected.importslashdoc.xml \
54 Test/TestEcmaDocs.xml \
55 Test/validate.check.monodocer \
56 Test/validate.check.monodocer.importslashdoc \
57 Test/validate.check.monodocer.since
63 MULTI-CLASSIC = Test/DocTest-DropNS-classic.dll Test/DocTest-DropNS-classic-multitest.dll
64 MULTI-UNIFIED = Test/DocTest-DropNS-unified.dll Test/DocTest-DropNS-unified-multitest.dll
66 $(PROGRAM) : $(MDOC_RESOURCES) $(MONODOC_RESOURCES) $(PROGRAM_DEPS)
68 PROGRAM_COMPILE = $(CSCOMPILE) -platform:x86
70 include ../../build/executable.make
72 $(PROGRAM) : $(build_lib)
78 MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" \
79 $(RUNTIME) $(RUNTIME_FLAGS)
81 dist-local: dist-default dist-tests
84 find Test/en.expected* -name '*.xml' > .files
85 find Test/html.expected* -name '*.html' >> .files
86 tar cTf .files - | (cd $(distdir); tar xf -)
89 test-local: $(PROGRAM)
94 -rm -Rf Test/en.actual Test/html.actual
95 -rm -f monodocer1.exe*
97 Test/DocTest-addNonGeneric.dll:
98 $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-addNonGeneric.cs
100 Test/DocTest-addNonGeneric-v2.dll:
101 $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-addNonGeneric.cs /define:V2
103 Test/DocTest-DropNS-classic-secondary.dll:
105 $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-DropNS-classic-secondary.cs
107 Test/DocTest-DropNS-classic.dll:
109 $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-DropNS-classic.cs
111 Test/DocTest-DropNS-unified.dll:
112 $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-DropNS-unified.cs
114 Test/DocTest-DropNS-unified-multitest.dll:
116 $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-DropNS-unified.cs /define:MULTITEST
118 Test/DocTest-DropNS-classic-multitest.dll:
120 $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-DropNS-classic.cs /define:MULTITEST
122 Test/DocTest-DropNS-unified-deletetest.dll:
123 rm -f Test/DocTest-DropNS-unified-deletetest.dll
124 $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-DropNS-unified.cs /define:DELETETEST
126 Test/DocTest-DropNS-unified-deletetest-V2.dll:
127 rm -f Test/DocTest-DropNS-unified-deletetest.dll
128 $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:Test/DocTest-DropNS-unified-deletetest.dll Test/DocTest-DropNS-unified.cs /define:DELETETEST,V2
130 Test/DocTest-DropNS-classic-deletetest.dll:
131 rm -f Test/DocTest-DropNS-classic-deletetest.dll
132 $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-DropNS-classic.cs /define:DELETETEST
134 Test/DocTest-DropNS-classic-deletetest-V2.dll:
135 rm -f Test/DocTest-DropNS-classic-deletetest.dll
136 $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:Test/DocTest-DropNS-classic-deletetest.dll Test/DocTest-DropNS-classic.cs /define:DELETETEST,V2
139 $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest.cs
141 Test/DocTest-InternalInterface.dll:
142 $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-InternalInterface.cs
145 -rm -f Test/DocTest.cs
146 cp Test/DocTest-v1.cs Test/DocTest.cs
147 -rm -f Test/DocTest.dll
148 $(MAKE) TEST_CSCFLAGS=$(TEST_CSCFLAGS) Test/DocTest.dll
151 -rm -f Test/DocTest.cs
152 cp Test/DocTest-v1.cs Test/DocTest.cs
153 cd Test && patch -p0 < DocTest-v2.patch
154 -rm -f Test/DocTest.dll
155 $(MAKE) TEST_CSCFLAGS=$(TEST_CSCFLAGS) Test/DocTest.dll
157 Test/DocTest-enumerations.dll:
158 $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-enumerations.cs
160 check-monodocer-addNonGeneric: $(PROGRAM)
161 -rm -Rf Test/en.actual
162 # first, make a docset with the generic method
163 $(MAKE) Test/DocTest-addNonGeneric.dll
164 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-addNonGeneric.dll
166 # now add a non-generic version of the method and update several times
167 $(MAKE) Test/DocTest-addNonGeneric-v2.dll
168 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-addNonGeneric-v2.dll
169 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-addNonGeneric-v2.dll
170 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-addNonGeneric-v2.dll
171 diff --exclude=.svn -rup Test/en.expected-addNonGeneric Test/en.actual
173 check-monodocer-dropns-classic: $(PROGRAM)
174 # tests the simplest --dropns case, a single class where the root namespace was dropped.
175 -rm -Rf Test/en.actual
176 $(MAKE) Test/DocTest-DropNS-classic.dll
177 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-DropNS-classic.dll
178 $(MAKE) update-monodocer-dropns-unified
179 diff --exclude=.svn -rup Test/en.expected-dropns-classic-v1 Test/en.actual
181 check-monodocer-dropns-multi: $(PROGRAM)
182 -rm -Rf Test/en.actual
183 $(MAKE) Test/DocTest-DropNS-classic.dll
184 $(MAKE) Test/DocTest-DropNS-unified.dll
185 $(MAKE) Test/DocTest-DropNS-classic-multitest.dll
186 $(MAKE) Test/DocTest-DropNS-unified-multitest.dll
188 # mdoc update for both classic and unified
189 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-CLASSIC) -multiassembly
190 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-UNIFIED) --dropns Test/DocTest-DropNS-unified.dll=MyFramework --dropns Test/DocTest-DropNS-unified-multitest.dll=MyFramework -multiassembly
192 # now run it again to verify idempotency
193 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-CLASSIC) -multiassembly
194 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-UNIFIED) --dropns Test/DocTest-DropNS-unified.dll=MyFramework --dropns Test/DocTest-DropNS-unified-multitest.dll=MyFramework -multiassembly
196 diff --exclude=.svn -rup Test/en.expected-dropns-multi Test/en.actual
198 check-monodocer-dropns-delete: $(PROGRAM)
199 -rm -Rf Test/en.actual
200 rm -Rf Test/DocTest-DropNS-classic-deletetest.dll
201 rm -Rf Test/DocTest-DropNS-unified-deletetest.dll
202 $(MAKE) Test/DocTest-DropNS-classic-deletetest.dll
203 $(MONO) $(PROGRAM) update --delete --exceptions=all -o Test/en.actual Test/DocTest-DropNS-classic-deletetest.dll
204 $(MAKE) Test/DocTest-DropNS-unified-deletetest.dll
205 $(MONO) $(PROGRAM) update --delete --exceptions=all -o Test/en.actual Test/DocTest-DropNS-unified-deletetest.dll --dropns Test/DocTest-DropNS-unified-deletetest.dll=MyFramework
206 $(MAKE) Test/DocTest-DropNS-classic-deletetest-V2.dll
207 $(MONO) $(PROGRAM) update --delete --exceptions=all -o Test/en.actual Test/DocTest-DropNS-classic-deletetest.dll
208 $(MAKE) Test/DocTest-DropNS-unified-deletetest-V2.dll
209 $(MONO) $(PROGRAM) update --delete --exceptions=all -o Test/en.actual Test/DocTest-DropNS-unified-deletetest.dll --dropns Test/DocTest-DropNS-unified-deletetest.dll=MyFramework
210 diff --exclude=.dvn -rup Test/en.expected-dropns-delete Test/en.actual
212 check-monodocer-dropns-classic-withsecondary: $(PROGRAM)
213 # tests case where a secondary assembly is included with a --dropns parameter
214 -rm -Rf Test/en.actual
215 $(MAKE) Test/DocTest-DropNS-classic.dll
216 $(MAKE) Test/DocTest-DropNS-classic-secondary.dll
217 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-DropNS-classic.dll Test/DocTest-DropNS-classic-secondary.dll
218 $(MAKE) update-monodocer-dropns-unified-withsecondary
219 diff --exclude=.svn -rup Test/en.expected-dropns-classic-withsecondary Test/en.actual
221 update-monodocer-dropns-unified: $(PROGRAM)
222 $(MAKE) Test/DocTest-DropNS-unified.dll
223 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-DropNS-unified.dll --dropns Test/DocTest-DropNS-unified.dll=MyFramework
225 update-monodocer-dropns-unified-withsecondary: $(PROGRAM)
226 $(MAKE) Test/DocTest-DropNS-unified.dll
227 $(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
229 update-monodocer-dropns-classic-secondary: $(PROGRAM)
230 $(MAKE) Test/DocTest-DropNS-classic-secondary.dll
231 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-DropNS-classic-secondary.dll
233 check-monodocer-internal-interface: $(PROGRAM)
234 # Tests to make sure internal interfaces that are explicitly implemented are not documented
235 -rm -Rf Test/en.actual
236 $(MAKE) Test/DocTest-InternalInterface.dll
237 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-InternalInterface.dll
238 diff --exclude=.svn -rup Test/en.expected-internal-interface Test/en.actual
240 check-monodocer-enumerations: $(PROGRAM)
241 -rm -Rf Test/en.actual
242 $(MAKE) Test/DocTest-enumerations.dll
243 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-enumerations.dll
244 diff --exclude=.svn -rup Test/en.expected-enumerations Test/en.actual
246 check-monodocer-update: $(PROGRAM)
247 find Test/en.expected -name \*.xml -exec rm "{}" \;
248 $(MAKE) Test/DocTest.dll-v1
249 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.expected Test/DocTest.dll
251 check-monodocer: $(PROGRAM)
252 -rm -Rf Test/en.actual
253 $(MAKE) Test/DocTest.dll-v1
254 $(MONO) $(PROGRAM) update --debug --exceptions=all -o Test/en.actual Test/DocTest.dll
255 diff --exclude=.svn -rup Test/en.expected Test/en.actual
256 $(MONO) $(PROGRAM) update --debug --exceptions=all -o Test/en.actual Test/DocTest.dll
257 diff --exclude=.svn -rup Test/en.expected Test/en.actual
259 check-monodocer-since-update: $(PROGRAM)
260 find Test/en.expected.since -name \*.xml -exec rm "{}" \;
261 $(MAKE) Test/DocTest.dll-v1
262 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.expected.since Test/DocTest.dll
263 $(MAKE) Test/DocTest.dll-v2
264 $(MONO) $(PROGRAM) update --exceptions=all --since="Version 2.0" \
265 -o Test/en.expected.since Test/DocTest.dll
267 check-monodocer-since: $(PROGRAM)
268 rm -Rf Test/en.actual
269 $(MAKE) Test/DocTest.dll-v1
270 $(MONO) $(PROGRAM) --debug update --exceptions=all -o Test/en.actual Test/DocTest.dll
271 $(MAKE) Test/DocTest.dll-v2
272 $(MONO) $(PROGRAM) --debug update --exceptions=all --since="Version 2.0" \
273 -o Test/en.actual Test/DocTest.dll
274 diff --exclude=.svn -rup Test/en.expected.since Test/en.actual
276 check-monodocer-delete-update: $(PROGRAM)
277 find Test/en.expected.delete -type f -exec rm "{}" \;
278 $(MAKE) Test/DocTest.dll-v1
279 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.expected.delete Test/DocTest.dll
280 $(MAKE) Test/DocTest.dll-v2
281 $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.expected.delete Test/DocTest.dll
282 $(MAKE) Test/DocTest.dll-v1
283 $(MONO) $(PROGRAM) update -fno-assembly-versions --delete --exceptions=all \
284 -o Test/en.expected.delete Test/DocTest.dll
286 check-monodocer-delete: $(PROGRAM)
287 rm -Rf Test/en.actual
288 $(MAKE) Test/DocTest.dll-v1
289 $(MONO) $(PROGRAM) --debug update --exceptions=all -o Test/en.actual Test/DocTest.dll
290 $(MAKE) Test/DocTest.dll-v2
291 $(MONO) $(PROGRAM) --debug update --exceptions=all -o Test/en.actual Test/DocTest.dll
292 $(MAKE) Test/DocTest.dll-v1
293 $(MONO) $(PROGRAM) --debug update -fno-assembly-versions --delete --exceptions=all -o Test/en.actual Test/DocTest.dll
294 diff --exclude=.svn -rup Test/en.expected.delete Test/en.actual
296 check-monodocer-importslashdoc-update: $(PROGRAM)
297 find Test/en.expected.importslashdoc -name \*.xml -exec rm "{}" \;
298 $(MAKE) Test/DocTest.dll-v1 TEST_CSCFLAGS=-doc:Test/DocTest.xml
299 $(MONO) $(PROGRAM) --debug update --exceptions=all -i Test/DocTest.xml \
300 -o Test/en.expected.importslashdoc Test/DocTest.dll
302 check-monodocer-importslashdoc: $(PROGRAM)
303 rm -Rf Test/en.actual
304 $(MAKE) Test/DocTest.dll-v1 TEST_CSCFLAGS=-doc:Test/DocTest.xml
305 $(MONO) $(PROGRAM) --debug update --exceptions=all -i Test/DocTest.xml \
306 -o Test/en.actual Test/DocTest.dll
307 diff --exclude=.svn -rup Test/en.expected.importslashdoc Test/en.actual
309 check-monodocer-importecmadoc-update: $(PROGRAM)
310 find Test/en.expected.importecmadoc -name \*.xml -exec rm "{}" \;
311 $(MAKE) Test/DocTest.dll-v1
312 $(MONO) $(PROGRAM) --debug update --exceptions=all -i Test/TestEcmaDocs.xml \
313 '--type=System.Action`1' --type=System.AsyncCallback \
314 --type=System.Environment --type=System.Array \
315 -o Test/en.expected.importecmadoc Test/DocTest.dll
317 check-monodocer-importecmadoc: $(PROGRAM)
318 rm -Rf Test/en.actual
319 $(MAKE) Test/DocTest.dll-v1
320 $(MONO) $(PROGRAM) --debug update --exceptions=all -i Test/TestEcmaDocs.xml \
321 '--type=System.Action`1' --type=System.AsyncCallback \
322 --type=System.Environment --type=System.Array \
323 -o Test/en.actual Test/DocTest.dll
324 diff --exclude=.svn -rup Test/en.expected.importecmadoc Test/en.actual
326 check-mdoc-export-html-update: $(PROGRAM)
327 find Test/html.expected -name \*.html -exec rm "{}" \;
328 $(MONO) $(PROGRAM) export-html -o Test/html.expected \
329 Test/en.expected.importslashdoc
331 check-mdoc-export-html: check-monodocer $(PROGRAM)
332 rm -Rf Test/html.actual
333 $(MONO) $(PROGRAM) export-html -o Test/html.actual \
334 Test/en.expected.importslashdoc
335 diff --exclude=.svn -rup Test/html.expected Test/html.actual
337 check-mdoc-export-html-with-version: $(PROGRAM)
338 rm -Rf Test/html.actual.v0 Test/html.actual.since-with-v0 .v0.txt .v2.txt
339 $(MONO) $(PROGRAM) export-html -o Test/html.actual.v0 \
341 $(MONO) $(PROGRAM) export-html -o Test/html.actual.since-with-v0 \
342 Test/en.expected.since -with-version 0.0.0.0
343 (cd Test/html.actual.v0 && find . -type f) | sort > .v0.txt
344 (cd Test/html.actual.since-with-v0 && find . -type f) | sort > .v2.txt
345 diff -rup .v0.txt .v2.txt # assert no types added
347 check-md-html-dir: $(PROGRAM)
348 rm -Rf Test/html.actual
349 $(MONO) $(PROGRAM) export-html -dest:Test/html.actual $(DIR)
350 diff --exclude=.svn -rup Test/html.expected Test/html.actual
352 check-mdoc-export-msxdoc-update:
353 $(MONO) $(PROGRAM) export-msxdoc -o - Test/en.expected.importslashdoc \
354 > Test/msxdoc-expected.importslashdoc.xml
356 check-mdoc-export-msxdoc:
357 $(MONO) $(PROGRAM) export-msxdoc -o - Test/en.expected.importslashdoc \
358 | diff --brief - Test/msxdoc-expected.importslashdoc.xml
360 my_abs_top_srcdir = $(shell cd . && pwd)
362 check-mdoc-validate-update: $(PROGRAM)
363 $(MONO) $(PROGRAM) validate -f ecma Test/en.expected 2>&1 | \
364 sed 's#file://$(my_abs_top_srcdir)/##g' > \
365 Test/validate.check.monodocer
366 $(MONO) $(PROGRAM) validate -f ecma Test/en.expected.importslashdoc 2>&1 | \
367 sed 's#file://$(my_abs_top_srcdir)/##g' > \
368 Test/validate.check.monodocer.importslashdoc
369 $(MONO) $(PROGRAM) validate -f ecma Test/en.expected.since 2>&1 | \
370 sed 's#file://$(my_abs_top_srcdir)/##g' > \
371 Test/validate.check.monodocer.since
373 check-mdoc-validate: $(PROGRAM)
374 $(MONO) $(PROGRAM) validate -f ecma Test/en.expected 2>&1 | \
375 sed 's#file://$(my_abs_top_srcdir)/##g' | \
376 diff - Test/validate.check.monodocer
377 $(MONO) $(PROGRAM) validate -f ecma Test/en.expected.importslashdoc 2>&1 | \
378 sed 's#file://$(my_abs_top_srcdir)/##g' | \
379 diff --brief - Test/validate.check.monodocer.importslashdoc
380 $(MONO) $(PROGRAM) validate -f ecma Test/en.expected.since 2>&1 | \
381 sed 's#file://$(my_abs_top_srcdir)/##g' | \
382 diff --brief - Test/validate.check.monodocer.since
384 run-test-local: check-doc-tools
386 run-test-update : check-doc-tools-update
388 check-doc-tools: check-monodocer-since \
389 check-monodocer-importecmadoc \
390 check-monodocer-importslashdoc \
392 check-monodocer-delete \
393 check-mdoc-export-html \
394 check-mdoc-export-html-with-version \
395 check-mdoc-export-msxdoc \
396 check-mdoc-validate \
397 check-monodocer-dropns-classic \
398 check-monodocer-dropns-classic-withsecondary \
399 check-monodocer-dropns-delete \
400 check-monodocer-internal-interface \
401 check-monodocer-enumerations \
402 check-monodocer-dropns-multi
404 check-doc-tools-update: check-monodocer-since-update \
405 check-monodocer-importecmadoc-update \
406 check-monodocer-importslashdoc-update \
407 check-monodocer-update \
408 check-monodocer-delete-update \
409 check-mdoc-export-html-update \
410 check-mdoc-export-msxdoc-update \
411 check-mdoc-validate-update
413 check: check-doc-tools