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)
28 $(scripts_1_0_umask) \
29 $(scripts_1_0_compat) \
34 $(scripts_rpmhelpers) \
40 scripts_1_0_compat = \
42 genxs1$(SCRIPT_SUFFIX) \
43 ilasm1$(SCRIPT_SUFFIX) \
44 mcs1$(SCRIPT_SUFFIX) \
45 mkbundle1$(SCRIPT_SUFFIX) \
46 gacutil1$(SCRIPT_SUFFIX) \
47 monop1$(SCRIPT_SUFFIX) \
48 resgen1$(SCRIPT_SUFFIX) \
52 caspol$(SCRIPT_SUFFIX) \
53 cert2spc$(SCRIPT_SUFFIX) \
54 certmgr$(SCRIPT_SUFFIX) \
55 chktrust$(SCRIPT_SUFFIX) \
56 cilc$(SCRIPT_SUFFIX) \
57 disco$(SCRIPT_SUFFIX) \
58 dtd2xsd$(SCRIPT_SUFFIX) \
59 dtd2rng$(SCRIPT_SUFFIX) \
60 installvst$(SCRIPT_SUFFIX) \
61 genxs$(SCRIPT_SUFFIX) \
62 macpack$(SCRIPT_SUFFIX) \
65 monolinker$(SCRIPT_SUFFIX) \
66 mono-cil-strip$(SCRIPT_SUFFIX) \
67 mozroots$(SCRIPT_SUFFIX) \
68 permview$(SCRIPT_SUFFIX) \
69 prj2make$(SCRIPT_SUFFIX) \
70 secutil$(SCRIPT_SUFFIX) \
71 setreg$(SCRIPT_SUFFIX) \
72 signcode$(SCRIPT_SUFFIX) \
73 soapsuds$(SCRIPT_SUFFIX) \
77 makecert$(SCRIPT_SUFFIX) \
82 csharp$(SCRIPT_SUFFIX) \
83 gacutil2$(SCRIPT_SUFFIX) \
84 gmcs$(SCRIPT_SUFFIX) \
85 httpcfg$(SCRIPT_SUFFIX) \
86 ilasm2$(SCRIPT_SUFFIX) \
87 mconfig$(SCRIPT_SUFFIX) \
88 mkbundle2$(SCRIPT_SUFFIX) \
89 mdoc$(SCRIPT_SUFFIX) \
90 mono-api-info$(SCRIPT_SUFFIX) \
91 mono-shlib-cop$(SCRIPT_SUFFIX) \
92 monop2$(SCRIPT_SUFFIX) \
93 resgen2$(SCRIPT_SUFFIX) \
94 pdb2mdb$(SCRIPT_SUFFIX) \
95 wsdl2$(SCRIPT_SUFFIX) \
96 xsd2$(SCRIPT_SUFFIX) \
97 mono-xmltool$(SCRIPT_SUFFIX) \
98 sgen$(SCRIPT_SUFFIX) \
99 sqlmetal$(SCRIPT_SUFFIX) \
100 sqlsharp$(SCRIPT_SUFFIX) \
101 svcutil$(SCRIPT_SUFFIX) \
102 xbuild$(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)
136 scripts_rpmhelpers = mono-find-provides mono-find-requires
138 CLEANFILES = $(scripts_1_0) $(scripts_1_0_umask) $(scripts_2_0) $(scripts_defaults) $(scripts_1_0_compat) mono-service mono-service2 nunit-console nunit-console2 mono-find-provides mono-find-requires mod $(MDOC_SUBCOMMANDS)
139 DISTCLEANFILES = $(pkgconfig_DATA) $(scripts_rpmhelpers)
145 script_umask.bat.in \
148 mono-find-provides.in \
149 mono-find-requires.in \
162 plat_bindir = $(bindir)
163 mono_instdir = $(prefix)/lib/mono
165 plat_bindir = $(shell cygpath -m $(libdir))
166 mono_instdir = $(shell cygpath -m $(libdir))/mono
169 plat_bindir = $(bindir)
170 mono_instdir = $(prefix)/lib/mono
174 REWRITE_COMMON = sed \
175 -e 's,@''bindir@,$(bindir),g' \
176 -e 's,@''plat_bindir@,$(plat_bindir),g' \
177 -e 's,@''mono_instdir@,$(mono_instdir),g' \
178 -e 's,@''gtkdir@,$(gtkdir),g'
180 REWRITE = $(REWRITE_COMMON) -e 's,@''mono_interp@,$(mono_interp),g'
181 REWRITE_DEBUG = $(REWRITE_COMMON) -e 's,@''mono_interp@,$(mono_interp) --debug,g'
183 REWRITE1 = $(REWRITE) -e 's,@''framework_version@,1.0,g'
184 REWRITE2 = $(REWRITE) -e 's,@''framework_version@,2.0,g'
185 REWRITE2_1 = $(REWRITE) -e 's,@''framework_version@,2.1,g'
186 REWRITE1_DEBUG = $(REWRITE_DEBUG) -e 's,@''framework_version@,1.0,g'
187 REWRITE2_DEBUG = $(REWRITE_DEBUG) -e 's,@''framework_version@,2.0,g'
190 mono-service: mono-service.in Makefile
191 $(REWRITE1) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > $@.tmp
194 mono-service2: mono-service.in Makefile
195 $(REWRITE2) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > $@.tmp
198 nunit-console$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
199 $(REWRITE1_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
202 nunit-console2$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
203 $(REWRITE2_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
206 mod$(SCRIPT_SUFFIX): mod.in Makefile
207 $(REWRITE1) -e "s,@""exe_name@,mod,g" $(srcdir)/mod.in > $@.tmp
210 $(scripts_1_0): $(SCRIPT_IN) Makefile
211 $(REWRITE1) -e 's,@''exe_name@,$@,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
214 $(scripts_1_0_umask): script_umask.in Makefile
215 $(REWRITE1) -e 's,@''exe_name@,$@,g' $(srcdir)/script_umask.in > $@.tmp
218 $(scripts_1_0_compat): $(SCRIPT_IN) Makefile
219 t=`basename $@ $(COMPAT_1_0_SUFFIX)`; $(REWRITE1) -e "s,@exe_name@,$$t,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
222 $(scripts_defaults): $(SCRIPT_IN) Makefile
223 $(REWRITE2) -e "s,@exe_name@,$@,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
226 $(scripts_2_0): $(SCRIPT_IN) Makefile
227 n=`echo $@ | sed 's,$(COMPAT_2_0_SUFFIX)$$,,'`; \
228 $(REWRITE2) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
231 $(MDOC_SUBCOMMANDS): Makefile
232 for script in $(MDOC_SUBCOMMANDS) ; do \
233 cmd=`echo $$script | sed 's/mdoc-//'` ; \
234 echo "#!/bin/sh" > $$script ; \
235 echo "exec mdoc $$cmd \"\$$@\"" >> $$script; \