Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Habersack <grendel@twistedcode.net>2012-03-29 15:44:11 +0400
committerMarek Habersack <grendel@twistedcode.net>2012-03-29 15:46:22 +0400
commit27c54b1fb037ab3f51537ea2731e6e9edfa15343 (patch)
treecf527fe11ceb3f0718afa489b603124c9bb9b383 /mcs/class/System.Web.Razor
parent4751bee29632d7a0908e0c92f9d4d7c9ebbdc903 (diff)
Fix resource compilation for imported modules so that they don't put results in the submodule directory
Diffstat (limited to 'mcs/class/System.Web.Razor')
-rw-r--r--mcs/class/System.Web.Razor/Makefile30
1 files changed, 22 insertions, 8 deletions
diff --git a/mcs/class/System.Web.Razor/Makefile b/mcs/class/System.Web.Razor/Makefile
index dcfb7b14a4b..4af3edd9c5f 100644
--- a/mcs/class/System.Web.Razor/Makefile
+++ b/mcs/class/System.Web.Razor/Makefile
@@ -5,11 +5,12 @@ include ../../build/rules.make
LIBRARY = System.Web.Razor.dll
LIBRARY_NAME = System.Web.Razor.dll
+UPSTREAM_DIR = ../../../external/aspnetwebstack/src
RESX_DIST = \
- ../../../external/aspnetwebstack/src/System.Web.Razor/Resources/RazorResources.resx \
- ../../../external/aspnetwebstack/src/CommonResources.resx
+ $(UPSTREAM_DIR)/System.Web.Razor/Resources/RazorResources.resx \
+ $(UPSTREAM_DIR)/CommonResources.resx
-RESX_RES = $(RESX_DIST:.resx=.resources)
+RESOURCES = $(subst $(UPSTREAM_DIR),$(build_libdir),$(RESX_DIST:.resx=.resources))
LIB_MCS_FLAGS = \
/warn:1 \
@@ -18,15 +19,28 @@ LIB_MCS_FLAGS = \
/r:System.dll \
/r:System.Core.dll \
/d:ASPNETWEBPAGES \
- $(RESX_RES:%=/resource:%)
+ $(RESOURCES:%=/resource:%)
EXTRA_DISTFILES = $(RESX_DIST)
-RESOURCES = $(RESX_DIST:.resx=.resources)
-
include ../../build/library.make
$(build_lib): $(RESOURCES)
-$(RESOURCES): %.resources: %.resx
- $(RESGEN) `echo $< | $(PLATFORM_CHANGE_SEPARATOR_CMD)`
+# Canned recipe which would be useful, but make doesn't run it for some reason...
+#define run-resgen =
+# mkdir -p $(dir `echo $@ | $(PLATFORM_CHANGE_SEPARATOR_CMD)`)
+# $(RESGEN) `echo $< | $(PLATFORM_CHANGE_SEPARATOR_CMD)` `echo $@ | $(PLATFORM_CHANGE_SEPARATOR_CMD)`
+#endef
+
+$(build_libdir)/System.Web.Razor/Resources/RazorResources.resources: $(UPSTREAM_DIR)/System.Web.Razor/Resources/RazorResources.resx
+# Doesn't work for some reason
+# $(run-resgen)
+ mkdir -p $(dir `echo $@ | $(PLATFORM_CHANGE_SEPARATOR_CMD)`)
+ $(RESGEN) `echo $< | $(PLATFORM_CHANGE_SEPARATOR_CMD)` `echo $@ | $(PLATFORM_CHANGE_SEPARATOR_CMD)`
+
+$(build_libdir)/CommonResources.resources: $(UPSTREAM_DIR)/CommonResources.resx
+# Doesn't work for some reason
+# $(run-resgen)
+ mkdir -p $(dir `echo $@ | $(PLATFORM_CHANGE_SEPARATOR_CMD)`)
+ $(RESGEN) `echo $< | $(PLATFORM_CHANGE_SEPARATOR_CMD)` `echo $@ | $(PLATFORM_CHANGE_SEPARATOR_CMD)`