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
15 FILTER=sed -e 's,\.bat\.exe,\.exe,g' -e 's,/,\\,g'
23 COMPAT_1_0_SUFFIX=1$(SCRIPT_SUFFIX)
24 COMPAT_2_0_SUFFIX=2$(SCRIPT_SUFFIX)
25 COMPAT_4_0_SUFFIX=4$(SCRIPT_SUFFIX)
28 $(scripts_4_0_umask) \
33 $(scripts_rpmhelpers) \
41 $(scripts_mono_configuration_crypto)
44 bin_SCRIPTS += $(scripts_4_0)
53 makecert$(SCRIPT_SUFFIX) \
62 gacutil2$(SCRIPT_SUFFIX) \
63 monop2$(SCRIPT_SUFFIX) \
64 resgen2$(SCRIPT_SUFFIX) \
68 disco$(SCRIPT_SUFFIX) \
69 dtd2xsd$(SCRIPT_SUFFIX) \
70 dtd2rng$(SCRIPT_SUFFIX) \
71 installvst$(SCRIPT_SUFFIX) \
72 genxs$(SCRIPT_SUFFIX) \
73 macpack$(SCRIPT_SUFFIX) \
74 mdoc$(SCRIPT_SUFFIX) \
75 mono-cil-strip$(SCRIPT_SUFFIX) \
76 prj2make$(SCRIPT_SUFFIX) \
77 soapsuds$(SCRIPT_SUFFIX) \
78 caspol$(SCRIPT_SUFFIX) \
79 cert2spc$(SCRIPT_SUFFIX) \
80 certmgr$(SCRIPT_SUFFIX) \
81 chktrust$(SCRIPT_SUFFIX) \
82 crlupdate$(SCRIPT_SUFFIX) \
83 csharp$(SCRIPT_SUFFIX) \
84 httpcfg$(SCRIPT_SUFFIX) \
86 mconfig$(SCRIPT_SUFFIX) \
88 monolinker$(SCRIPT_SUFFIX) \
89 mono-api-info$(SCRIPT_SUFFIX) \
90 mono-shlib-cop$(SCRIPT_SUFFIX) \
91 mozroots$(SCRIPT_SUFFIX) \
92 permview$(SCRIPT_SUFFIX) \
93 pdb2mdb$(SCRIPT_SUFFIX) \
95 mono-xmltool$(SCRIPT_SUFFIX) \
96 setreg$(SCRIPT_SUFFIX) \
97 secutil$(SCRIPT_SUFFIX) \
98 signcode$(SCRIPT_SUFFIX) \
99 sgen$(SCRIPT_SUFFIX) \
100 sqlmetal$(SCRIPT_SUFFIX) \
101 sqlsharp$(SCRIPT_SUFFIX) \
102 svcutil$(SCRIPT_SUFFIX) \
103 ccrewrite$(SCRIPT_SUFFIX) \
104 cccheck$(SCRIPT_SUFFIX) \
105 mdbrebase$(SCRIPT_SUFFIX) \
106 ikdasm$(SCRIPT_SUFFIX)
123 # these are the new defaults, 2.0 profile-based commands
125 # we can move scripts_1_0 scripts here as we see fit, if we need to
126 # keep a 1.0 command available, we should additionally put it on
127 # the scripts_1_0_compat list
131 ilasm$(SCRIPT_SUFFIX) \
132 gacutil$(SCRIPT_SUFFIX) \
133 mkbundle$(SCRIPT_SUFFIX) \
134 monop$(SCRIPT_SUFFIX) \
135 resgen$(SCRIPT_SUFFIX) \
138 scripts_service = mono-service mono-service2
139 scripts_nunit = nunit-console$(SCRIPT_SUFFIX) nunit-console2$(SCRIPT_SUFFIX) nunit-console4$(SCRIPT_SUFFIX)
140 scripts_rpmhelpers = mono-find-provides mono-find-requires
141 scripts_mono_configuration_crypto = mono-configuration-crypto$(SCRIPT_SUFFIX)
143 CLEANFILES = $(scripts_mono_configuration_crypto) $(scripts_4_0_umask) $(scripts_2_0) $(scripts_defaults) $(scripts_4_0) mono-service mono-service2 nunit-console nunit-console2 nunit-console4 mono-find-provides mono-find-requires mod $(MDOC_SUBCOMMANDS)
144 DISTCLEANFILES = $(pkgconfig_DATA) $(scripts_rpmhelpers)
150 script_umask.bat.in \
153 mono-find-provides.in \
154 mono-find-requires.in \
165 mono-configuration-crypto.in
175 plat_bindir = $(bindir)
176 mono_instdir = $(prefix)/lib/mono
178 plat_bindir = $(shell cygpath -m $(libdir))
179 mono_instdir = $(shell cygpath -m $(libdir))/mono
182 plat_bindir = $(bindir)
183 mono_instdir = $(prefix)/lib/mono
187 REWRITE_COMMON = sed \
188 -e 's,@''bindir@,$(bindir),g' \
189 -e 's,@''plat_bindir@,$(plat_bindir),g' \
190 -e 's,@''mono_instdir@,$(mono_instdir),g' \
191 -e 's,@''gtkdir@,$(gtkdir),g'
193 REWRITE = $(REWRITE_COMMON) -e 's,@''mono_interp@,$(mono_interp),g'
194 REWRITE_DEBUG = $(REWRITE_COMMON) -e 's,@''mono_interp@,$(mono_interp) --debug,g'
195 REWRITE2_DEBUG = $(REWRITE_DEBUG) -e 's,@''framework_version@,2.0,g'
197 REWRITE2 = $(REWRITE) -e 's,@''framework_version@,2.0,g'
198 REWRITE2_1 = $(REWRITE) -e 's,@''framework_version@,2.1,g'
200 REWRITE4 = $(REWRITE) -e 's,@''framework_version@,4.5,g'
201 REWRITE4_DEBUG = $(REWRITE_DEBUG) -e 's,@''framework_version@,4.5,g'
204 REWRITE4 = $(REWRITE) -e 's,@''framework_version@,4.0,g'
205 REWRITE4_DEBUG = $(REWRITE_DEBUG) -e 's,@''framework_version@,4.0,g'
207 REWRITE4 = $(REWRITE) -e 's,@''framework_version@,2.0,g'
208 REWRITE4_DEBUG = $(REWRITE_DEBUG) -e 's,@''framework_version@,2.0,g'
212 peverify: peverify.in Makefile
213 $(REWRITE_COMMON) $(srcdir)/peverify.in > $@.tmp
217 $(REWRITE_COMMON) $(srcdir)/mcs.in > $@.tmp
220 gmcs: gmcs.in Makefile
221 $(REWRITE_COMMON) $(srcdir)/gmcs.in > $@.tmp
224 dmcs: dmcs.in Makefile
225 $(REWRITE_COMMON) $(srcdir)/dmcs.in > $@.tmp
228 mono-service: mono-service.in Makefile
229 $(REWRITE4) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > $@.tmp
232 mono-service2: mono-service.in Makefile
233 $(REWRITE2) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > $@.tmp
236 nunit-console$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
237 $(REWRITE2_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
240 nunit-console2$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
241 $(REWRITE2_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
244 nunit-console4$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
245 $(REWRITE4_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
248 xbuild: xbuild.in Makefile
249 $(REWRITE_COMMON) $(srcdir)/xbuild.in > $@.tmp
252 #FIXME: this is not the correct rule for mod.bat.
253 mod$(SCRIPT_SUFFIX): mod.in Makefile
254 $(REWRITE2) -e "s,@""exe_name@,mod,g" $(srcdir)/mod.in > $@.tmp
257 #FIXME: this is not the correct rule for bat files.
258 $(scripts_4_0_umask): script_umask.in Makefile
259 n=`echo $@ | sed 's,$(COMPAT_4_0_SUFFIX)$$,,'`; \
260 $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/script_umask.in | $(FILTER) > $@.tmp
263 $(scripts_defaults): $(SCRIPT_IN) Makefile
264 n=`echo $@ | sed 's,$(COMPAT_4_0_SUFFIX)$$,,'`; \
265 $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
268 $(scripts_2_0): $(SCRIPT_IN) Makefile
269 n=`echo $@ | sed 's,$(COMPAT_2_0_SUFFIX)$$,,'`; \
270 $(REWRITE2) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
273 $(scripts_4_0): $(SCRIPT_IN) Makefile
274 n=`echo $@ | sed 's,$(COMPAT_4_0_SUFFIX)$$,,'`; \
275 $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
278 $(scripts_mono_configuration_crypto): mono-configuration-crypto.in
279 $(REWRITE4) -e "s,@exe_name@,mono-configuration-crypto,g" $(srcdir)/mono-configuration-crypto.in > $@.tmp
282 $(MDOC_SUBCOMMANDS): Makefile
283 for script in $(MDOC_SUBCOMMANDS) ; do \
284 cmd=`echo $$script | sed 's/mdoc-//'` ; \
285 echo "#!/bin/sh" > $$script ; \
286 echo "exec mdoc $$cmd \"\$$@\"" >> $$script; \