[build] Fixes setup for libraries without sources
authorMarek Safar <marek.safar@gmail.com>
Mon, 24 Apr 2017 13:05:01 +0000 (15:05 +0200)
committerMarek Safar <marek.safar@gmail.com>
Mon, 24 Apr 2017 17:42:51 +0000 (19:42 +0200)
mcs/build/library.make
mcs/build/tests.make

index b2870bf58c8bf3fc0215836e2d3358298fe64de8..9382401ab52712ef6e9ee7b836858e047a07233a 100644 (file)
@@ -298,6 +298,8 @@ endif
 
 $(the_lib): $(the_libdir)/.stamp
 
+ifndef NO_BUILD
+
 $(build_lib): $(response) $(sn) $(BUILT_SOURCES) $(build_libdir:=/.stamp) $(GEN_RESOURCE_DEPS)
        $(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) $(GEN_RESOURCE_FLAGS) -target:library -out:$@ $(BUILT_SOURCES_cmdline) @$(response)
 ifdef RESOURCE_STRINGS_FILES
@@ -313,6 +315,8 @@ $(the_lib): $(build_lib)
        $(Q) test ! -f $(build_lib:.dll=.pdb) || mv $(build_lib:.dll=.pdb) $(the_lib:.dll=.pdb)
 endif
 
+endif
+
 library_CLEAN_FILES += $(PROFILE)_aot.log
 
 ifdef PLATFORM_AOT_SUFFIX
@@ -355,7 +359,10 @@ endif
 ## Include corcompare stuff
 include $(topdir)/build/corcompare.make
 
+ifndef NO_BUILD
 all-local: $(makefrag) $(test_makefrag) $(btest_makefrag)
+endif
+
 ifneq ($(response),$(sourcefile))
 $(response): $(topdir)/build/library.make $(depsdir)/.stamp
 endif
index 45c77ebda49466d3a905a36e3f06f97e4e9d80cd..0d01b5429ce4239f7bdfa0f5d4573c674fa73acc 100644 (file)
@@ -55,16 +55,18 @@ tests_CLEAN_FILES += $(ASSEMBLY:$(ASSEMBLY_EXT)=_test*.dll) $(ASSEMBLY:$(ASSEMBL
 
 xtest_sourcefile = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
 
-ifeq ($(wildcard $(xtest_sourcefile)),)
-xtest_sourcefile = $(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
-endif
 
 xunit_test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xunit-test.dll)
 
-xtest_response = $(depsdir)/$(xtest_lib).response
-xtest_makefrag = $(depsdir)/$(xtest_lib).makefrag
+xtest_response = $(depsdir)/$(xunit_test_lib).response
+xtest_makefrag = $(depsdir)/$(xunit_test_lib).makefrag
 xtest_flags = -r:$(the_assembly) $(xunit_libs_ref) $(XTEST_MCS_FLAGS) $(XTEST_LIB_MCS_FLAGS)
 
+ifeq ($(wildcard $(xtest_sourcefile)),)
+xtest_sourcefile = $(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
+tests_CLEAN_FILES += $(xunit_test_lib) $(xtest_response) $(xtest_makefrag)
+endif
+
 ifndef HAVE_CS_TESTS
 HAVE_CS_TESTS := $(wildcard $(test_sourcefile))
 endif