1 ACLOCAL_AMFLAGS = -I m4
3 AM_CFLAGS = $(WERROR_CFLAGS)
5 MONOTOUCH_SUBDIRS = $(libgc_dir) mono
7 # Some tools might not build when cross-compiling
15 build_with_msvc = msvc
19 build_without_msvc = msvc
22 SUBDIRS = $(build_with_msvc) mk po $(libgc_dir) llvm mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) $(build_without_msvc) $(docs_dir) acceptance-tests
23 # Keep in sync with SUBDIRS
24 DIST_SUBDIRS = $(build_with_msvc) m4 mk po $(libgc_dir) llvm mono ikvm-native support data runtime scripts man samples tools $(build_without_msvc) docs acceptance-tests
26 all: update_submodules
29 @cd $(srcdir) && scripts/update_submodules.sh
31 .PHONY: update_submodules
38 mono-uninstalled.pc.in \
42 mcs/class/referencesource
44 DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
46 # Distribute the 'mcs' tree too
47 GIT_DIR ?= $(srcdir)/.git
49 test -d $(distdir)/mcs || mkdir $(distdir)/mcs
50 d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
51 rm -rf `find $(top_distdir)/external -path '*\.git'`
52 rm -rf `find $(top_distdir)/external -path '*\.libs'`
53 rm -rf `find $(top_distdir)/external -path '*\.deps'`
54 rm -f `find $(top_distdir)/external -path '*\.o'`
55 rm -f `find $(top_distdir)/external -path '*\.so'`
56 rm -f `find $(top_distdir)/external -path '*\.lo'`
57 rm -f `find $(top_distdir)/external -path '*\.Plo'`
58 rm -f `find $(top_distdir)/external -name '\.dirstamp'`
59 rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
60 rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*' -not -path '*/helix-binaries/*'`
61 rm -rf "$(top_distdir)/external/linker/test"
63 pkgconfigdir = $(libdir)/pkgconfig
64 noinst_DATA = mono-uninstalled.pc
65 DISTCLEANFILES= mono-uninstalled.pc
67 # building with monolite
68 .PHONY: get-monolite-latest
70 $(MAKE) -C $(mcs_topdir)/class get-monolite-latest
77 CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-default.sh
79 CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
84 MONO_LLVMONLY=$(BITCODE_CHECK) $(CI_TEST_SCRIPT)
86 .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
87 validate: do-build-mono-mcs
89 do-build-mono-mcs: mcs-do-clean
92 cd runtime && $(MAKE) clean-local
93 cd mono/tests && $(MAKE) clean
95 cd runtime && $(MAKE) check-local
96 cd mono/tests && $(MAKE) check
98 .PHONY: compiler-tests mcs-do-compiler-tests
100 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
101 mcs-do-compiler-tests:
102 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
104 .PHONY: bootstrap-world
105 bootstrap-world: compiler-tests
109 monotouch-do-build: config.h
110 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
111 case "x$$subdir" in \
112 xmono ) target="monotouch-do-build";; \
115 echo "Making $$target in $$subdir"; \
116 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
118 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
121 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
122 case "x$$subdir" in \
123 xmono ) target="monotouch-do-clean";; \
124 * ) target="clean";; \
126 echo "Making $$target in $$subdir"; \
127 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
129 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-clean)
134 -rm msvc/scripts/order
135 -rm msvc/scripts/order.xml
136 -rm -rf msvc/scripts/inputs
137 -mkdir msvc/scripts/inputs
138 (cd runtime; $(MAKE) V=1 extra_targets=csproj-local)
141 echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
142 echo '<root>' >> msvc/scripts/order.xml
143 for i in `cat msvc/scripts/order`; do \
144 set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
145 cat msvc/scripts/inputs/$$2.input | sed -e 's/\\\\/\\/g' -e 's/\\/\\\\/g' | \
146 (echo " <project dir=\"$$1\" library=\"$$2\">"; \
147 read boot; echo " <boot>$$boot</boot>"; \
148 read flags; echo " <flags>$$flags</flags>"; \
149 read sources;echo " <sources>$$sources</sources>"; \
150 read output; echo " <output>$$output</output>"; \
151 read built; echo " <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
152 read libou; echo " <library_output>$$libou</library_output>"; \
153 read fx_ver; echo " <fx_version>$$fx_ver</fx_version>"; \
154 read profile; echo " <profile>$$profile</profile>"; \
155 read resxt; echo " <resources>$$resxt</resources>"; \
156 read resp; echo " <response>$$resp</response>"; \
157 echo " </project>") >> msvc/scripts/order.xml; \
159 echo "</root>" >> msvc/scripts/order.xml
161 # Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
163 if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
164 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."
167 update-solution-files:
168 cd msvc/scripts && $(MAKE) genproj.exe || exit $$?;
169 $(MAKE) update-csproj
170 $(MAKE) package-inputs
171 (cd msvc/scripts; mono --debug genproj.exe $(GENPROJ_ARGS))
173 update-solution-files-with-tests:
174 $(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files