Makefile.am 6.5 KB

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