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/*'`
53 rm -rf "$(top_distdir)/external/linker/linker/Tests"
55 pkgconfigdir = $(libdir)/pkgconfig
56 noinst_DATA = mono-uninstalled.pc
57 DISTCLEANFILES= mono-uninstalled.pc
59 # building with monolite
60 .PHONY: get-monolite-latest
62 $(MAKE) -C $(mcs_topdir)/class get-monolite-latest
70 MONO_LLVMONLY=$(BITCODE_CHECK) $(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
72 .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
73 validate: do-build-mono-mcs
75 do-build-mono-mcs: mcs-do-clean
78 cd runtime && $(MAKE) clean-local
79 cd mono/tests && $(MAKE) clean
81 cd runtime && $(MAKE) check-local
82 cd mono/tests && $(MAKE) check
84 .PHONY: compiler-tests mcs-do-compiler-tests
86 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
87 mcs-do-compiler-tests:
88 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
90 .PHONY: bootstrap-world
91 bootstrap-world: compiler-tests
95 monotouch-do-build: config.h
96 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
98 xmono ) target="monotouch-do-build";; \
101 echo "Making $$target in $$subdir"; \
102 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
104 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
107 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
108 case "x$$subdir" in \
109 xmono ) target="monotouch-do-clean";; \
110 * ) target="clean";; \
112 echo "Making $$target in $$subdir"; \
113 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
115 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-clean)
120 -rm msvc/scripts/order
121 -rm msvc/scripts/order.xml
122 -rm -rf msvc/scripts/inputs
123 -mkdir msvc/scripts/inputs
124 (cd runtime; $(MAKE) V=1 extra_targets=csproj-local)
127 echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
128 echo '<root>' >> msvc/scripts/order.xml
129 for i in `cat msvc/scripts/order`; do \
130 set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
131 cat msvc/scripts/inputs/$$2.input | sed -e 's/\\\\/\\/g' -e 's/\\/\\\\/g' | \
132 (echo " <project dir=\"$$1\" library=\"$$2\">"; \
133 read boot; echo " <boot>$$boot</boot>"; \
134 read flags; echo " <flags>$$flags</flags>"; \
135 read output; echo " <output>$$output</output>"; \
136 read built; echo " <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
137 read libou; echo " <library_output>$$libou</library_output>"; \
138 read fx_ver; echo " <fx_version>$$fx_ver</fx_version>"; \
139 read profile; echo " <profile>$$profile</profile>"; \
140 read resxt; echo " <resources>$$resxt</resources>"; \
141 read resp; echo " <response>$$resp</response>"; \
142 echo " </project>") >> msvc/scripts/order.xml; \
144 echo "</root>" >> msvc/scripts/order.xml
146 # Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
148 if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
149 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."
152 update-solution-files:
153 $(MAKE) update-csproj
154 $(MAKE) package-inputs
155 (cd msvc/scripts; $(MAKE) genproj.exe; mono genproj.exe $(GENPROJ_ARGS))
157 update-solution-files-with-tests:
158 $(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files