Skip to content

Commit 2f68f98

Browse files
committed
[build] Fix make all target. (#44)
Running `make all` would fail: make: *** No rule to make target `bin/TestDebug/Java.Interop.Tools.JavaCallableWrappers-Tests.dll', needed by `all'. Stop. This happened because `Java.Interop.Tools.JavaCallableWrappers-Tests.dll` was part of `$(TESTS)`, which is a dependency of the `all` target, but there wasn't a rule to create that file. Add a rule to create `bin/TestDebug/Java.Interop.Tools.JavaCallableWrappers-Tests.dll`.
1 parent 4ace37f commit 2f68f98

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,17 @@ bin/Test$(CONFIGURATION)/$(NATIVE_TIMING_LIB): tests/NativeTiming/timing.c $(wil
8383
mkdir -p `dirname "$@"`
8484
gcc -g -shared -o $@ $< -m32 $(JI_JDK_INCLUDE_PATHS:%=-I%)
8585

86-
bin/Test$(CONFIGURATION)/Java.Interop-Tests.dll: $(wildcard src/Java.Interop/*/*.cs src/Java.Interop/Tests/*/*.cs)
87-
$(XBUILD)
88-
touch $@
89-
90-
bin/Test$(CONFIGURATION)/Java.Interop.Dynamic-Tests.dll: $(wildcard src/Java.Interop.Dynamic/*/*.cs src/Java.Interop.Dynamic/Tests/*/*.cs)
91-
$(XBUILD)
92-
touch $@
93-
94-
bin/Test$(CONFIGURATION)/Java.Interop.Export-Tests.dll: $(wildcard src/Java.Interop.Export/*/*.cs src/Java.Interop.Export/Tests/*/*.cs)
95-
$(XBUILD)
96-
touch $@
86+
# Usage: $(call TestAssemblyTemplate,assembly-basename)
87+
define TestAssemblyTemplate
88+
bin/Test$$(CONFIGURATION)/$(1)-Tests.dll: $(wildcard src/$(1)/*/*.cs src/$(1)/Test*/*/*.cs)
89+
$$(XBUILD)
90+
touch $$@
91+
endef # TestAssemblyTemplate
92+
93+
$(eval $(call TestAssemblyTemplate,Java.Interop))
94+
$(eval $(call TestAssemblyTemplate,Java.Interop.Dynamic))
95+
$(eval $(call TestAssemblyTemplate,Java.Interop.Export))
96+
$(eval $(call TestAssemblyTemplate,Java.Interop.Tools.JavaCallableWrappers))
9797

9898
bin/Test$(CONFIGURATION)/Java.Interop-PerformanceTests.dll: $(wildcard tests/Java.Interop-PerformanceTests/*.cs) bin/Test$(CONFIGURATION)/$(NATIVE_TIMING_LIB)
9999
$(XBUILD)

0 commit comments

Comments
 (0)