Makefile.am 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. ACLOCAL_AMFLAGS = -I m4
  2. MOONLIGHT_SUBDIRS = $(libgc_dir) eglib/src mono
  3. MONOTOUCH_SUBDIRS = $(libgc_dir) eglib/src mono
  4. if CROSS_COMPILING
  5. SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) data runtime scripts man samples msvc $(docs_dir)
  6. # Keep in sync with SUBDIRS
  7. ## 'tools' is not normally built
  8. DIST_SUBDIRS = m4 po libgc eglib mono ikvm-native data runtime scripts man samples tools msvc docs
  9. else
  10. if ONLY_MONOTOUCH
  11. SUBDIRS = $(MONOTOUCH_SUBDIRS) runtime
  12. else
  13. if ONLY_MOONLIGHT
  14. SUBDIRS = $(MOONLIGHT_SUBDIRS) runtime
  15. else
  16. SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir)
  17. # Keep in sync with SUBDIRS
  18. ## 'tools' is not normally built
  19. DIST_SUBDIRS = m4 po libgc eglib mono ikvm-native support data runtime scripts man samples tools msvc docs
  20. endif
  21. endif
  22. endif
  23. all: update_submodules
  24. SUBMODULE_ERROR='Could not recursively update all git submodules. You may experience compilation problems if some submodules are out of date'
  25. update_submodules:
  26. @$(srcdir)/scripts/update_submodules
  27. .PHONY: update_submodules
  28. EXTRA_DIST= \
  29. LICENSE \
  30. autogen.sh \
  31. build-mingw32.sh \
  32. mkinstalldirs \
  33. mono-uninstalled.pc.in \
  34. winconfig.h \
  35. mono-core.spec \
  36. external
  37. DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
  38. # Distribute the 'mcs' tree too
  39. GIT_DIR ?= $(srcdir)/.git
  40. dist-hook:
  41. test -d $(distdir)/mcs || mkdir $(distdir)/mcs
  42. d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
  43. rm -rf `find $(top_distdir)/external -path '*\.git' -and -type d`
  44. # Disable this for now because it is very slow and causes wrench to timeout:
  45. # test ! -d $(GIT_DIR) || ./scripts/commits-to-changelog.py --root=$(distdir) last-commit-with-compulsory-changelog-entry
  46. pkgconfigdir = $(libdir)/pkgconfig
  47. noinst_DATA = mono-uninstalled.pc
  48. DISTCLEANFILES= mono-uninstalled.pc
  49. # building with monolite
  50. mcslib = $(mcs_topdir)/class/lib
  51. monolite = $(mcslib)/monolite
  52. mono_corlib_version = $(shell sed -n "s/\#define MONO_CORLIB_VERSION //p" $(srcdir)/mono/metadata/appdomain.c)
  53. monolite_url = http://storage.bos.xamarin.com/mono-dist-master/latest/monolite-$(mono_corlib_version)-latest.tar.gz
  54. .PHONY: get-monolite-latest
  55. get-monolite-latest:
  56. -rm -fr $(mcslib)/monolite-*
  57. -mkdir -p $(mcslib)
  58. test ! -d $(monolite) || test ! -d $(monolite).old || rm -fr $(monolite).old
  59. test ! -d $(monolite) || mv -f $(monolite) $(monolite).old
  60. cd $(mcslib) && { (wget -O- $(monolite_url) || curl $(monolite_url)) | gzip -d | tar xf - ; }
  61. cd $(mcslib) && mv -f monolite-* monolite
  62. .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
  63. validate: do-build-mono-mcs
  64. $(MAKE) mcs-do-tests
  65. do-build-mono-mcs: mcs-do-clean
  66. $(MAKE) all
  67. mcs-do-clean:
  68. cd runtime && $(MAKE) clean-local
  69. cd mono/tests && $(MAKE) clean
  70. mcs-do-tests:
  71. cd runtime && $(MAKE) check-local
  72. cd mono/tests && $(MAKE) check
  73. .PHONY: compiler-tests mcs-do-compiler-tests
  74. compiler-tests:
  75. $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
  76. mcs-do-compiler-tests:
  77. $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
  78. .PHONY: bootstrap-world
  79. bootstrap-world: compiler-tests
  80. $(MAKE) install
  81. if MOONLIGHT
  82. moon-do-build: config.h
  83. @list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
  84. case "x$$subdir" in \
  85. xmono ) target="moon-do-build";; \
  86. * ) target="all";; \
  87. esac; \
  88. echo "Making $$target in $$subdir"; \
  89. (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
  90. done;
  91. (cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-build)
  92. moon-do-clean:
  93. @list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
  94. case "x$$subdir" in \
  95. xmono ) target="moon-do-clean";; \
  96. * ) target="clean";; \
  97. esac; \
  98. echo "Making $$target in $$subdir"; \
  99. (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
  100. done;
  101. (cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-clean)
  102. endif
  103. if INSTALL_MONOTOUCH
  104. monotouch-do-build: config.h
  105. @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
  106. case "x$$subdir" in \
  107. xmono ) target="monotouch-do-build";; \
  108. * ) target="all";; \
  109. esac; \
  110. echo "Making $$target in $$subdir"; \
  111. (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
  112. done;
  113. (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
  114. monotouch-do-clean:
  115. @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
  116. case "x$$subdir" in \
  117. xmono ) target="monotouch-do-clean";; \
  118. * ) target="clean";; \
  119. esac; \
  120. echo "Making $$target in $$subdir"; \
  121. (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
  122. done;
  123. (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-clean)
  124. endif
  125. win32getdeps:
  126. wget http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip
  127. wget http://www.go-mono.com/archive/glib-2.0.4-20020703.zip
  128. wget http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip
  129. wget http://www.go-mono.com/archive/libiconv-1.7.zip
  130. wget http://www.go-mono.com/archive/libiconv-dev-1.7.zip
  131. wget http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip
  132. unzip -n -d / pkgconfig-0.11-20020310.zip
  133. unzip -n -d / glib-2.0.4-20020703.zip
  134. unzip -n -d / glib-dev-2.0.4-20020703.zip
  135. unzip -n -d / libiconv-1.7.zip
  136. unzip -n -d / libiconv-dev-1.7.zip
  137. unzip -n -d / libintl-0.10.40-20020101.zip
  138. win32setup:
  139. makensis /DMILESTONE=$(VERSION) /DSOURCE_INSTALL_DIR=$(SOURCE_INSTALL_DIR) /DBUILDNUM=$(BUILDNUM) monowiz.win32.nsi
  140. update-csproj:
  141. -rm msvc/scripts/order
  142. -rm msvc/scripts/order.xml
  143. -rm -rf msvc/scripts/inputs
  144. -mkdir msvc/scripts/inputs
  145. (cd runtime; make V=1 extra_targets=csproj-local)
  146. package-inputs:
  147. echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
  148. echo '<root>' >> msvc/scripts/order.xml
  149. for i in `cat msvc/scripts/order`; do \
  150. set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
  151. cat msvc/scripts/inputs/$$2.input | sed -e 's/\\\\/\\/g' -e 's/\\/\\\\/g' | \
  152. (echo " <project dir=\"$$1\" library=\"$$2\">"; \
  153. read boot; echo " <boot>$$boot</boot>"; \
  154. read flags; echo " <flags>$$flags</flags>"; \
  155. read output; echo " <output>$$output</output>"; \
  156. read built; echo " <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
  157. read libou; echo " <library_output>$$libou</library_output>"; \
  158. read fx_ver; echo " <fx_version>$$fx_ver</fx_version>"; \
  159. read profile; echo " <profile>$$profile</profile>"; \
  160. read resp; echo " <response>$$resp</response>"; \
  161. echo " </project>") >> msvc/scripts/order.xml; \
  162. done
  163. echo "</root>" >> msvc/scripts/order.xml