Makefile.am 6.4 KB

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