[interp] Add missing exception checkpoints (#6917)
[mono-project.git] / Makefile.am
bloba517fbeb635c17a608be70a48b9e946f236feafb
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
8 if CROSS_COMPILING
9 tools_dir =
10 else
11 tools_dir = tools
12 endif
14 if BUILD_SUPPORT
15 support_dir = support
16 else
17 support_dir =
18 endif
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'
27 update_submodules:
28         @$(srcdir)/scripts/update_submodules.sh
30 .PHONY: update_submodules
32 EXTRA_DIST= \
33         README.md               \
34         LICENSE                 \
35         autogen.sh              \
36         mkinstalldirs           \
37         mono-uninstalled.pc.in  \
38         winconfig.h             \
39         code_of_conduct.md      \
40         external                \
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
47 dist-hook:
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 
61 get-monolite-latest:
62         $(MAKE) -C $(mcs_topdir)/class get-monolite-latest
64 if BITCODE
65 BITCODE_CHECK=yes
66 endif
68 .PHONY: check-ci
69 check-ci:
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
74         $(MAKE) mcs-do-tests
75 do-build-mono-mcs: mcs-do-clean
76         $(MAKE) all
77 mcs-do-clean:
78         cd runtime && $(MAKE) clean-local
79         cd mono/tests && $(MAKE) clean
80 mcs-do-tests:
81         cd runtime && $(MAKE) check-local
82         cd mono/tests && $(MAKE) check
84 .PHONY: compiler-tests mcs-do-compiler-tests
85 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
92         $(MAKE) install
94 if INSTALL_MONOTOUCH
95 monotouch-do-build: config.h
96         @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
97           case "x$$subdir" in \
98                 xmono ) target="monotouch-do-build";; \
99                 * ) target="all";; \
100           esac; \
101           echo "Making $$target in $$subdir"; \
102           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
103         done;
104         (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
106 monotouch-do-clean:
107         @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
108           case "x$$subdir" in \
109                 xmono ) target="monotouch-do-clean";; \
110                 * ) target="clean";; \
111           esac; \
112           echo "Making $$target in $$subdir"; \
113           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
114         done;
115         (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-clean)
117 endif
119 update-csproj:
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)
126 package-inputs:
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; \
143         done
144         echo "</root>" >> msvc/scripts/order.xml
146 # Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
147 update-llvm-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