Makefile.am 4.8 KB

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