Makefile.am 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. #
  2. # Scripts that we install
  3. #
  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.
  9. #
  10. # To preserve compatibility with old Makefiles and tools we keep the
  11. # command names that had the suffix 2 (like wsdl2)
  12. #
  13. if USE_BATCH_FILES
  14. SCRIPT_IN=script.bat.in
  15. FILTER=sed -e 's,\.bat\.exe,\.exe,g' -e 's,/,\\,g'
  16. SCRIPT_SUFFIX=.bat
  17. else
  18. SCRIPT_IN=script.in
  19. FILTER=cat
  20. SCRIPT_SUFFIX=
  21. endif
  22. COMPAT_1_0_SUFFIX=1$(SCRIPT_SUFFIX)
  23. COMPAT_2_0_SUFFIX=2$(SCRIPT_SUFFIX)
  24. COMPAT_4_0_SUFFIX=4$(SCRIPT_SUFFIX)
  25. bin_SCRIPTS = \
  26. $(scripts_4_0_umask) \
  27. $(scripts_defaults) \
  28. $(scripts_2_0) \
  29. $(scripts_service) \
  30. $(scripts_nunit) \
  31. $(scripts_rpmhelpers) \
  32. $(scripts_mcs) \
  33. $(MDOC_SUBCOMMANDS) \
  34. $(MDOC_COMPAT) \
  35. mono-test-install \
  36. peverify \
  37. mono-heapviz \
  38. $(scripts_mono_configuration_crypto)
  39. if INSTALL_4_0
  40. bin_SCRIPTS += $(scripts_4_0)
  41. endif
  42. scripts_4_0_umask = \
  43. makecert$(SCRIPT_SUFFIX) \
  44. sn$(SCRIPT_SUFFIX)
  45. deprecated = \
  46. cilc(SCRIPT_SUFFIX) \
  47. mjs(SCRIPT_SUFFIX)
  48. scripts_2_0 = \
  49. al2$(SCRIPT_SUFFIX) \
  50. csharp2$(SCRIPT_SUFFIX) \
  51. gacutil2$(SCRIPT_SUFFIX) \
  52. gmcs$(SCRIPT_SUFFIX) \
  53. mdoc$(SCRIPT_SUFFIX) \
  54. monop2$(SCRIPT_SUFFIX) \
  55. resgen2$(SCRIPT_SUFFIX) \
  56. wsdl2$(SCRIPT_SUFFIX)
  57. scripts_4_0 = \
  58. dmcs$(SCRIPT_SUFFIX) \
  59. disco$(SCRIPT_SUFFIX) \
  60. dtd2xsd$(SCRIPT_SUFFIX) \
  61. dtd2rng$(SCRIPT_SUFFIX) \
  62. installvst$(SCRIPT_SUFFIX) \
  63. genxs$(SCRIPT_SUFFIX) \
  64. macpack$(SCRIPT_SUFFIX) \
  65. mono-cil-strip$(SCRIPT_SUFFIX) \
  66. prj2make$(SCRIPT_SUFFIX) \
  67. soapsuds$(SCRIPT_SUFFIX) \
  68. caspol$(SCRIPT_SUFFIX) \
  69. cert2spc$(SCRIPT_SUFFIX) \
  70. certmgr$(SCRIPT_SUFFIX) \
  71. chktrust$(SCRIPT_SUFFIX) \
  72. csharp$(SCRIPT_SUFFIX) \
  73. httpcfg$(SCRIPT_SUFFIX) \
  74. lc$(SCRIPT_SUFFIX) \
  75. mconfig$(SCRIPT_SUFFIX) \
  76. mod$(SCRIPT_SUFFIX) \
  77. monolinker$(SCRIPT_SUFFIX) \
  78. mono-api-info$(SCRIPT_SUFFIX) \
  79. mono-shlib-cop$(SCRIPT_SUFFIX) \
  80. mozroots$(SCRIPT_SUFFIX) \
  81. permview$(SCRIPT_SUFFIX) \
  82. pdb2mdb$(SCRIPT_SUFFIX) \
  83. xsd$(SCRIPT_SUFFIX) \
  84. mono-xmltool$(SCRIPT_SUFFIX) \
  85. setreg$(SCRIPT_SUFFIX) \
  86. secutil$(SCRIPT_SUFFIX) \
  87. signcode$(SCRIPT_SUFFIX) \
  88. sgen$(SCRIPT_SUFFIX) \
  89. sqlmetal$(SCRIPT_SUFFIX) \
  90. sqlsharp$(SCRIPT_SUFFIX) \
  91. svcutil$(SCRIPT_SUFFIX) \
  92. xbuild$(SCRIPT_SUFFIX) \
  93. ccrewrite$(SCRIPT_SUFFIX)
  94. MDOC_SUBCOMMANDS = \
  95. mdoc-assemble \
  96. mdoc-export-html \
  97. mdoc-export-msxdoc \
  98. mdoc-update \
  99. mdoc-validate
  100. MDOC_COMPAT = \
  101. mdassembler \
  102. mdvalidater \
  103. monodocer \
  104. monodocs2html \
  105. monodocs2slashdoc
  106. #
  107. # these are the new defaults, 2.0 profile-based commands
  108. #
  109. # we can move scripts_1_0 scripts here as we see fit, if we need to
  110. # keep a 1.0 command available, we should additionally put it on
  111. # the scripts_1_0_compat list
  112. #
  113. scripts_defaults = \
  114. al$(SCRIPT_SUFFIX) \
  115. ilasm$(SCRIPT_SUFFIX) \
  116. gacutil$(SCRIPT_SUFFIX) \
  117. mkbundle$(SCRIPT_SUFFIX) \
  118. monop$(SCRIPT_SUFFIX) \
  119. resgen$(SCRIPT_SUFFIX) \
  120. wsdl$(SCRIPT_SUFFIX)
  121. scripts_service = mono-service mono-service2
  122. scripts_nunit = nunit-console$(SCRIPT_SUFFIX) nunit-console2$(SCRIPT_SUFFIX)
  123. scripts_rpmhelpers = mono-find-provides mono-find-requires
  124. scripts_mcs = mcs$(SCRIPT_SUFFIX)
  125. scripts_mono_configuration_crypto = mono-configuration-crypto$(SCRIPT_SUFFIX)
  126. CLEANFILES = $(scripts_mono_configuration_crypto) $(scripts_mcs) $(scripts_4_0_umask) $(scripts_2_0) $(scripts_defaults) $(scripts_4_0) mono-service mono-service2 nunit-console nunit-console2 mono-find-provides mono-find-requires mod $(MDOC_SUBCOMMANDS)
  127. DISTCLEANFILES = $(pkgconfig_DATA) $(scripts_rpmhelpers)
  128. EXTRA_DIST = \
  129. script.in \
  130. script.bat.in \
  131. script_umask.in \
  132. script_umask.bat.in \
  133. mod.in \
  134. mono-service.in \
  135. mono-find-provides.in \
  136. mono-find-requires.in \
  137. peverify.in \
  138. mono-test-install \
  139. mono-heapviz \
  140. $(MDOC_COMPAT) \
  141. patch-quiet.sh \
  142. get-cygwin-deps.sh \
  143. mono-configuration-crypto.in
  144. if USE_JIT
  145. mono_interp = mono
  146. else
  147. mono_interp = mint
  148. endif
  149. if HOST_WIN32
  150. if CROSS_COMPILING
  151. plat_bindir = $(bindir)
  152. mono_instdir = $(prefix)/lib/mono
  153. else
  154. plat_bindir = $(shell cygpath -m $(libdir))
  155. mono_instdir = $(shell cygpath -m $(libdir))/mono
  156. endif
  157. else
  158. plat_bindir = $(bindir)
  159. mono_instdir = $(prefix)/lib/mono
  160. endif
  161. REWRITE_COMMON = sed \
  162. -e 's,@''bindir@,$(bindir),g' \
  163. -e 's,@''plat_bindir@,$(plat_bindir),g' \
  164. -e 's,@''mono_instdir@,$(mono_instdir),g' \
  165. -e 's,@''gtkdir@,$(gtkdir),g'
  166. REWRITE = $(REWRITE_COMMON) -e 's,@''mono_interp@,$(mono_interp),g'
  167. REWRITE_DEBUG = $(REWRITE_COMMON) -e 's,@''mono_interp@,$(mono_interp) --debug,g'
  168. REWRITE2 = $(REWRITE) -e 's,@''framework_version@,2.0,g'
  169. REWRITE2_1 = $(REWRITE) -e 's,@''framework_version@,2.1,g'
  170. if INSTALL_4_0
  171. REWRITE4 = $(REWRITE) -e 's,@''framework_version@,4.0,g'
  172. else
  173. REWRITE4 = $(REWRITE) -e 's,@''framework_version@,2.0,g'
  174. endif
  175. REWRITE2_DEBUG = $(REWRITE_DEBUG) -e 's,@''framework_version@,2.0,g'
  176. peverify: peverify.in Makefile
  177. $(REWRITE_COMMON) $(srcdir)/peverify.in > [email protected]
  178. mv -f [email protected] $@
  179. mono-service: mono-service.in Makefile
  180. $(REWRITE4) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > [email protected]
  181. mv -f [email protected] $@
  182. mono-service2: mono-service.in Makefile
  183. $(REWRITE2) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > [email protected]
  184. mv -f [email protected] $@
  185. nunit-console$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
  186. $(REWRITE2_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > [email protected]
  187. mv -f [email protected] $@
  188. nunit-console2$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
  189. $(REWRITE2_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > [email protected]
  190. mv -f [email protected] $@
  191. #FIXME: this is not the correct rule for mod.bat.
  192. mod$(SCRIPT_SUFFIX): mod.in Makefile
  193. $(REWRITE2) -e "s,@""exe_name@,mod,g" $(srcdir)/mod.in > [email protected]
  194. mv -f [email protected] $@
  195. #FIXME: this is not the correct rule for bat files.
  196. $(scripts_4_0_umask): script_umask.in Makefile
  197. n=`echo $@ | sed 's,$(COMPAT_4_0_SUFFIX)$$,,'`; \
  198. $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/script_umask.in | $(FILTER) > [email protected]
  199. mv -f [email protected] $@
  200. mcs$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
  201. $(REWRITE2) -e "s,@exe_name@,gmcs,g" $(srcdir)/$(SCRIPT_IN) > [email protected]
  202. mv -f [email protected] $@
  203. $(scripts_defaults): $(SCRIPT_IN) Makefile
  204. n=`echo $@ | sed 's,$(COMPAT_4_0_SUFFIX)$$,,'`; \
  205. $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > [email protected]
  206. mv -f [email protected] $@
  207. $(scripts_2_0): $(SCRIPT_IN) Makefile
  208. n=`echo $@ | sed 's,$(COMPAT_2_0_SUFFIX)$$,,'`; \
  209. $(REWRITE2) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > [email protected]
  210. mv -f [email protected] $@
  211. $(scripts_4_0): $(SCRIPT_IN) Makefile
  212. n=`echo $@ | sed 's,$(COMPAT_4_0_SUFFIX)$$,,'`; \
  213. $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > [email protected]
  214. mv -f [email protected] $@
  215. $(scripts_mono_configuration_crypto): mono-configuration-crypto.in
  216. $(REWRITE4) -e "s,@exe_name@,mono-configuration-crypto,g" $(srcdir)/mono-configuration-crypto.in > [email protected]
  217. mv -f [email protected] $@
  218. $(MDOC_SUBCOMMANDS): Makefile
  219. for script in $(MDOC_SUBCOMMANDS) ; do \
  220. cmd=`echo $$script | sed 's/mdoc-//'` ; \
  221. echo "#!/bin/sh" > $$script ; \
  222. echo "exec mdoc $$cmd \"\$$@\"" >> $$script; \
  223. done