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) \
42 mono-package-runtime \
44 $(scripts_mono_configuration_crypto)
47 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 soapsuds$(SCRIPT_SUFFIX) \
77 caspol$(SCRIPT_SUFFIX) \
78 cert-sync$(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) \
85 illinkanalyzer$(SCRIPT_SUFFIX) \
87 mconfig$(SCRIPT_SUFFIX) \
89 monolinker$(SCRIPT_SUFFIX) \
90 mono-api-info$(SCRIPT_SUFFIX) \
91 mono-api-html$(SCRIPT_SUFFIX) \
92 mono-shlib-cop$(SCRIPT_SUFFIX) \
93 mozroots$(SCRIPT_SUFFIX) \
94 permview$(SCRIPT_SUFFIX) \
95 pdb2mdb$(SCRIPT_SUFFIX) \
97 mono-xmltool$(SCRIPT_SUFFIX) \
98 setreg$(SCRIPT_SUFFIX) \
99 secutil$(SCRIPT_SUFFIX) \
100 signcode$(SCRIPT_SUFFIX) \
101 sgen$(SCRIPT_SUFFIX) \
102 sqlmetal$(SCRIPT_SUFFIX) \
103 sqlsharp$(SCRIPT_SUFFIX) \
104 svcutil$(SCRIPT_SUFFIX) \
105 ccrewrite$(SCRIPT_SUFFIX) \
106 cccheck$(SCRIPT_SUFFIX) \
107 mdbrebase$(SCRIPT_SUFFIX) \
108 ikdasm$(SCRIPT_SUFFIX) \
109 mono-symbolicate$(SCRIPT_SUFFIX)
126 # these are the new defaults, 2.0 profile-based commands
128 # we can move scripts_1_0 scripts here as we see fit, if we need to
129 # keep a 1.0 command available, we should additionally put it on
130 # the scripts_1_0_compat list
134 ilasm$(SCRIPT_SUFFIX) \
135 gacutil$(SCRIPT_SUFFIX) \
136 mkbundle$(SCRIPT_SUFFIX) \
137 monop$(SCRIPT_SUFFIX) \
138 resgen$(SCRIPT_SUFFIX) \
141 scripts_service = mono-service mono-service2
142 scripts_nunit = nunit-console$(SCRIPT_SUFFIX) nunit-console2$(SCRIPT_SUFFIX) nunit-console4$(SCRIPT_SUFFIX)
143 scripts_rpmhelpers = mono-find-provides mono-find-requires
144 scripts_mono_configuration_crypto = mono-configuration-crypto$(SCRIPT_SUFFIX)
146 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)
147 DISTCLEANFILES = $(pkgconfig_DATA) $(scripts_rpmhelpers)
153 script_umask.bat.in \
156 mono-find-provides.in \
157 mono-find-requires.in \
160 update_submodules.sh \
166 mono-package-runtime \
170 mono-configuration-crypto.in \
171 submodules/versions.mk \
172 submodules/versions.py
178 plat_bindir = $(bindir)
179 mono_instdir = $(prefix)/lib/mono
181 plat_bindir = $(shell cygpath -m $(libdir))
182 mono_instdir = $(shell cygpath -m $(libdir))/mono
185 plat_bindir = $(bindir)
186 mono_instdir = $(prefix)/lib/mono
190 REWRITE_COMMON = sed \
191 -e 's,@''bindir@,$(bindir),g' \
192 -e 's,@''plat_bindir@,$(plat_bindir),g' \
193 -e 's,@''mono_instdir@,$(mono_instdir),g' \
194 -e 's,@''gtkdir@,$(gtkdir),g'
196 REWRITE = $(REWRITE_COMMON) -e 's,@''mono_interp@,$(mono_interp),g'
197 REWRITE_DEBUG = $(REWRITE_COMMON) -e 's,@''mono_interp@,$(mono_interp) --debug,g'
199 REWRITE4 = $(REWRITE) -e 's,@''framework_version@,4.5,g'
200 REWRITE4_DEBUG = $(REWRITE_DEBUG) -e 's,@''framework_version@,4.5,g'
202 peverify: peverify.in Makefile
203 $(REWRITE_COMMON) $(srcdir)/peverify.in > $@.tmp
207 $(REWRITE_COMMON) $(srcdir)/mcs.in > $@.tmp
211 $(REWRITE_COMMON) $(srcdir)/csc.in > $@.tmp
215 $(REWRITE_COMMON) $(srcdir)/vbc.in > $@.tmp
218 dmcs: dmcs.in Makefile
219 $(REWRITE_COMMON) $(srcdir)/dmcs.in > $@.tmp
223 $(REWRITE_COMMON) $(srcdir)/csi.in > $@.tmp
226 mono-service: mono-service.in Makefile
227 $(REWRITE4) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > $@.tmp
230 mono-service2: mono-service.in Makefile
231 $(REWRITE4) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > $@.tmp
234 nunit-console$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
235 $(REWRITE4_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
238 nunit-console2$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
239 $(REWRITE4_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
242 nunit-console4$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
243 $(REWRITE4_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
246 xbuild: xbuild.in Makefile
247 $(REWRITE_COMMON) $(srcdir)/xbuild.in > $@.tmp
250 #FIXME: this is not the correct rule for mod.bat.
251 mod$(SCRIPT_SUFFIX): mod.in Makefile
252 $(REWRITE4) -e "s,@""exe_name@,mod,g" $(srcdir)/mod.in > $@.tmp
255 #FIXME: this is not the correct rule for bat files.
256 $(scripts_4_0_umask): script_umask.in Makefile
257 n=`echo $@ | sed 's,$(COMPAT_4_0_SUFFIX)$$,,'`; \
258 $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/script_umask.in | $(FILTER) > $@.tmp
261 $(scripts_defaults): $(SCRIPT_IN) Makefile
262 n=`echo $@ | sed 's,$(COMPAT_4_0_SUFFIX)$$,,'`; \
263 $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
266 $(scripts_2_0): $(SCRIPT_IN) Makefile
267 n=`echo $@ | sed 's,$(COMPAT_2_0_SUFFIX)$$,,'`; \
268 $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
271 $(scripts_4_0): $(SCRIPT_IN) Makefile
272 n=`echo $@ | sed 's,$(COMPAT_4_0_SUFFIX)$$,,'`; \
273 $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
276 $(scripts_mono_configuration_crypto): mono-configuration-crypto.in
277 $(REWRITE4) -e "s,@exe_name@,mono-configuration-crypto,g" $(srcdir)/mono-configuration-crypto.in > $@.tmp
280 $(MDOC_SUBCOMMANDS): Makefile
281 for script in $(MDOC_SUBCOMMANDS) ; do \
282 cmd=`echo $$script | sed 's/mdoc-//'` ; \
283 echo "#!/bin/sh" > $$script ; \
284 echo "exec mdoc $$cmd \"\$$@\"" >> $$script; \