* fixup/Makefile (install-local): Depend on $(the_lib).
[mono.git] / mcs / class / Microsoft.VisualBasic / fixup / Makefile
1 thisdir = class/Microsoft.VisualBasic/fixup
2
3 DISTFILES = fixup.pl
4
5 include ../../../build/rules.make
6
7 with_mono_path = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
8 ILDISASM = monodis
9 PERL = perl
10
11 # ----------------------------------------------
12 # Minor hack.  Copied from build/library.make
13
14 ifeq ($(PLATFORM), win32)
15 GACDIR = `cygpath -w $(mono_libdir)`
16 GACROOT = `cygpath -w $(DESTDIR)$(mono_libdir)`
17 test_flags += -d:WINDOWS
18 else
19 GACDIR = $(mono_libdir)
20 GACROOT = $(DESTDIR)$(mono_libdir)
21 endif
22
23 ifdef NO_INSTALL
24 GACUTIL = :
25 else
26 gacutil = $(topdir)/class/lib/net_1_1_bootstrap/gacutil.exe
27 GACUTIL = MONO_PATH="$(topdir)/class/lib/net_1_1_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(gacutil)
28 endif
29
30 ifdef NO_SIGN_ASSEMBLY
31 SN = :
32 else
33 sn = $(topdir)/class/lib/net_1_1_bootstrap/sn.exe
34 SN = MONO_PATH="$(topdir)/class/lib/net_1_1_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(sn)
35 SNFLAGS = -q -R
36 endif
37
38 # ----------------------------------------------
39
40 ilasm = $(topdir)/class/lib/net_1_1_bootstrap/ilasm.exe
41 ILASM = MONO_PATH="$(topdir)/class/lib/net_1_1_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(ilasm)
42
43 the_lib = $(PROFILE)/Microsoft.VisualBasic.dll
44 the_il = $(the_lib:.dll=.il)
45
46 all-local: $(the_lib)
47
48 $(the_lib): $(the_il) Microsoft.VisualBasic.VBUtils.resources
49         $(ILASM) /out:$@ $<
50         $(SN) $(SNFLAGS) $@ $(topdir)/class/mono.snk
51
52 $(the_il): $(topdir)/class/lib/$(PROFILE)/Microsoft.VisualBasic.dll fixup.pl
53         $(with_mono_path) $(ILDISASM) $< > t1 || { rm -f t1; exit 1; }
54         $(PERL) ./fixup.pl t1 > t2 && rm -f t1
55         mv t2 $@
56
57 Microsoft.VisualBasic.VBUtils.resources: ../Microsoft.VisualBasic/VBUtils.resources
58         cp $< $@
59
60 test-local run-test-local run-test-ondotnet-local:
61         @:
62
63 # ----------------------------------------------
64 # Minor hack.  Copied from build/library.make
65
66 install-local: $(the_lib)
67
68 uninstall-local:
69
70 ifndef NO_INSTALL
71
72 ifdef LIBRARY_INSTALL_DIR
73 install-local:
74         $(MKINSTALLDIRS) $(DESTDIR)$(LIBRARY_INSTALL_DIR)
75         $(INSTALL_LIB) $(the_lib) $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME)
76         test ! -f $(the_lib).mdb || $(INSTALL_LIB) $(the_lib).mdb $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME).mdb
77
78 uninstall-local:
79         -rm -f $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME) $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME).mdb
80
81 else
82
83 # If RUNTIME_HAS_CONSISTENT_GACDIR is set, it implies that the internal GACDIR
84 # of the runtime is the same as the GACDIR we want.  So, we don't need to pass it
85 # to gacutil.  Note that the GACDIR we want may not be the same as the value of
86 # GACDIR set above, since the user could have overridden the value of $(prefix).
87 #
88 # This makes a difference only when we're building from the mono/ tree, since we
89 # have to ensure that the internal GACDIR of the in-tree runtime matches where we
90 # install the DLLs.
91
92 ifndef RUNTIME_HAS_CONSISTENT_GACDIR
93 gacdir_flag = /gacdir $(GACDIR)
94 endif
95
96 install-local: $(gacutil)
97         $(GACUTIL) /i $(the_lib) /f $(gacdir_flag) /root $(GACROOT) /package $(FRAMEWORK_VERSION)
98
99 uninstall-local: $(gacutil)
100         -$(GACUTIL) /u Microsoft.VisualBasic $(gacdir_flag) /root $(GACROOT) /package $(FRAMEWORK_VERSION)
101
102 endif
103 endif
104 # ----------------------------------------------
105
106 clean-local:
107         rm -f $(the_lib)* $(the_il) Microsoft.VisualBasic.VBUtils.resources
108
109 dist-local: dist-default
110         $(MKINSTALLDIRS) $(distdir)/default $(distdir)/net_2_0