Added CODEPAGE Makefile variable that specifies the encoding used by compilers.
[mono.git] / mcs / class / Microsoft.VisualBasic / Makefile
index 5ebe1fe0a580c8292973df5961034580f7e7fe9b..ccb210139edcc0fa0e8f53a372f41a6746c07ab6 100644 (file)
@@ -1,25 +1,48 @@
 thisdir = class/Microsoft.VisualBasic
-SUBDIRS =
+
+SUBDIRS = Test/standalone
 
 include ../../build/rules.make
 
 LIBRARY = Microsoft.VisualBasic.dll
-LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll @Microsoft.VisualBasic.dll.resources
+LIBRARY_NEEDS_POSTPROCESSING = yes
+
+# UTF-8
+CODEPAGE = 65001
+
+LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll /r:System.Windows.Forms.dll @Microsoft.VisualBasic.dll.resources
+TEST_MCS_FLAGS = -nowarn:0618 -nowarn:219 -nowarn:169
 
 LIB_MCS_FLAGS_RESOURCES = $(LIB_MCS_FLAGS) 
 
-TXT_RESOURCES = Microsoft.VisualBasic/VBUtils.resources
-RESX_RESOURCES = 
+TXT_RES = Microsoft.VisualBasic.VBUtils.resources
+#RESX_RES = 
+
+with_mono_path = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" 
 
-EXTRA_DISTSFILES = $(TXT_RESOURCES:.resources=.txt) $(RESX_RESOURCES:.resources=.resx)
-CLEAN_FILES = $(TXT_RESOURCES) $(RESX_RESOURCES)
+ilasm = $(topdir)/class/lib/net_1_1_bootstrap/ilasm.exe
+ILASM = MONO_PATH="$(topdir)/class/lib/net_1_1_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(ilasm)
+
+the_il = fixup/$(PROFILE)/Microsoft.VisualBasic.il
+
+EXTRA_DISTFILES = fixup/fixup.pl Microsoft.VisualBasic.dll.resources $(TXT_RES:.resources=.txt) #$(RESX_RES:.resources=.resx)
+CLEAN_FILES = $(the_il) $(TXT_RES) #$(RESX_RES)
 
 include ../../build/library.make
 
-$(the_lib): $(TXT_RESOURCES) $(RESX_RESOURCES)
+$(build_lib): $(TXT_RES) #$(RESX_RES)
+
+$(TXT_RES): %.resources: %.txt
+       $(RESGEN) `echo $< | $(PLATFORM_CHANGE_SEPARATOR_CMD)`
+
+#$(RESX_RES): %.resources: %.resx
+#      $(RESGEN) `echo $< | $(PLATFORM_CHANGE_SEPARATOR_CMD)`
 
-$(TXT_RESOURCES): %.resources: %.txt
-       $(RESGEN) $<
+$(the_lib): $(the_il)
+       $(ILASM) $(IL_FLAGS) /out:$@ /dll $<
+       $(SN) $(SNFLAGS) $@ $(topdir)/class/mono.snk
 
-$(RESX_RESOURCES): %.resources: %.resx
-       $(RESGEN) $<
+$(the_il): $(build_lib) fixup/fixup.pl
+       $(with_mono_path) $(ILDISASM) $< > fixup/$(PROFILE)/t1 || { rm -f fixup/$(PROFILE)/t1; exit 1; }
+       $(PERL) fixup/fixup.pl fixup/$(PROFILE)/t1 > fixup/$(PROFILE)/t2 && rm -f fixup/$(PROFILE)/t1
+       mv fixup/$(PROFILE)/t2 $@