Makefile.am 6.1 KB

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