X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fbuild%2Flibrary.make;h=e0c16f48e90558609352e080ed67c54f4e64b43e;hb=205a420dae07ec2676d7b352a4b1cb94e996e0da;hp=f9b197cda5815edc9a995933616c50e640feba87;hpb=68be3904cf770be9f98a6ce0e8d71899cb94f189;p=mono.git diff --git a/mcs/build/library.make b/mcs/build/library.make index f9b197cda58..e0c16f48e90 100644 --- a/mcs/build/library.make +++ b/mcs/build/library.make @@ -145,6 +145,7 @@ csproj-library: echo $(build_lib); \ echo $(FRAMEWORK_VERSION); \ echo $(PROFILE); \ + echo $(RESOURCE_DEFS); \ echo $(response)) > $(topdir)/../msvc/scripts/inputs/$$config_file csproj-test: @@ -216,7 +217,28 @@ clean-local: test-local run-test-local run-test-ondotnet-local: @: -DISTFILES = $(wildcard *$(LIBRARY)*.sources) $(EXTRA_DISTFILES) +# +# RESOURCES_DEFS is a list of ID,FILE pairs separated by spaces +# for each of those, generate a rule that produces ID.resource from +# FILE using the resgen tool, adds the generated file to CLENA_FILES and +# passes the resource to the compiler +# +ccomma = , +define RESOURCE_template +$(1).resources: $(2) + $(RESGEN) "$$<" "$$@" + +GEN_RESOURCE_DEPS += $(1).resources +GEN_RESOURCE_FLAGS += -resource:$(1).resources +CLEAN_FILES += $(1).resources +DIST_LISTED_RESOURCES += $(2) +endef + +ifdef RESOURCE_DEFS +$(foreach pair,$(RESOURCE_DEFS), $(eval $(call RESOURCE_template,$(word 1, $(subst $(ccomma), ,$(pair))), $(word 2, $(subst $(ccomma), ,$(pair)))))) +endif + +DISTFILES = $(wildcard *$(LIBRARY)*.sources) $(EXTRA_DISTFILES) $(DIST_LISTED_RESOURCES) ASSEMBLY = $(LIBRARY) ASSEMBLY_EXT = .dll @@ -236,6 +258,7 @@ csproj-test: echo $(test_lib); \ echo $(FRAMEWORK_VERSION); \ echo $(PROFILE); \ + echo ""; \ echo $(test_response)) > $(topdir)/../msvc/scripts/inputs/$$config_file endif @@ -275,8 +298,8 @@ endif $(the_lib): $(the_libdir)/.stamp -$(build_lib): $(response) $(sn) $(BUILT_SOURCES) $(build_libdir:=/.stamp) - $(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) -target:library -out:$@ $(BUILT_SOURCES_cmdline) @$(response) +$(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 $(Q) $(STRING_REPLACER) $(RESOURCE_STRINGS_FILES) $@ endif