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)
49 makecert$(SCRIPT_SUFFIX) \
58 gacutil2$(SCRIPT_SUFFIX) \
59 monop2$(SCRIPT_SUFFIX) \
60 resgen2$(SCRIPT_SUFFIX) \
64 disco$(SCRIPT_SUFFIX) \
65 dtd2xsd$(SCRIPT_SUFFIX) \
66 dtd2rng$(SCRIPT_SUFFIX) \
67 installvst$(SCRIPT_SUFFIX) \
68 genxs$(SCRIPT_SUFFIX) \
69 macpack$(SCRIPT_SUFFIX) \
70 mdoc$(SCRIPT_SUFFIX) \
71 mono-cil-strip$(SCRIPT_SUFFIX) \
72 prj2make$(SCRIPT_SUFFIX) \
73 soapsuds$(SCRIPT_SUFFIX) \
74 caspol$(SCRIPT_SUFFIX) \
75 cert2spc$(SCRIPT_SUFFIX) \
76 certmgr$(SCRIPT_SUFFIX) \
77 chktrust$(SCRIPT_SUFFIX) \
78 crlupdate$(SCRIPT_SUFFIX) \
79 csharp$(SCRIPT_SUFFIX) \
80 httpcfg$(SCRIPT_SUFFIX) \
82 mconfig$(SCRIPT_SUFFIX) \
84 monolinker$(SCRIPT_SUFFIX) \
85 mono-api-info$(SCRIPT_SUFFIX) \
86 mono-shlib-cop$(SCRIPT_SUFFIX) \
87 mozroots$(SCRIPT_SUFFIX) \
88 permview$(SCRIPT_SUFFIX) \
89 pdb2mdb$(SCRIPT_SUFFIX) \
91 mono-xmltool$(SCRIPT_SUFFIX) \
92 setreg$(SCRIPT_SUFFIX) \
93 secutil$(SCRIPT_SUFFIX) \
94 signcode$(SCRIPT_SUFFIX) \
95 sgen$(SCRIPT_SUFFIX) \
96 sqlmetal$(SCRIPT_SUFFIX) \
97 sqlsharp$(SCRIPT_SUFFIX) \
98 svcutil$(SCRIPT_SUFFIX) \
99 xbuild$(SCRIPT_SUFFIX) \
100 ccrewrite$(SCRIPT_SUFFIX) \
101 cccheck$(SCRIPT_SUFFIX) \
102 mdbrebase$(SCRIPT_SUFFIX)
119 # these are the new defaults, 2.0 profile-based commands
121 # we can move scripts_1_0 scripts here as we see fit, if we need to
122 # keep a 1.0 command available, we should additionally put it on
123 # the scripts_1_0_compat list
127 ilasm$(SCRIPT_SUFFIX) \
128 gacutil$(SCRIPT_SUFFIX) \
129 mkbundle$(SCRIPT_SUFFIX) \
130 monop$(SCRIPT_SUFFIX) \
131 resgen$(SCRIPT_SUFFIX) \
134 scripts_service = mono-service mono-service2
135 scripts_nunit = nunit-console$(SCRIPT_SUFFIX) nunit-console2$(SCRIPT_SUFFIX) nunit-console4$(SCRIPT_SUFFIX)
136 scripts_rpmhelpers = mono-find-provides mono-find-requires
137 scripts_mono_configuration_crypto = mono-configuration-crypto$(SCRIPT_SUFFIX)
139 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)
140 DISTCLEANFILES = $(pkgconfig_DATA) $(scripts_rpmhelpers)
146 script_umask.bat.in \
149 mono-find-provides.in \
150 mono-find-requires.in \
160 mono-configuration-crypto.in
170 plat_bindir = $(bindir)
171 mono_instdir = $(prefix)/lib/mono
173 plat_bindir = $(shell cygpath -m $(libdir))
174 mono_instdir = $(shell cygpath -m $(libdir))/mono
177 plat_bindir = $(bindir)
178 mono_instdir = $(prefix)/lib/mono
182 REWRITE_COMMON = sed \
183 -e 's,@''bindir@,$(bindir),g' \
184 -e 's,@''plat_bindir@,$(plat_bindir),g' \
185 -e 's,@''mono_instdir@,$(mono_instdir),g' \
186 -e 's,@''gtkdir@,$(gtkdir),g'
188 REWRITE = $(REWRITE_COMMON) -e 's,@''mono_interp@,$(mono_interp),g'
189 REWRITE_DEBUG = $(REWRITE_COMMON) -e 's,@''mono_interp@,$(mono_interp) --debug,g'
190 REWRITE2_DEBUG = $(REWRITE_DEBUG) -e 's,@''framework_version@,2.0,g'
192 REWRITE2 = $(REWRITE) -e 's,@''framework_version@,2.0,g'
193 REWRITE2_1 = $(REWRITE) -e 's,@''framework_version@,2.1,g'
195 REWRITE4 = $(REWRITE) -e 's,@''framework_version@,4.5,g'
196 REWRITE4_DEBUG = $(REWRITE_DEBUG) -e 's,@''framework_version@,4.5,g'
199 REWRITE4 = $(REWRITE) -e 's,@''framework_version@,4.0,g'
200 REWRITE4_DEBUG = $(REWRITE_DEBUG) -e 's,@''framework_version@,4.0,g'
202 REWRITE4 = $(REWRITE) -e 's,@''framework_version@,2.0,g'
203 REWRITE4_DEBUG = $(REWRITE_DEBUG) -e 's,@''framework_version@,2.0,g'
207 peverify: peverify.in Makefile
208 $(REWRITE_COMMON) $(srcdir)/peverify.in > $@.tmp
212 $(REWRITE_COMMON) $(srcdir)/mcs.in > $@.tmp
215 gmcs: gmcs.in Makefile
216 $(REWRITE_COMMON) $(srcdir)/gmcs.in > $@.tmp
219 dmcs: dmcs.in Makefile
220 $(REWRITE_COMMON) $(srcdir)/dmcs.in > $@.tmp
223 mono-service: mono-service.in Makefile
224 $(REWRITE4) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > $@.tmp
227 mono-service2: mono-service.in Makefile
228 $(REWRITE2) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > $@.tmp
231 nunit-console$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
232 $(REWRITE2_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
235 nunit-console2$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
236 $(REWRITE2_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
239 nunit-console4$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
240 $(REWRITE4_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
243 #FIXME: this is not the correct rule for mod.bat.
244 mod$(SCRIPT_SUFFIX): mod.in Makefile
245 $(REWRITE2) -e "s,@""exe_name@,mod,g" $(srcdir)/mod.in > $@.tmp
248 #FIXME: this is not the correct rule for bat files.
249 $(scripts_4_0_umask): script_umask.in Makefile
250 n=`echo $@ | sed 's,$(COMPAT_4_0_SUFFIX)$$,,'`; \
251 $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/script_umask.in | $(FILTER) > $@.tmp
254 $(scripts_defaults): $(SCRIPT_IN) Makefile
255 n=`echo $@ | sed 's,$(COMPAT_4_0_SUFFIX)$$,,'`; \
256 $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
259 $(scripts_2_0): $(SCRIPT_IN) Makefile
260 n=`echo $@ | sed 's,$(COMPAT_2_0_SUFFIX)$$,,'`; \
261 $(REWRITE2) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
264 $(scripts_4_0): $(SCRIPT_IN) Makefile
265 n=`echo $@ | sed 's,$(COMPAT_4_0_SUFFIX)$$,,'`; \
266 $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
269 $(scripts_mono_configuration_crypto): mono-configuration-crypto.in
270 $(REWRITE4) -e "s,@exe_name@,mono-configuration-crypto,g" $(srcdir)/mono-configuration-crypto.in > $@.tmp
273 $(MDOC_SUBCOMMANDS): Makefile
274 for script in $(MDOC_SUBCOMMANDS) ; do \
275 cmd=`echo $$script | sed 's/mdoc-//'` ; \
276 echo "#!/bin/sh" > $$script ; \
277 echo "exec mdoc $$cmd \"\$$@\"" >> $$script; \