11CONFIGURATION = Release
22PROGRAM = ../bin/$(CONFIGURATION ) /mdoc.exe
3- MONO = mono
3+ MONO = $( if $( filter Windows_NT, $( OS ) ) ,, mono)
44CSCOMPILE = mcs
55VBCOMPILE = vbnc
66TEST_CSCFLAGS = -target:library
@@ -47,8 +47,8 @@ EXTRA_DISTFILES = \
4747MULTI-CLASSIC = Test/DocTest-DropNS-classic.dll Test/DocTest-DropNS-classic-multitest.dll
4848MULTI-UNIFIED = Test/DocTest-DropNS-unified.dll Test/DocTest-DropNS-unified-multitest.dll
4949
50- DIFF = diff -rup
51- DIFF_QUIET = diff --brief
50+ DIFF = diff -rup $( if $( filter Windows_NT, $( OS ) ) ,--strip-trailing-cr,)
51+ DIFF_QUIET = diff --brief $( if $( filter Windows_NT, $( OS ) ) ,--strip-trailing-cr,)
5252
5353ifeq ($(ENVIRONMENT ) ,wsl)
5454DIFF = diff -rup -Z
@@ -59,11 +59,40 @@ cleanup:
5959 -rm -Rf Test/en.actual Test/html.actual
6060
6161nunit :
62- mono ../packages/NUnit.ConsoleRunner.3.6.0/tools/nunit3-console.exe mdoc.Test/bin/$(CONFIGURATION ) /mdoc.Test.dll
62+ $(MONO ) ../packages/NUnit.ConsoleRunner.3.6.0/tools/nunit3-console.exe mdoc.Test/bin/$(CONFIGURATION ) /mdoc.Test.dll
63+
64+ ifeq ($(filter Windows_NT,$(OS ) ) ,)
6365
6466Test/DocTest-VB-Eii.dll :
6567 $(VBCOMPILE ) -out:Test/DocTest-VB-Eii.dll Test/ClassEnumerator.vb
6668
69+ ../mdoc/mdoc.Test/mdoc.Test.FSharp/bin/Release/mdoc.Test.FSharp.dll :
70+ msbuild ../mdoc/mdoc.Test/mdoc.Test.FSharp/mdoc.Test.FSharp.fsproj -property:Configuration=Release
71+
72+ Test/TestInterfaceImplementation/bin/Release/TestInterfaceImplementation.dll :
73+ msbuild ../mdoc/Test/TestInterfaceImplementation/TestInterfaceImplementation.csproj -property:Configuration=Release
74+
75+ Test/AttachedEventsAndProperties/bin/Release/AttachedEventsAndProperties.dll :
76+ msbuild ../mdoc/Test/AttachedEventsAndProperties/AttachedEventsAndProperties.csproj -property:Configuration=Release
77+
78+ else # Full .NET Framework has extra attributes and slightly different generated types
79+
80+ Test/DocTest-VB-Eii.dll :
81+ cp ../external/Test/DocTest-VB-Eii.dll Test/DocTest-VB-Eii.dll
82+
83+ ../mdoc/mdoc.Test/mdoc.Test.FSharp/bin/Release/mdoc.Test.FSharp.dll :
84+ cp ../external/Test/mdoc.Test.FSharp.dll ../mdoc/mdoc.Test/mdoc.Test.FSharp/bin/Release/mdoc.Test.FSharp.dll
85+
86+ Test/TestInterfaceImplementation/bin/Release/TestInterfaceImplementation.dll :
87+ mkdir -p Test/TestInterfaceImplementation/bin/Release/
88+ cp ../external/Test/TestInterfaceImplementation.dll Test/TestInterfaceImplementation/bin/Release/TestInterfaceImplementation.dll
89+
90+ Test/AttachedEventsAndProperties/bin/Release/AttachedEventsAndProperties.dll :
91+ mkdir -p Test/AttachedEventsAndProperties/bin/Release/
92+ cp ../external/Test/AttachedEventsAndProperties.dll Test/AttachedEventsAndProperties/bin/Release/AttachedEventsAndProperties.dll
93+
94+ endif
95+
6796Test/DocTest-addNonGeneric.dll :
6897 $(CSCOMPILE ) $(TEST_CSCFLAGS ) -unsafe -debug -optimize -target:library -out:$@ Test/DocTest-addNonGeneric.cs
6998
@@ -174,7 +203,7 @@ Test/DocTest-typeForwards-Third.dll:
174203 $(CSCOMPILE ) $(TEST_CSCFLAGS ) -unsafe -debug -optimize -target:library -out:Test/DocTest-typeForwards-Third-First.dll /reference:$@ Test/DocTest-typeForwards.cs /define:THIRD
175204
176205Test/DocTest-TypeProjection.dll :
177- rm -f DocTest-TypeProjection.dll
206+ rm -f $@
178207 $(CSCOMPILE ) $(TEST_CSCFLAGS ) -unsafe -debug -optimize -target:library -out:$@ Test/DocTest-TypeProjection.cs
179208
180209# build test dll to test forwardings nested type
@@ -183,7 +212,7 @@ Test/DocTest-nestedType-typeForwards-First.dll:
183212 $(CSCOMPILE ) $(TEST_CSCFLAGS ) -unsafe -debug -optimize -target:library -out:$@ Test/DocTest-nestedType-typeForwards.cs /define:FIRST
184213
185214Test/DocTest-LongFileName.dll :
186- rm -f DocTest-LongFileName.dll
215+ rm -f $@
187216 $(CSCOMPILE ) $(TEST_CSCFLAGS ) -unsafe -debug -optimize -target:library -out:$@ Test/DocTest-LongFileName.cs
188217
189218.PHONY : Test/DocTest-nestedType-typeForwards-Second.dll
@@ -670,7 +699,7 @@ check-monodocer-fx-statistics-remove:
670699
671700check-monodocer-fsharp :
672701 -rm -Rf Test/en.actual
673- msbuild ../mdoc/mdoc.Test/mdoc.Test.FSharp/mdoc.Test.FSharp.fsproj -property:Configuration=Release
702+ $( MAKE ) ../mdoc/mdoc.Test/mdoc.Test.FSharp/bin/Release/ mdoc.Test.FSharp.dll
674703 $(MONO ) $(PROGRAM ) update -lang fsharp -o Test/en.actual ../mdoc/mdoc.Test/mdoc.Test.FSharp/bin/Release/mdoc.Test.FSharp.dll
675704
676705ifeq ($(ENVIRONMENT ) , wsl)
@@ -682,7 +711,7 @@ endif
682711
683712check-monodocer-members-implementation :
684713 -rm -Rf Test/en.actual
685- msbuild ../mdoc/ Test/TestInterfaceImplementation/TestInterfaceImplementation.csproj -property:Configuration=Release
714+ $( MAKE ) Test/TestInterfaceImplementation/bin/Release/ TestInterfaceImplementation.dll
686715 $(MONO ) $(PROGRAM ) update -o Test/en.actual Test/TestInterfaceImplementation/bin/Release/TestInterfaceImplementation.dll
687716 $(DIFF ) Test/en.expected.members-implementation Test/en.actual
688717
@@ -768,7 +797,7 @@ check-monodocer-import-fx-update: check-monodocer-import-fx-work
768797
769798check-monodocer-attached-entities :
770799 -rm -Rf Test/en.actual
771- msbuild ../mdoc/ Test/AttachedEventsAndProperties/AttachedEventsAndProperties.csproj -property:Configuration=Release
800+ $( MAKE ) Test/AttachedEventsAndProperties/bin/Release/ AttachedEventsAndProperties.dll
772801 $(MONO ) $(PROGRAM ) update --debug -o Test/en.actual Test/AttachedEventsAndProperties/bin/Release/AttachedEventsAndProperties.dll -lang docid -lang vb.net -lang fsharp -lang javascript -lang c++/cli -lang c++/cx -lang c++/winrt
773802 $(DIFF ) Test/en.expected-attached-entities Test/en.actual
774803
0 commit comments