Makefile.am 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. ACLOCAL_AMFLAGS = -I m4
  2. AM_CFLAGS = $(WERROR_CFLAGS)
  3. MONOTOUCH_SUBDIRS = $(libgc_dir) 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. if BUILD_SUPPORT
  11. support_dir = support
  12. else
  13. support_dir =
  14. endif
  15. SUBDIRS = po $(libgc_dir) mono $(ikvm_native_dir) $(support_dir) data runtime scripts man samples $(tools_dir) msvc $(docs_dir) acceptance-tests llvm
  16. # Keep in sync with SUBDIRS
  17. DIST_SUBDIRS = m4 po $(libgc_dir) mono ikvm-native $(support_dir) data runtime scripts man samples tools msvc docs acceptance-tests llvm
  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.sh
  22. .PHONY: update_submodules
  23. EXTRA_DIST= \
  24. README.md \
  25. LICENSE \
  26. autogen.sh \
  27. mkinstalldirs \
  28. mono-uninstalled.pc.in \
  29. winconfig.h \
  30. code_of_conduct.md \
  31. external \
  32. mcs/class/referencesource
  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'`
  40. rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
  41. rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*'`
  42. pkgconfigdir = $(libdir)/pkgconfig
  43. noinst_DATA = mono-uninstalled.pc
  44. DISTCLEANFILES= mono-uninstalled.pc
  45. # building with monolite
  46. .PHONY: get-monolite-latest
  47. get-monolite-latest:
  48. $(MAKE) -C $(mcs_topdir)/class get-monolite-latest
  49. if BITCODE
  50. BITCODE_CHECK=yes
  51. endif
  52. .PHONY: check-ci
  53. check-ci:
  54. MONO_LLVMONLY=$(BITCODE_CHECK) $(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
  55. .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
  56. validate: do-build-mono-mcs
  57. $(MAKE) mcs-do-tests
  58. do-build-mono-mcs: mcs-do-clean
  59. $(MAKE) all
  60. mcs-do-clean:
  61. cd runtime && $(MAKE) clean-local
  62. cd mono/tests && $(MAKE) clean
  63. mcs-do-tests:
  64. cd runtime && $(MAKE) check-local
  65. cd mono/tests && $(MAKE) check
  66. .PHONY: compiler-tests mcs-do-compiler-tests
  67. compiler-tests:
  68. $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
  69. mcs-do-compiler-tests:
  70. $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
  71. .PHONY: bootstrap-world
  72. bootstrap-world: compiler-tests
  73. $(MAKE) install
  74. if INSTALL_MONOTOUCH
  75. monotouch-do-build: config.h
  76. @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
  77. case "x$$subdir" in \
  78. xmono ) target="monotouch-do-build";; \
  79. * ) target="all";; \
  80. esac; \
  81. echo "Making $$target in $$subdir"; \
  82. (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
  83. done;
  84. (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
  85. monotouch-do-clean:
  86. @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
  87. case "x$$subdir" in \
  88. xmono ) target="monotouch-do-clean";; \
  89. * ) target="clean";; \
  90. esac; \
  91. echo "Making $$target in $$subdir"; \
  92. (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
  93. done;
  94. (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-clean)
  95. endif
  96. update-csproj:
  97. -rm msvc/scripts/order
  98. -rm msvc/scripts/order.xml
  99. -rm -rf msvc/scripts/inputs
  100. -mkdir msvc/scripts/inputs
  101. (cd runtime; make V=1 extra_targets=csproj-local)
  102. package-inputs:
  103. echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
  104. echo '<root>' >> msvc/scripts/order.xml
  105. for i in `cat msvc/scripts/order`; do \
  106. set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
  107. cat msvc/scripts/inputs/$$2.input | sed -e 's/\\\\/\\/g' -e 's/\\/\\\\/g' | \
  108. (echo " <project dir=\"$$1\" library=\"$$2\">"; \
  109. read boot; echo " <boot>$$boot</boot>"; \
  110. read flags; echo " <flags>$$flags</flags>"; \
  111. read output; echo " <output>$$output</output>"; \
  112. read built; echo " <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
  113. read libou; echo " <library_output>$$libou</library_output>"; \
  114. read fx_ver; echo " <fx_version>$$fx_ver</fx_version>"; \
  115. read profile; echo " <profile>$$profile</profile>"; \
  116. read resxt; echo " <resources>$$resxt</resources>"; \
  117. read resp; echo " <response>$$resp</response>"; \
  118. echo " </project>") >> msvc/scripts/order.xml; \
  119. done
  120. echo "</root>" >> msvc/scripts/order.xml
  121. # Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
  122. update-llvm-version:
  123. if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
  124. 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."
  125. update-solution-files:
  126. make update-csproj
  127. make package-inputs
  128. (cd msvc/scripts; make genproj.exe; mono genproj.exe $(GENPROJ_ARGS))
  129. update-solution-files-with-tests:
  130. make "GENPROJ_ARGS=2012 true true" update-solution-files