2 # Scripts that we install
4 # Starting with Mono 2.0, the majority of the tools default to the
5 # 2.0 profile. Commands that support the 1.0 toolchain and must
6 # run under 1.0 have the number 1 appended to their command names
7 # (for example mcs1 is the C# 1.0 compiler) and are listed in the
8 # scripts_1_0 compat variable.
10 # To preserve compatibility with old Makefiles and tools we keep the
11 # command names that had the suffix 2 (like wsdl2)
14 SCRIPT_IN=script.bat.in
16 FILTER=sed -e 's,\.bat\.exe,\.exe,g' -e 's,/,\\,g'
25 COMPAT_1_0_SUFFIX=1$(SCRIPT_SUFFIX)
26 COMPAT_2_0_SUFFIX=2$(SCRIPT_SUFFIX)
30 $(scripts_1_0_umask) \
31 $(scripts_1_0_compat) \
37 $(scripts_rpmhelpers) \
43 scripts_1_0_compat = \
45 genxs1$(SCRIPT_SUFFIX) \
46 ilasm1$(SCRIPT_SUFFIX) \
47 mcs1$(SCRIPT_SUFFIX) \
48 mkbundle1$(SCRIPT_SUFFIX) \
49 gacutil1$(SCRIPT_SUFFIX) \
50 monop1$(SCRIPT_SUFFIX) \
51 resgen1$(SCRIPT_SUFFIX) \
55 caspol$(SCRIPT_SUFFIX) \
56 cert2spc$(SCRIPT_SUFFIX) \
57 certmgr$(SCRIPT_SUFFIX) \
58 chktrust$(SCRIPT_SUFFIX) \
59 cilc$(SCRIPT_SUFFIX) \
60 disco$(SCRIPT_SUFFIX) \
61 dtd2xsd$(SCRIPT_SUFFIX) \
62 dtd2rng$(SCRIPT_SUFFIX) \
63 installvst$(SCRIPT_SUFFIX) \
64 genxs$(SCRIPT_SUFFIX) \
65 macpack$(SCRIPT_SUFFIX) \
68 monolinker$(SCRIPT_SUFFIX) \
69 mono-cil-strip$(SCRIPT_SUFFIX) \
70 mono-xmltool$(SCRIPT_SUFFIX) \
71 mozroots$(SCRIPT_SUFFIX) \
72 permview$(SCRIPT_SUFFIX) \
73 prj2make$(SCRIPT_SUFFIX) \
74 secutil$(SCRIPT_SUFFIX) \
75 setreg$(SCRIPT_SUFFIX) \
76 signcode$(SCRIPT_SUFFIX) \
77 soapsuds$(SCRIPT_SUFFIX) \
81 makecert$(SCRIPT_SUFFIX) \
86 csharp$(SCRIPT_SUFFIX) \
87 gacutil2$(SCRIPT_SUFFIX) \
88 gmcs$(SCRIPT_SUFFIX) \
89 httpcfg$(SCRIPT_SUFFIX) \
90 ilasm2$(SCRIPT_SUFFIX) \
91 mconfig$(SCRIPT_SUFFIX) \
92 mkbundle2$(SCRIPT_SUFFIX) \
93 mdoc$(SCRIPT_SUFFIX) \
94 mono-api-info$(SCRIPT_SUFFIX) \
95 mono-shlib-cop$(SCRIPT_SUFFIX) \
96 monop2$(SCRIPT_SUFFIX) \
97 resgen2$(SCRIPT_SUFFIX) \
98 wsdl2$(SCRIPT_SUFFIX) \
99 xsd2$(SCRIPT_SUFFIX) \
100 sgen$(SCRIPT_SUFFIX) \
101 sqlsharp$(SCRIPT_SUFFIX) \
102 svcutil$(SCRIPT_SUFFIX) \
103 xbuild$(SCRIPT_SUFFIX)
120 # these are the new defaults, 2.0 profile-based commands
122 # we can move scripts_1_0 scripts here as we see fit, if we need to
123 # keep a 1.0 command available, we should additionally put it on
124 # the scripts_1_0_compat list
128 ilasm$(SCRIPT_SUFFIX) \
129 gacutil$(SCRIPT_SUFFIX) \
130 mkbundle$(SCRIPT_SUFFIX) \
131 monop$(SCRIPT_SUFFIX) \
132 resgen$(SCRIPT_SUFFIX) \
135 scripts_2_1 = smcs$(SCRIPT_SUFFIX)
136 scripts_service = mono-service mono-service2
137 scripts_nunit = nunit-console$(SCRIPT_SUFFIX) nunit-console2$(SCRIPT_SUFFIX)
138 scripts_rpmhelpers = mono-find-provides mono-find-requires
140 CLEANFILES = $(scripts_1_0) $(scripts_1_0_umask) $(scripts_2_0) $(scripts_2_1) $(scripts_defaults) $(scripts_1_0_compat) mono-service mono-service2 nunit-console nunit-console2 mono-find-provides mono-find-requires mod $(MDOC_SUBCOMMANDS)
141 DISTCLEANFILES = $(pkgconfig_DATA) $(scripts_rpmhelpers)
147 script_umask.bat.in \
152 mono-find-provides.in \
153 mono-find-requires.in \
166 plat_bindir = $(bindir)
167 mono_instdir = $(prefix)/lib/mono
169 plat_bindir = $(shell cygpath -m $(libdir))
170 mono_instdir = $(shell cygpath -m $(libdir))/mono
173 plat_bindir = $(bindir)
174 mono_instdir = $(prefix)/lib/mono
178 REWRITE_COMMON = sed \
179 -e 's,@''bindir@,$(bindir),g' \
180 -e 's,@''plat_bindir@,$(plat_bindir),g' \
181 -e 's,@''mono_instdir@,$(mono_instdir),g' \
182 -e 's,@''gtkdir@,$(gtkdir),g'
184 REWRITE = $(REWRITE_COMMON) -e 's,@''mono_interp@,$(mono_interp),g'
185 REWRITE_DEBUG = $(REWRITE_COMMON) -e 's,@''mono_interp@,$(mono_interp) --debug,g'
187 REWRITE1 = $(REWRITE) -e 's,@''framework_version@,1.0,g'
188 REWRITE2 = $(REWRITE) -e 's,@''framework_version@,2.0,g'
189 REWRITE2_1 = $(REWRITE) -e 's,@''framework_version@,2.1,g'
190 REWRITE1_DEBUG = $(REWRITE_DEBUG) -e 's,@''framework_version@,1.0,g'
191 REWRITE2_DEBUG = $(REWRITE_DEBUG) -e 's,@''framework_version@,2.0,g'
194 mono-service: mono-service.in Makefile
195 $(REWRITE1) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > $@.tmp
198 mono-service2: mono-service.in Makefile
199 $(REWRITE2) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > $@.tmp
202 nunit-console$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
203 $(REWRITE1_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
206 nunit-console2$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
207 $(REWRITE2_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
210 smcs$(SCRIPT_SUFFIX): $(SMCS_IN) Makefile
211 $(REWRITE2_1) -e "s,@""exe_name@,smcs,g" $(srcdir)/$(SMCS_IN) | $(FILTER) > $@.tmp
214 mod$(SCRIPT_SUFFIX): mod.in Makefile
215 $(REWRITE1) -e "s,@""exe_name@,mod,g" $(srcdir)/mod.in > $@.tmp
218 $(scripts_1_0): $(SCRIPT_IN) Makefile
219 $(REWRITE1) -e 's,@''exe_name@,$@,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
222 $(scripts_1_0_umask): script_umask.in Makefile
223 $(REWRITE1) -e 's,@''exe_name@,$@,g' $(srcdir)/script_umask.in > $@.tmp
226 $(scripts_1_0_compat): $(SCRIPT_IN) Makefile
227 t=`basename $@ $(COMPAT_1_0_SUFFIX)`; $(REWRITE1) -e "s,@exe_name@,$$t,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
230 $(scripts_defaults): $(SCRIPT_IN) Makefile
231 $(REWRITE2) -e "s,@exe_name@,$@,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
234 $(scripts_2_0): $(SCRIPT_IN) Makefile
235 n=`echo $@ | sed 's,$(COMPAT_2_0_SUFFIX)$$,,'`; \
236 $(REWRITE2) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
239 $(MDOC_SUBCOMMANDS): Makefile
240 for script in $(MDOC_SUBCOMMANDS) ; do \
241 cmd=`echo $$script | sed 's/mdoc-//'` ; \
242 echo "#!/bin/sh" > $$script ; \
243 echo "exec mdoc $$cmd \"\$$@\"" >> $$script; \