SUBDIRS =
include ../../build/rules.make
-UPSTREAM_DIR = ../../../external/aspnetwebstack/src/System.Json/Properties
-RESX_RESOURCES = $(UPSTREAM_DIR)/Resources.resx
-RESOURCES = $(RESX_DIST:.resx=.resources)
+UPSTREAM_DIR = ../../../external/aspnetwebstack/src
+RESX_RESOURCES = $(UPSTREAM_DIR)/System.Json/Properties/Resources.resx
+RESOURCES = $(subst $(UPSTREAM_DIR),$(build_libdir),$(RESX_RESOURCES:.resx=.resources))
LIBRARY = System.Json.dll
LIB_MCS_FLAGS = \
+ /d:ASPNETMVC \
/r:System.dll \
/r:System.Xml.dll \
/r:System.Core.dll \
/r:System.Runtime.Serialization.dll \
/r:System.ServiceModel.Web.dll \
- $(RESX_RES:%=/resource:%)
+ $(RESOURCES:%=/resource:%)
ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
LIB_MCS_FLAGS += /r:Microsoft.CSharp.dll
$(the_lib): $(RESOURCES)
-$(RESOURCES): %.resources: %.resx
- $(RESGEN) $< || cp $@.prebuilt $@
+# Canned recipe which would be useful, but make doesn't run it for some reason...
+#define run-resgen =
+# mkdir -p $(dir $@)
+# $(RESGEN) $< $@
+#endef
+
+$(build_libdir)/System.Json/Properties/Resources.resources: $(UPSTREAM_DIR)/System.Json/Properties/Resources.resx
+# Doesn't work for some reason
+# $(run-resgen)
+ mkdir -p $(dir $@)
+ $(RESGEN) $< $@