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
28 SUBMODULE_ERROR='Could not recursively update all git submodules. You may experience compilation problems if some submodules are out of date'
30 @$(srcdir)/scripts/update_submodules.sh
32 .PHONY: update_submodules
39 mono-uninstalled.pc.in \
43 mcs/class/referencesource
45 DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
47 # Distribute the 'mcs' tree too
48 GIT_DIR ?= $(srcdir)/.git
50 test -d $(distdir)/mcs || mkdir $(distdir)/mcs
51 d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
52 rm -rf `find $(top_distdir)/external -path '*\.git'`
53 rm -rf `find $(top_distdir)/external -path '*\.libs'`
54 rm -rf `find $(top_distdir)/external -path '*\.deps'`
55 rm -f `find $(top_distdir)/external -path '*\.o'`
56 rm -f `find $(top_distdir)/external -path '*\.so'`
57 rm -f `find $(top_distdir)/external -path '*\.lo'`
58 rm -f `find $(top_distdir)/external -path '*\.Plo'`
59 rm -f `find $(top_distdir)/external -name '\.dirstamp'`
60 rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
61 rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*' -not -path '*/helix-binaries/*'`
62 rm -rf "$(top_distdir)/external/linker/linker/Tests"
64 pkgconfigdir = $(libdir)/pkgconfig
65 noinst_DATA = mono-uninstalled.pc
66 DISTCLEANFILES= mono-uninstalled.pc
68 # building with monolite
69 .PHONY: get-monolite-latest
71 $(MAKE) -C $(mcs_topdir)/class get-monolite-latest
78 CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-default.sh
80 CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
85 MONO_LLVMONLY=$(BITCODE_CHECK) $(CI_TEST_SCRIPT)
87 .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
88 validate: do-build-mono-mcs
90 do-build-mono-mcs: mcs-do-clean
93 cd runtime && $(MAKE) clean-local
94 cd mono/tests && $(MAKE) clean
96 cd runtime && $(MAKE) check-local
97 cd mono/tests && $(MAKE) check
99 .PHONY: compiler-tests mcs-do-compiler-tests
101 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
102 mcs-do-compiler-tests:
103 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
105 .PHONY: bootstrap-world
106 bootstrap-world: compiler-tests
110 monotouch-do-build: config.h
111 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
112 case "x$$subdir" in \
113 xmono ) target="monotouch-do-build";; \
116 echo "Making $$target in $$subdir"; \
117 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
119 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
122 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
123 case "x$$subdir" in \
124 xmono ) target="monotouch-do-clean";; \
125 * ) target="clean";; \
127 echo "Making $$target in $$subdir"; \
128 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
130 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-clean)
135 -rm msvc/scripts/order
136 -rm msvc/scripts/order.xml
137 -rm -rf msvc/scripts/inputs
138 -mkdir msvc/scripts/inputs
139 (cd runtime; $(MAKE) V=1 extra_targets=csproj-local)
142 echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
143 echo '<root>' >> msvc/scripts/order.xml
144 for i in `cat msvc/scripts/order`; do \
145 set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
146 cat msvc/scripts/inputs/$$2.input | sed -e 's/\\\\/\\/g' -e 's/\\/\\\\/g' | \
147 (echo " <project dir=\"$$1\" library=\"$$2\">"; \
148 read boot; echo " <boot>$$boot</boot>"; \
149 read flags; echo " <flags>$$flags</flags>"; \
150 read sources;echo " <sources>$$sources</sources>"; \
151 read output; echo " <output>$$output</output>"; \
152 read built; echo " <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
153 read libou; echo " <library_output>$$libou</library_output>"; \
154 read fx_ver; echo " <fx_version>$$fx_ver</fx_version>"; \
155 read profile; echo " <profile>$$profile</profile>"; \
156 read resxt; echo " <resources>$$resxt</resources>"; \
157 read resp; echo " <response>$$resp</response>"; \
158 echo " </project>") >> msvc/scripts/order.xml; \
160 echo "</root>" >> msvc/scripts/order.xml
162 # Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
164 if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
165 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."
168 update-solution-files:
169 cd msvc/scripts && $(MAKE) genproj.exe || exit $$?;
170 $(MAKE) update-csproj
171 $(MAKE) package-inputs
172 (cd msvc/scripts; mono --debug genproj.exe $(GENPROJ_ARGS))
174 update-solution-files-with-tests:
175 $(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files