[Mono.Data.Sqlite] Use a prebuilt resources file like Managed.Windows.Forms does.
authorRolf Bjarne Kvinge <rolf@xamarin.com>
Wed, 2 Nov 2011 11:11:47 +0000 (12:11 +0100)
committerRodrigo Kumpera <kumpera@gmail.com>
Mon, 27 Aug 2012 21:13:30 +0000 (18:13 -0300)
This makes it possible to build the monotouch profile, since generating the resources
file requires a System.Windows.Forms.dll, which monotouch doesn't have.

mcs/class/Mono.Data.Sqlite/Makefile
mcs/class/Mono.Data.Sqlite/resources/SR.resources.prebuilt [new file with mode: 0644]

index 09811f7dad0d37df5af10f671d03a7ea39f48c1d..f0d38ab1280f19f4baec199049696f11440261d2 100644 (file)
@@ -7,6 +7,8 @@ OTHER_RESOURCES = $(wildcard resources/*.bmp)
 
 RESOURCES = $(RESX_RESOURCES) $(OTHER_RESOURCES)
 
+PREBUILT = $(RESX_RESOURCES:=.prebuilt)
+
 LIBRARY = Mono.Data.Sqlite.dll
 LIB_MCS_FLAGS = /unsafe /r:System.dll /r:System.Data.dll /r:System.Transactions.dll /r:System.Xml.dll \
        $(RESOURCES:%=-resource:%) -d:SQLITE_STANDARD
@@ -19,10 +21,13 @@ EXTRA_DISTFILES = Test/SqliteTest.cs \
        resources/ChangeLog     \
        resources/DataTypes.xml \
        resources/MetaDataCollections.xml \
+       $(PREBUILT) \
        $(wildcard resources/*.bmp)
        
 CLEAN_FILES += $(RESX_RESOURCES)
 
+CLEAN_FILES = $(RESX_RESOURCES)
+
 test-local: test.db 
 
 test.db: Test/test.sql
@@ -33,5 +38,9 @@ include ../../build/library.make
 
 $(the_lib): $(RESOURCES)
 
+$(PREBUILT): %.prebuilt: %
+       cp $* $@
+
 $(RESX_RESOURCES): %.resources: %.resx
-       $(RESGEN) $<
+       $(RESGEN) $< || cp $@.prebuilt $@
+
diff --git a/mcs/class/Mono.Data.Sqlite/resources/SR.resources.prebuilt b/mcs/class/Mono.Data.Sqlite/resources/SR.resources.prebuilt
new file mode 100644 (file)
index 0000000..2b09f9e
Binary files /dev/null and b/mcs/class/Mono.Data.Sqlite/resources/SR.resources.prebuilt differ