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 message(FATAL_ERROR FIXME)
15 set(SCRIPT_IN script.bat.in)
16 set(FILTER sed -e 's,\.bat\.exe,\.exe,g' -e 's,/,\\,g')
17 set(SCRIPT_SUFFIX .bat)
19 set(SCRIPT_IN script.in)
24 set(COMPAT_1_0_SUFFIX 1${SCRIPT_SUFFIX})
25 set(COMPAT_2_0_SUFFIX 2${SCRIPT_SUFFIX})
27 set(scripts_1_0_compat
29 genxs1${SCRIPT_SUFFIX}
30 ilasm1${SCRIPT_SUFFIX}
32 mkbundle1${SCRIPT_SUFFIX}
33 gacutil1${SCRIPT_SUFFIX}
34 monop1${SCRIPT_SUFFIX}
35 resgen1${SCRIPT_SUFFIX}
36 wsdl1${SCRIPT_SUFFIX})
39 caspol${SCRIPT_SUFFIX}
40 cert2spc${SCRIPT_SUFFIX}
41 certmgr${SCRIPT_SUFFIX}
42 chktrust${SCRIPT_SUFFIX}
45 dtd2xsd${SCRIPT_SUFFIX}
46 dtd2rng${SCRIPT_SUFFIX}
47 installvst${SCRIPT_SUFFIX}
49 macpack${SCRIPT_SUFFIX}
52 monolinker${SCRIPT_SUFFIX}
53 mono-cil-strip${SCRIPT_SUFFIX}
54 mozroots${SCRIPT_SUFFIX}
55 permview${SCRIPT_SUFFIX}
56 prj2make${SCRIPT_SUFFIX}
57 secutil${SCRIPT_SUFFIX}
58 setreg${SCRIPT_SUFFIX}
59 signcode${SCRIPT_SUFFIX}
60 soapsuds${SCRIPT_SUFFIX}
64 makecert${SCRIPT_SUFFIX}
69 csharp${SCRIPT_SUFFIX}
70 gacutil2${SCRIPT_SUFFIX}
72 httpcfg${SCRIPT_SUFFIX}
73 ilasm2${SCRIPT_SUFFIX}
74 mconfig${SCRIPT_SUFFIX}
75 mkbundle2${SCRIPT_SUFFIX}
77 mono-api-info${SCRIPT_SUFFIX}
78 mono-shlib-cop${SCRIPT_SUFFIX}
79 monop2${SCRIPT_SUFFIX}
80 resgen2${SCRIPT_SUFFIX}
81 pdb2mdb${SCRIPT_SUFFIX}
84 mono-xmltool${SCRIPT_SUFFIX}
86 sqlmetal${SCRIPT_SUFFIX}
87 sqlsharp${SCRIPT_SUFFIX}
88 svcutil${SCRIPT_SUFFIX}
89 xbuild${SCRIPT_SUFFIX})
108 ${scripts_1_0_compat}
113 ${scripts_rpmhelpers}
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}
133 wsdl${SCRIPT_SUFFIX})
135 ###scripts_service = mono-service mono-service2
136 ###scripts_nunit = nunit-console${SCRIPT_SUFFIX} nunit-console2${SCRIPT_SUFFIX}
137 ###scripts_rpmhelpers = mono-find-provides mono-find-requires
139 ###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}
140 ###DISTCLEANFILES = ${pkgconfig_DATA} ${scripts_rpmhelpers}
145 ### script_umask.in \
146 ### script_umask.bat.in \
148 ### mono-service.in \
149 ### mono-find-provides.in \
150 ### mono-find-requires.in \
151 ### mono-test-install \
156 set(mono_interp mono)
158 set(mono_interp mint)
163 set(plat_bindir ${bindir})
164 set(mono_instdir ${prefix}/lib/mono)
166 set(plat_bindir ${shell cygpath -m ${libdir}})
167 set(mono_instdir ${shell cygpath -m ${libdir}}/mono)
170 set(plat_bindir ${bindir})
171 set(mono_instdir ${prefix}/lib/mono)
174 function(rewrite input output exe version)
175 file(READ ${input} s)
176 string(REPLACE "\@bindir\@" "${bindir_full}" s ${s})
177 string(REPLACE "\@mono_instdir\@" "${mono_instdir}" s ${s})
178 string(REPLACE "\@mono_interp\@" "${mono_interp}" s ${s})
179 string(REPLACE "\@framework_version\@" "${version}" s ${s})
180 string(REPLACE "\@exe_name\@" "${exe}" s ${s})
181 file(WRITE ${output} ${s})
184 function(rewrite_debug input output exe version)
185 file(READ ${input} s)
186 string(REPLACE "\@bindir\@" "${bindir_full}" s ${s})
187 string(REPLACE "\@mono_instdir\@" "${mono_instdir}" s ${s})
188 string(REPLACE "\@mono_interp\@" "${mono_interp} --debug" s ${s})
189 string(REPLACE "\@framework_version\@" "${version}" s ${s})
190 string(REPLACE "\@exe_name\@" "${exe}" s ${s})
191 file(WRITE ${output} ${s})
194 set(srcdir ${top_srcdir}/scripts)
196 # FIXME: Make these into targets
197 rewrite(mono-service.in mono-service mono-service 1.0)
198 rewrite(mono-service.in mono-service2 mono-service2 2.0)
199 rewrite_debug(${SCRIPT_IN} nunit-console${SCRIPT_SUFFIX} nunit-console 1.0)
200 rewrite_debug(${SCRIPT_IN} nunit-console2${SCRIPT_SUFFIX} nunit-console 2.0)
201 rewrite(mod.in mod${SCRIPT_SUFFIX} mod 1.0)
203 foreach(script ${scripts_1_0})
204 rewrite(${srcdir}/script.in ${script} ${script} 1.0)
207 foreach(script ${scripts_1_0_umask})
208 rewrite(${srcdir}/script_umask.in ${script} ${script} 1.0)
211 foreach(script ${scripts_1_0_compat})
212 string(REPLACE ${COMPAT_1_0_SUFFIX} "" exe ${script})
213 rewrite(${srcdir}/script_umask.in ${script} ${exe} 1.0)
216 foreach(script ${scripts_defaults})
217 rewrite(${srcdir}/script.in ${script} ${script} 2.0)
220 foreach(script ${scripts_2_0})
221 string(REPLACE ${COMPAT_2_0_SUFFIX} "" exe ${script})
222 rewrite(${srcdir}/script.in ${script} ${exe} 2.0)
225 foreach(script ${MDOC_SUBCOMMANDS})
226 string(REPLACE "mdoc-" "" cmd ${script})
227 file(WRITE ${script} "#!/bin/sh\nexec mdoc ${cmd} \"$@\"\n")
230 install(PROGRAMS ${bin_SCRIPTS} DESTINATION bin)