Makefile.am 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. ACLOCAL_AMFLAGS = -I m4
  2. SUBDIRS = @MONO_SUBDIRS@
  3. noinst_SUBDIRS = @MONO_NOINST_SUBDIRS@
  4. DIST_SUBDIRS = $(SUBDIRS) m4
  5. if !ENABLE_NETCORE
  6. all: $(update_submodules)
  7. update_submodules:
  8. @cd $(srcdir) && scripts/update_submodules.sh
  9. .PHONY: update_submodules
  10. EXTRA_DIST= \
  11. README.md \
  12. LICENSE \
  13. autogen.sh \
  14. mkinstalldirs \
  15. mono-uninstalled.pc.in \
  16. winconfig.h \
  17. code_of_conduct.md \
  18. external \
  19. mcs/class/referencesource
  20. DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_RUNTIME=false
  21. # Distribute the 'mcs' tree too
  22. GIT_DIR ?= $(srcdir)/.git
  23. dist-hook:
  24. test -d $(distdir)/mcs || mkdir $(distdir)/mcs
  25. d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
  26. rm -rf `find $(top_distdir)/external -path '*\.git'`
  27. rm -rf `find $(top_distdir)/external -path '*\.libs'`
  28. rm -rf `find $(top_distdir)/external -path '*\.deps'`
  29. rm -f `find $(top_distdir)/external -path '*\.o'`
  30. rm -f `find $(top_distdir)/external -path '*\.so'`
  31. rm -f `find $(top_distdir)/external -path '*\.lo'`
  32. rm -f `find $(top_distdir)/external -path '*\.Plo'`
  33. rm -f `find $(top_distdir)/external -name '\.dirstamp'`
  34. rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
  35. rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*' -not -path '*/helix-binaries/*'`
  36. rm -rf "$(top_distdir)/external/linker/test"
  37. rm -rf "$(top_distdir)/external/llvm-project/lldb/test"
  38. rm -rf "$(top_distdir)/external/llvm-project/libcxx/test"
  39. rm -rf "$(top_distdir)/external/llvm-project/clang/test"
  40. pkgconfigdir = $(libdir)/pkgconfig
  41. noinst_DATA = mono-uninstalled.pc
  42. DISTCLEANFILES= mono-uninstalled.pc
  43. # building with monolite
  44. .PHONY: get-monolite-latest
  45. get-monolite-latest:
  46. $(MAKE) -C $(mcs_topdir)/class get-monolite-latest
  47. if BITCODE
  48. BITCODE_CHECK=yes
  49. endif
  50. if DEFAULT_TESTS
  51. CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-default.sh
  52. else
  53. CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
  54. endif
  55. .PHONY: check-ci
  56. check-ci:
  57. MONO_LLVMONLY=$(BITCODE_CHECK) $(CI_TEST_SCRIPT)
  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. install:
  78. for mydir in $(filter-out $(noinst_SUBDIRS),$(SUBDIRS)); do \
  79. (cd $${mydir} && ${MAKE} install) \
  80. done
  81. update-csproj:
  82. -rm msvc/scripts/order
  83. -rm msvc/scripts/order.xml
  84. -rm -rf msvc/scripts/inputs
  85. -mkdir msvc/scripts/inputs
  86. (cd runtime; $(MAKE) V=1 extra_targets=csproj-local)
  87. package-inputs:
  88. echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
  89. echo '<root>' >> msvc/scripts/order.xml
  90. for i in `cat msvc/scripts/order`; do \
  91. set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
  92. cat msvc/scripts/inputs/$$2.input | sed -e 's/\\\\/\\/g' -e 's/\\/\\\\/g' | \
  93. (echo " <project dir=\"$$1\" library=\"$$2\">"; \
  94. read boot; echo " <boot>$$boot</boot>"; \
  95. read flags; echo " <flags>$$flags</flags>"; \
  96. read sources;echo " <sources>$$sources</sources>"; \
  97. read output; echo " <output>$$output</output>"; \
  98. read built; echo " <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
  99. read libou; echo " <library_output>$$libou</library_output>"; \
  100. read fx_ver; echo " <fx_version>$$fx_ver</fx_version>"; \
  101. read profile; echo " <profile>$$profile</profile>"; \
  102. read resxt; echo " <resources>$$resxt</resources>"; \
  103. read resp; echo " <response>$$resp</response>"; \
  104. echo " </project>") >> msvc/scripts/order.xml; \
  105. done
  106. echo "</root>" >> msvc/scripts/order.xml
  107. # Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
  108. update-llvm-version:
  109. if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
  110. 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."
  111. update-solution-files:
  112. cd msvc/scripts && $(MAKE) genproj.exe || exit $$?;
  113. $(MAKE) update-csproj
  114. $(MAKE) package-inputs
  115. (cd msvc/scripts; mono --debug genproj.exe $(GENPROJ_ARGS))
  116. update-solution-files-with-tests:
  117. $(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files
  118. endif