Fix System.Json resources to be embedded
authorMarek Safar <marek.safar@gmail.com>
Fri, 30 Mar 2012 14:13:18 +0000 (15:13 +0100)
committerMarek Safar <marek.safar@gmail.com>
Fri, 30 Mar 2012 14:14:11 +0000 (15:14 +0100)
mcs/class/System.Json/Makefile
mcs/class/System.Json/System.Json.dll.sources

index 20398a5fe6f99d89848469fcb9921a17225c9df0..f83e3ed6a98e4a0f91039d278c8d9721538c4290 100644 (file)
@@ -2,19 +2,17 @@ thisdir = class/System.Json
 SUBDIRS = 
 include ../../build/rules.make
 
-UPSTREAM_DIR = ../../../external/aspnetwebstack/src
-RESX_RESOURCES = $(UPSTREAM_DIR)/System.Json/Properties/Resources.resx
-RESOURCES = $(subst $(UPSTREAM_DIR),$(build_libdir),$(RESX_RESOURCES:.resx=.resources))
+System.Json.Properties.Resources.resources: ../../../external/aspnetwebstack/src/System.Json/Properties/Resources.resx
+       $(RESGEN) "$<" "$@"
 
 LIBRARY = System.Json.dll
-LIB_MCS_FLAGS = \
-               /d:ASPNETMVC -keyfile:../winfx.pub -delaysign \
+LIB_MCS_FLAGS = /d:ASPNETMVC -keyfile:../winfx.pub -delaysign \
                /r:System.dll \
                /r:System.Xml.dll \
                /r:System.Core.dll \
                /r:System.Runtime.Serialization.dll \
                /r:System.ServiceModel.Web.dll \
-               $(RESOURCES:%=/resource:%)
+               /resource:System.Json.Properties.Resources.resources
 
 ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
 LIB_MCS_FLAGS += /r:Microsoft.CSharp.dll
@@ -22,20 +20,6 @@ endif
 
 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
-EXTRA_DISTFILES = $(RESX_RESOURCES)
-
 include ../../build/library.make
 
-$(the_lib): $(RESOURCES)
-
-# 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) $< $@
+$(the_lib): System.Json.Properties.Resources.resources
index 7e0d4bdeb139743e9651a8e70de0fb7183d81054..f829400c4a53cfa861c13d0f4da4d4cb898ce065 100644 (file)
@@ -1,6 +1,4 @@
 ../../build/common/Consts.cs
-../../build/common/Locale.cs
-../../build/common/MonoTODOAttribute.cs
 Assembly/AssemblyInfo.cs
 
 ../../../external/aspnetwebstack/src/RS.cs