Makefile.am 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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.sh
  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' -not -path '*/roslyn-binaries/*'`
  36. rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*'`
  37. pkgconfigdir = $(libdir)/pkgconfig
  38. noinst_DATA = mono-uninstalled.pc
  39. DISTCLEANFILES= mono-uninstalled.pc
  40. # building with monolite
  41. .PHONY: get-monolite-latest
  42. get-monolite-latest:
  43. $(MAKE) -C $(mcs_topdir)/class get-monolite-latest
  44. if BITCODE
  45. BITCODE_CHECK=yes
  46. endif
  47. .PHONY: check-ci
  48. check-ci:
  49. MONO_LLVMONLY=$(BITCODE_CHECK) $(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
  50. .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
  51. validate: do-build-mono-mcs
  52. $(MAKE) mcs-do-tests
  53. do-build-mono-mcs: mcs-do-clean
  54. $(MAKE) all
  55. mcs-do-clean:
  56. cd runtime && $(MAKE) clean-local
  57. cd mono/tests && $(MAKE) clean
  58. mcs-do-tests:
  59. cd runtime && $(MAKE) check-local
  60. cd mono/tests && $(MAKE) check
  61. .PHONY: compiler-tests mcs-do-compiler-tests
  62. compiler-tests:
  63. $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
  64. mcs-do-compiler-tests:
  65. $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
  66. .PHONY: bootstrap-world
  67. bootstrap-world: compiler-tests
  68. $(MAKE) install
  69. if INSTALL_MONOTOUCH
  70. monotouch-do-build: config.h
  71. @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
  72. case "x$$subdir" in \
  73. xmono ) target="monotouch-do-build";; \
  74. * ) target="all";; \
  75. esac; \
  76. echo "Making $$target in $$subdir"; \
  77. (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
  78. done;
  79. (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
  80. monotouch-do-clean:
  81. @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
  82. case "x$$subdir" in \
  83. xmono ) target="monotouch-do-clean";; \
  84. * ) target="clean";; \
  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-clean)
  90. endif
  91. win32getdeps:
  92. wget http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip
  93. wget http://www.go-mono.com/archive/glib-2.0.4-20020703.zip
  94. wget http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip
  95. wget http://www.go-mono.com/archive/libiconv-1.7.zip
  96. wget http://www.go-mono.com/archive/libiconv-dev-1.7.zip
  97. wget http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip
  98. unzip -n -d / pkgconfig-0.11-20020310.zip
  99. unzip -n -d / glib-2.0.4-20020703.zip
  100. unzip -n -d / glib-dev-2.0.4-20020703.zip
  101. unzip -n -d / libiconv-1.7.zip
  102. unzip -n -d / libiconv-dev-1.7.zip
  103. unzip -n -d / libintl-0.10.40-20020101.zip
  104. win32setup:
  105. makensis /DMILESTONE=$(VERSION) /DSOURCE_INSTALL_DIR=$(SOURCE_INSTALL_DIR) /DBUILDNUM=$(BUILDNUM) monowiz.win32.nsi
  106. update-csproj:
  107. -rm msvc/scripts/order
  108. -rm msvc/scripts/order.xml
  109. -rm -rf msvc/scripts/inputs
  110. -mkdir msvc/scripts/inputs
  111. (cd runtime; make V=1 extra_targets=csproj-local)
  112. package-inputs:
  113. echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
  114. echo '<root>' >> msvc/scripts/order.xml
  115. for i in `cat msvc/scripts/order`; do \
  116. set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
  117. cat msvc/scripts/inputs/$$2.input | sed -e 's/\\\\/\\/g' -e 's/\\/\\\\/g' | \
  118. (echo " <project dir=\"$$1\" library=\"$$2\">"; \
  119. read boot; echo " <boot>$$boot</boot>"; \
  120. read flags; echo " <flags>$$flags</flags>"; \
  121. read output; echo " <output>$$output</output>"; \
  122. read built; echo " <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
  123. read libou; echo " <library_output>$$libou</library_output>"; \
  124. read fx_ver; echo " <fx_version>$$fx_ver</fx_version>"; \
  125. read profile; echo " <profile>$$profile</profile>"; \
  126. read resxt; echo " <resources>$$resxt</resources>"; \
  127. read resp; echo " <response>$$resp</response>"; \
  128. echo " </project>") >> msvc/scripts/order.xml; \
  129. done
  130. echo "</root>" >> msvc/scripts/order.xml
  131. # Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
  132. update-llvm-version:
  133. if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
  134. 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."
  135. update-solution-files:
  136. make update-csproj
  137. make package-inputs
  138. (cd msvc/scripts; make genproj.exe; mono genproj.exe)