This should fix #76928. This fix incorporates ideas from a patch
[mono.git] / mcs / class / Microsoft.VisualBasic / Makefile
1 thisdir = class/Microsoft.VisualBasic
2
3 SUBDIRS = Test/standalone
4
5 include ../../build/rules.make
6
7 LIBRARY = Microsoft.VisualBasic.dll
8 LIBRARY_NEEDS_POSTPROCESSING = yes
9
10 # UTF-8
11 CODEPAGE = 65001
12
13 LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll /r:System.Windows.Forms.dll @Microsoft.VisualBasic.dll.resources
14 TEST_MCS_FLAGS = -nowarn:0618 -nowarn:219 -nowarn:169
15
16 LIB_MCS_FLAGS_RESOURCES = $(LIB_MCS_FLAGS) 
17
18 TXT_RES = Microsoft.VisualBasic.VBUtils.resources
19 #RESX_RES = 
20
21 with_mono_path = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" 
22
23 ifeq ($(PROFILE), default)
24 bootstrap_profile = net_1_1_bootstrap
25 else
26 bootstrap_profile = $(PROFILE)_bootstrap
27 endif
28
29 ilasm = $(topdir)/class/lib/$(bootstrap_profile)/ilasm.exe
30 ILASM = MONO_PATH="$(topdir)/class/lib/$(bootstrap_profile)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(ilasm)
31
32 the_il = fixup/$(PROFILE)/Microsoft.VisualBasic.il
33
34 EXTRA_DISTFILES = fixup/fixup.pl Microsoft.VisualBasic.dll.resources $(TXT_RES:.resources=.txt) #$(RESX_RES:.resources=.resx)
35 CLEAN_FILES = $(the_il) $(TXT_RES) #$(RESX_RES)
36
37 include ../../build/library.make
38
39 $(build_lib): $(TXT_RES) #$(RESX_RES)
40
41 $(TXT_RES): %.resources: %.txt
42         $(RESGEN) `echo $< | $(PLATFORM_CHANGE_SEPARATOR_CMD)`
43
44 #$(RESX_RES): %.resources: %.resx
45 #       $(RESGEN) `echo $< | $(PLATFORM_CHANGE_SEPARATOR_CMD)`
46
47 $(the_lib): $(the_il)
48         $(ILASM) $(IL_FLAGS) /out:$@ /dll $<
49         $(SN) $(SNFLAGS) $@ $(topdir)/class/mono.snk
50
51 $(the_il): $(build_lib) fixup/fixup.pl
52         $(with_mono_path) $(ILDISASM) $< > fixup/$(PROFILE)/t1
53         $(PERL) fixup/fixup.pl fixup/$(PROFILE)/t1 > fixup/$(PROFILE)/t2
54         rm -f fixup/$(PROFILE)/t1
55         mv fixup/$(PROFILE)/t2 $@