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 -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
54 rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*'`
55 rm -rf "$(top_distdir)/external/linker/linker/Tests"
57 pkgconfigdir = $(libdir)/pkgconfig
58 noinst_DATA = mono-uninstalled.pc
59 DISTCLEANFILES= mono-uninstalled.pc
61 # building with monolite
62 .PHONY: get-monolite-latest
64 $(MAKE) -C $(mcs_topdir)/class get-monolite-latest
72 MONO_LLVMONLY=$(BITCODE_CHECK) $(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
74 .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
75 validate: do-build-mono-mcs
77 do-build-mono-mcs: mcs-do-clean
80 cd runtime && $(MAKE) clean-local
81 cd mono/tests && $(MAKE) clean
83 cd runtime && $(MAKE) check-local
84 cd mono/tests && $(MAKE) check
86 .PHONY: compiler-tests mcs-do-compiler-tests
88 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
89 mcs-do-compiler-tests:
90 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
92 .PHONY: bootstrap-world
93 bootstrap-world: compiler-tests
97 monotouch-do-build: config.h
98 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
100 xmono ) target="monotouch-do-build";; \
103 echo "Making $$target in $$subdir"; \
104 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
106 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
109 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
110 case "x$$subdir" in \
111 xmono ) target="monotouch-do-clean";; \
112 * ) target="clean";; \
114 echo "Making $$target in $$subdir"; \
115 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
117 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-clean)
122 -rm msvc/scripts/order
123 -rm msvc/scripts/order.xml
124 -rm -rf msvc/scripts/inputs
125 -mkdir msvc/scripts/inputs
126 (cd runtime; $(MAKE) V=1 extra_targets=csproj-local)
129 echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
130 echo '<root>' >> msvc/scripts/order.xml
131 for i in `cat msvc/scripts/order`; do \
132 set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
133 cat msvc/scripts/inputs/$$2.input | sed -e 's/\\\\/\\/g' -e 's/\\/\\\\/g' | \
134 (echo " <project dir=\"$$1\" library=\"$$2\">"; \
135 read boot; echo " <boot>$$boot</boot>"; \
136 read flags; echo " <flags>$$flags</flags>"; \
137 read sources;echo " <sources>$$sources</sources>"; \
138 read output; echo " <output>$$output</output>"; \
139 read built; echo " <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
140 read libou; echo " <library_output>$$libou</library_output>"; \
141 read fx_ver; echo " <fx_version>$$fx_ver</fx_version>"; \
142 read profile; echo " <profile>$$profile</profile>"; \
143 read resxt; echo " <resources>$$resxt</resources>"; \
144 read resp; echo " <response>$$resp</response>"; \
145 echo " </project>") >> msvc/scripts/order.xml; \
147 echo "</root>" >> msvc/scripts/order.xml
149 # Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
151 if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
152 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."
155 update-solution-files:
156 cd msvc/scripts && $(MAKE) genproj.exe || exit $$?;
157 $(MAKE) update-csproj
158 $(MAKE) package-inputs
159 (cd msvc/scripts; mono --debug genproj.exe $(GENPROJ_ARGS))
161 update-solution-files-with-tests:
162 $(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files