Makefile.am 7.3 KB

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