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
20 SUBDIRS = po $(libgc_dir) mono $(ikvm_native_dir) $(support_dir) data runtime scripts man samples $(tools_dir) msvc $(docs_dir) acceptance-tests llvm
21 # Keep in sync with SUBDIRS
22 DIST_SUBDIRS = m4 po $(libgc_dir) mono ikvm-native $(support_dir) data runtime scripts man samples tools msvc docs acceptance-tests llvm
24 all: update_submodules
26 SUBMODULE_ERROR='Could not recursively update all git submodules. You may experience compilation problems if some submodules are out of date'
28 @$(srcdir)/scripts/update_submodules.sh
30 .PHONY: update_submodules
37 mono-uninstalled.pc.in \
41 mcs/class/referencesource
43 DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
45 # Distribute the 'mcs' tree too
46 GIT_DIR ?= $(srcdir)/.git
48 test -d $(distdir)/mcs || mkdir $(distdir)/mcs
49 d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
50 rm -rf `find $(top_distdir)/external -path '*\.git'`
51 rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
52 rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*'`
54 pkgconfigdir = $(libdir)/pkgconfig
55 noinst_DATA = mono-uninstalled.pc
56 DISTCLEANFILES= mono-uninstalled.pc
58 # building with monolite
59 .PHONY: get-monolite-latest
61 $(MAKE) -C $(mcs_topdir)/class get-monolite-latest
69 MONO_LLVMONLY=$(BITCODE_CHECK) $(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
71 .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
72 validate: do-build-mono-mcs
74 do-build-mono-mcs: mcs-do-clean
77 cd runtime && $(MAKE) clean-local
78 cd mono/tests && $(MAKE) clean
80 cd runtime && $(MAKE) check-local
81 cd mono/tests && $(MAKE) check
83 .PHONY: compiler-tests mcs-do-compiler-tests
85 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
86 mcs-do-compiler-tests:
87 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
89 .PHONY: bootstrap-world
90 bootstrap-world: compiler-tests
94 monotouch-do-build: config.h
95 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
97 xmono ) target="monotouch-do-build";; \
100 echo "Making $$target in $$subdir"; \
101 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
103 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
106 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
107 case "x$$subdir" in \
108 xmono ) target="monotouch-do-clean";; \
109 * ) target="clean";; \
111 echo "Making $$target in $$subdir"; \
112 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
114 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-clean)
119 -rm msvc/scripts/order
120 -rm msvc/scripts/order.xml
121 -rm -rf msvc/scripts/inputs
122 -mkdir msvc/scripts/inputs
123 (cd runtime; make V=1 extra_targets=csproj-local)
126 echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
127 echo '<root>' >> msvc/scripts/order.xml
128 for i in `cat msvc/scripts/order`; do \
129 set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
130 cat msvc/scripts/inputs/$$2.input | sed -e 's/\\\\/\\/g' -e 's/\\/\\\\/g' | \
131 (echo " <project dir=\"$$1\" library=\"$$2\">"; \
132 read boot; echo " <boot>$$boot</boot>"; \
133 read flags; echo " <flags>$$flags</flags>"; \
134 read output; echo " <output>$$output</output>"; \
135 read built; echo " <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
136 read libou; echo " <library_output>$$libou</library_output>"; \
137 read fx_ver; echo " <fx_version>$$fx_ver</fx_version>"; \
138 read profile; echo " <profile>$$profile</profile>"; \
139 read resxt; echo " <resources>$$resxt</resources>"; \
140 read resp; echo " <response>$$resp</response>"; \
141 echo " </project>") >> msvc/scripts/order.xml; \
143 echo "</root>" >> msvc/scripts/order.xml
145 # Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
147 if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
148 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."
151 update-solution-files:
154 (cd msvc/scripts; make genproj.exe; mono genproj.exe $(GENPROJ_ARGS))
156 update-solution-files-with-tests:
157 make "GENPROJ_ARGS=2012 true true" update-solution-files