Makefile.am 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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. $(MDOC_SUBCOMMANDS) \
  33. $(MDOC_COMPAT) \
  34. mono-test-install \
  35. peverify \
  36. mcs \
  37. csc \
  38. mono-package-runtime \
  39. mono-heapviz \
  40. $(scripts_mono_configuration_crypto)
  41. if INSTALL_4_x
  42. bin_SCRIPTS += $(scripts_4_0)
  43. bin_SCRIPTS += dmcs
  44. bin_SCRIPTS += xbuild
  45. endif
  46. scripts_4_0_umask = \
  47. makecert$(SCRIPT_SUFFIX) \
  48. sn$(SCRIPT_SUFFIX)
  49. deprecated = \
  50. cilc(SCRIPT_SUFFIX) \
  51. mjs(SCRIPT_SUFFIX)
  52. scripts_2_0 = \
  53. al2$(SCRIPT_SUFFIX) \
  54. gacutil2$(SCRIPT_SUFFIX) \
  55. monop2$(SCRIPT_SUFFIX) \
  56. resgen2$(SCRIPT_SUFFIX) \
  57. wsdl2$(SCRIPT_SUFFIX)
  58. scripts_4_0 = \
  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. mdoc$(SCRIPT_SUFFIX) \
  66. mono-cil-strip$(SCRIPT_SUFFIX) \
  67. prj2make$(SCRIPT_SUFFIX) \
  68. soapsuds$(SCRIPT_SUFFIX) \
  69. caspol$(SCRIPT_SUFFIX) \
  70. cert-sync$(SCRIPT_SUFFIX) \
  71. cert2spc$(SCRIPT_SUFFIX) \
  72. certmgr$(SCRIPT_SUFFIX) \
  73. chktrust$(SCRIPT_SUFFIX) \
  74. crlupdate$(SCRIPT_SUFFIX) \
  75. csharp$(SCRIPT_SUFFIX) \
  76. httpcfg$(SCRIPT_SUFFIX) \
  77. lc$(SCRIPT_SUFFIX) \
  78. mconfig$(SCRIPT_SUFFIX) \
  79. mod$(SCRIPT_SUFFIX) \
  80. monolinker$(SCRIPT_SUFFIX) \
  81. mono-api-info$(SCRIPT_SUFFIX) \
  82. mono-api-html$(SCRIPT_SUFFIX) \
  83. mono-shlib-cop$(SCRIPT_SUFFIX) \
  84. mozroots$(SCRIPT_SUFFIX) \
  85. permview$(SCRIPT_SUFFIX) \
  86. pdb2mdb$(SCRIPT_SUFFIX) \
  87. xsd$(SCRIPT_SUFFIX) \
  88. mono-xmltool$(SCRIPT_SUFFIX) \
  89. setreg$(SCRIPT_SUFFIX) \
  90. secutil$(SCRIPT_SUFFIX) \
  91. signcode$(SCRIPT_SUFFIX) \
  92. sgen$(SCRIPT_SUFFIX) \
  93. sqlmetal$(SCRIPT_SUFFIX) \
  94. sqlsharp$(SCRIPT_SUFFIX) \
  95. svcutil$(SCRIPT_SUFFIX) \
  96. ccrewrite$(SCRIPT_SUFFIX) \
  97. cccheck$(SCRIPT_SUFFIX) \
  98. mdbrebase$(SCRIPT_SUFFIX) \
  99. ikdasm$(SCRIPT_SUFFIX) \
  100. mono-symbolicate$(SCRIPT_SUFFIX)
  101. MDOC_SUBCOMMANDS = \
  102. mdoc-assemble \
  103. mdoc-export-html \
  104. mdoc-export-msxdoc \
  105. mdoc-update \
  106. mdoc-validate
  107. MDOC_COMPAT = \
  108. mdassembler \
  109. mdvalidater \
  110. monodocer \
  111. monodocs2html \
  112. monodocs2slashdoc
  113. #
  114. # these are the new defaults, 2.0 profile-based commands
  115. #
  116. # we can move scripts_1_0 scripts here as we see fit, if we need to
  117. # keep a 1.0 command available, we should additionally put it on
  118. # the scripts_1_0_compat list
  119. #
  120. scripts_defaults = \
  121. al$(SCRIPT_SUFFIX) \
  122. ilasm$(SCRIPT_SUFFIX) \
  123. gacutil$(SCRIPT_SUFFIX) \
  124. mkbundle$(SCRIPT_SUFFIX) \
  125. monop$(SCRIPT_SUFFIX) \
  126. resgen$(SCRIPT_SUFFIX) \
  127. wsdl$(SCRIPT_SUFFIX)
  128. scripts_service = mono-service mono-service2
  129. scripts_nunit = nunit-console$(SCRIPT_SUFFIX) nunit-console2$(SCRIPT_SUFFIX) nunit-console4$(SCRIPT_SUFFIX)
  130. scripts_rpmhelpers = mono-find-provides mono-find-requires
  131. scripts_mono_configuration_crypto = mono-configuration-crypto$(SCRIPT_SUFFIX)
  132. 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)
  133. DISTCLEANFILES = $(pkgconfig_DATA) $(scripts_rpmhelpers)
  134. EXTRA_DIST = \
  135. script.in \
  136. script.bat.in \
  137. script_umask.in \
  138. script_umask.bat.in \
  139. mod.in \
  140. mono-service.in \
  141. mono-find-provides.in \
  142. mono-find-requires.in \
  143. peverify.in \
  144. xbuild.in \
  145. update_submodules.sh \
  146. mcs.in \
  147. csc.in \
  148. dmcs.in \
  149. mono-package-runtime \
  150. mono-test-install \
  151. mono-heapviz \
  152. $(MDOC_COMPAT) \
  153. mono-configuration-crypto.in \
  154. submodules/versions.mk \
  155. submodules/versions.py
  156. mono_interp = mono
  157. if HOST_WIN32
  158. if CROSS_COMPILING
  159. plat_bindir = $(bindir)
  160. mono_instdir = $(prefix)/lib/mono
  161. else
  162. plat_bindir = $(shell cygpath -m $(libdir))
  163. mono_instdir = $(shell cygpath -m $(libdir))/mono
  164. endif
  165. else
  166. plat_bindir = $(bindir)
  167. mono_instdir = $(prefix)/lib/mono
  168. endif
  169. REWRITE_COMMON = sed \
  170. -e 's,@''bindir@,$(bindir),g' \
  171. -e 's,@''plat_bindir@,$(plat_bindir),g' \
  172. -e 's,@''mono_instdir@,$(mono_instdir),g' \
  173. -e 's,@''gtkdir@,$(gtkdir),g'
  174. REWRITE = $(REWRITE_COMMON) -e 's,@''mono_interp@,$(mono_interp),g'
  175. REWRITE_DEBUG = $(REWRITE_COMMON) -e 's,@''mono_interp@,$(mono_interp) --debug,g'
  176. REWRITE4 = $(REWRITE) -e 's,@''framework_version@,4.5,g'
  177. REWRITE4_DEBUG = $(REWRITE_DEBUG) -e 's,@''framework_version@,4.5,g'
  178. peverify: peverify.in Makefile
  179. $(REWRITE_COMMON) $(srcdir)/peverify.in > [email protected]
  180. mv -f [email protected] $@
  181. mcs: mcs.in Makefile
  182. $(REWRITE_COMMON) $(srcdir)/mcs.in > [email protected]
  183. mv -f [email protected] $@
  184. csc: csc.in Makefile
  185. $(REWRITE_COMMON) $(srcdir)/csc.in > [email protected]
  186. mv -f [email protected] $@
  187. dmcs: dmcs.in Makefile
  188. $(REWRITE_COMMON) $(srcdir)/dmcs.in > [email protected]
  189. mv -f [email protected] $@
  190. mono-service: mono-service.in Makefile
  191. $(REWRITE4) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > [email protected]
  192. mv -f [email protected] $@
  193. mono-service2: mono-service.in Makefile
  194. $(REWRITE4) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > [email protected]
  195. mv -f [email protected] $@
  196. nunit-console$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
  197. $(REWRITE4_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > [email protected]
  198. mv -f [email protected] $@
  199. nunit-console2$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
  200. $(REWRITE4_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > [email protected]
  201. mv -f [email protected] $@
  202. nunit-console4$(SCRIPT_SUFFIX): $(SCRIPT_IN) Makefile
  203. $(REWRITE4_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/$(SCRIPT_IN) | $(FILTER) > [email protected]
  204. mv -f [email protected] $@
  205. xbuild: xbuild.in Makefile
  206. $(REWRITE_COMMON) $(srcdir)/xbuild.in > [email protected]
  207. mv -f [email protected] $@
  208. #FIXME: this is not the correct rule for mod.bat.
  209. mod$(SCRIPT_SUFFIX): mod.in Makefile
  210. $(REWRITE4) -e "s,@""exe_name@,mod,g" $(srcdir)/mod.in > [email protected]
  211. mv -f [email protected] $@
  212. #FIXME: this is not the correct rule for bat files.
  213. $(scripts_4_0_umask): script_umask.in Makefile
  214. n=`echo $@ | sed 's,$(COMPAT_4_0_SUFFIX)$$,,'`; \
  215. $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/script_umask.in | $(FILTER) > [email protected]
  216. mv -f [email protected] $@
  217. $(scripts_defaults): $(SCRIPT_IN) Makefile
  218. n=`echo $@ | sed 's,$(COMPAT_4_0_SUFFIX)$$,,'`; \
  219. $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > [email protected]
  220. mv -f [email protected] $@
  221. $(scripts_2_0): $(SCRIPT_IN) Makefile
  222. n=`echo $@ | sed 's,$(COMPAT_2_0_SUFFIX)$$,,'`; \
  223. $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > [email protected]
  224. mv -f [email protected] $@
  225. $(scripts_4_0): $(SCRIPT_IN) Makefile
  226. n=`echo $@ | sed 's,$(COMPAT_4_0_SUFFIX)$$,,'`; \
  227. $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > [email protected]
  228. mv -f [email protected] $@
  229. $(scripts_mono_configuration_crypto): mono-configuration-crypto.in
  230. $(REWRITE4) -e "s,@exe_name@,mono-configuration-crypto,g" $(srcdir)/mono-configuration-crypto.in > [email protected]
  231. mv -f [email protected] $@
  232. $(MDOC_SUBCOMMANDS): Makefile
  233. for script in $(MDOC_SUBCOMMANDS) ; do \
  234. cmd=`echo $$script | sed 's/mdoc-//'` ; \
  235. echo "#!/bin/sh" > $$script ; \
  236. echo "exec mdoc $$cmd \"\$$@\"" >> $$script; \
  237. done