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
24 SUBDIRS = mk llvm mono runtime netcore
26 update_submodules = update_submodules
27 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
30 # Keep in sync with SUBDIRS
31 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 netcore
33 all: $(update_submodules)
36 @cd $(srcdir) && scripts/update_submodules.sh
38 .PHONY: update_submodules
45 mono-uninstalled.pc.in \
49 mcs/class/referencesource
51 DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
53 # Distribute the 'mcs' tree too
54 GIT_DIR ?= $(srcdir)/.git
56 test -d $(distdir)/mcs || mkdir $(distdir)/mcs
57 d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
58 rm -rf `find $(top_distdir)/external -path '*\.git'`
59 rm -rf `find $(top_distdir)/external -path '*\.libs'`
60 rm -rf `find $(top_distdir)/external -path '*\.deps'`
61 rm -f `find $(top_distdir)/external -path '*\.o'`
62 rm -f `find $(top_distdir)/external -path '*\.so'`
63 rm -f `find $(top_distdir)/external -path '*\.lo'`
64 rm -f `find $(top_distdir)/external -path '*\.Plo'`
65 rm -f `find $(top_distdir)/external -name '\.dirstamp'`
66 rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
67 rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*' -not -path '*/helix-binaries/*'`
68 rm -rf "$(top_distdir)/external/linker/test"
70 pkgconfigdir = $(libdir)/pkgconfig
71 noinst_DATA = mono-uninstalled.pc
72 DISTCLEANFILES= mono-uninstalled.pc
74 # building with monolite
75 .PHONY: get-monolite-latest
77 $(MAKE) -C $(mcs_topdir)/class get-monolite-latest
84 CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-default.sh
86 CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
91 MONO_LLVMONLY=$(BITCODE_CHECK) $(CI_TEST_SCRIPT)
93 .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
94 validate: do-build-mono-mcs
96 do-build-mono-mcs: mcs-do-clean
99 cd runtime && $(MAKE) clean-local
100 cd mono/tests && $(MAKE) clean
102 cd runtime && $(MAKE) check-local
103 cd mono/tests && $(MAKE) check
105 .PHONY: compiler-tests mcs-do-compiler-tests
107 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
108 mcs-do-compiler-tests:
109 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
111 .PHONY: bootstrap-world
112 bootstrap-world: compiler-tests
116 monotouch-do-build: config.h
117 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
118 case "x$$subdir" in \
119 xmono ) target="monotouch-do-build";; \
122 echo "Making $$target in $$subdir"; \
123 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
125 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
128 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
129 case "x$$subdir" in \
130 xmono ) target="monotouch-do-clean";; \
131 * ) target="clean";; \
133 echo "Making $$target in $$subdir"; \
134 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
136 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-clean)
141 -rm msvc/scripts/order
142 -rm msvc/scripts/order.xml
143 -rm -rf msvc/scripts/inputs
144 -mkdir msvc/scripts/inputs
145 (cd runtime; $(MAKE) V=1 extra_targets=csproj-local)
148 echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
149 echo '<root>' >> msvc/scripts/order.xml
150 for i in `cat msvc/scripts/order`; do \
151 set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
152 cat msvc/scripts/inputs/$$2.input | sed -e 's/\\\\/\\/g' -e 's/\\/\\\\/g' | \
153 (echo " <project dir=\"$$1\" library=\"$$2\">"; \
154 read boot; echo " <boot>$$boot</boot>"; \
155 read flags; echo " <flags>$$flags</flags>"; \
156 read sources;echo " <sources>$$sources</sources>"; \
157 read output; echo " <output>$$output</output>"; \
158 read built; echo " <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
159 read libou; echo " <library_output>$$libou</library_output>"; \
160 read fx_ver; echo " <fx_version>$$fx_ver</fx_version>"; \
161 read profile; echo " <profile>$$profile</profile>"; \
162 read resxt; echo " <resources>$$resxt</resources>"; \
163 read resp; echo " <response>$$resp</response>"; \
164 echo " </project>") >> msvc/scripts/order.xml; \
166 echo "</root>" >> msvc/scripts/order.xml
168 # Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
170 if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
171 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."
174 update-solution-files:
175 cd msvc/scripts && $(MAKE) genproj.exe || exit $$?;
176 $(MAKE) update-csproj
177 $(MAKE) package-inputs
178 (cd msvc/scripts; mono --debug genproj.exe $(GENPROJ_ARGS))
180 update-solution-files-with-tests:
181 $(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files