[android] don't probe directories for .config files (#18024)
[mono-project.git] / Makefile.am
blobe050a6a8c5c00908ad7947d209cbadbcb9c7a418
1 ACLOCAL_AMFLAGS = -I m4
3 AM_CFLAGS = $(WERROR_CFLAGS)
5 SUBDIRS = @MONO_SUBDIRS@
6 DIST_SUBDIRS = $(SUBDIRS) m4 netcore netcore/corerun
8 if !ENABLE_NETCORE
10 all: $(update_submodules)
12 update_submodules:
13         @cd $(srcdir) && scripts/update_submodules.sh
15 .PHONY: update_submodules
17 EXTRA_DIST= \
18         README.md               \
19         LICENSE                 \
20         autogen.sh              \
21         mkinstalldirs           \
22         mono-uninstalled.pc.in  \
23         winconfig.h             \
24         code_of_conduct.md      \
25         external                \
26         netcore/Makefile        \
27         mcs/class/referencesource
29 DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_RUNTIME=false
31 # Distribute the 'mcs' tree too
32 GIT_DIR ?= $(srcdir)/.git
33 dist-hook:
34         test -d $(distdir)/mcs || mkdir $(distdir)/mcs
35         d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
36         rm -rf `find $(top_distdir)/external -path '*\.git'`
37         rm -rf `find $(top_distdir)/external -path '*\.libs'`
38         rm -rf `find $(top_distdir)/external -path '*\.deps'`
39         rm -f `find $(top_distdir)/external -path '*\.o'`
40         rm -f `find $(top_distdir)/external -path '*\.so'`
41         rm -f `find $(top_distdir)/external -path '*\.lo'`
42         rm -f `find $(top_distdir)/external -path '*\.Plo'`
43         rm -f `find $(top_distdir)/external -name '\.dirstamp'`
44         rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
45         rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*' -not -path '*/helix-binaries/*'`
46         rm -rf "$(top_distdir)/external/linker/test"
47         rm -rf "$(top_distdir)/external/llvm-project/lldb/test"
48         rm -rf "$(top_distdir)/external/llvm-project/libcxx/test"
49         rm -rf "$(top_distdir)/external/llvm-project/clang/test"
51 pkgconfigdir = $(libdir)/pkgconfig
52 noinst_DATA = mono-uninstalled.pc
53 DISTCLEANFILES= mono-uninstalled.pc
55 # building with monolite
56 .PHONY: get-monolite-latest 
57 get-monolite-latest:
58         $(MAKE) -C $(mcs_topdir)/class get-monolite-latest
60 if BITCODE
61 BITCODE_CHECK=yes
62 endif
64 if DEFAULT_TESTS
65 CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-default.sh
66 else
67 CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
68 endif
70 .PHONY: check-ci
71 check-ci:
72         MONO_LLVMONLY=$(BITCODE_CHECK) $(CI_TEST_SCRIPT)
74 .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
75 validate: do-build-mono-mcs
76         $(MAKE) mcs-do-tests
77 do-build-mono-mcs: mcs-do-clean
78         $(MAKE) all
79 mcs-do-clean:
80         cd runtime && $(MAKE) clean-local
81         cd mono/tests && $(MAKE) clean
82 mcs-do-tests:
83         cd runtime && $(MAKE) check-local
84         cd mono/tests && $(MAKE) check
86 .PHONY: compiler-tests mcs-do-compiler-tests
87 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
94         $(MAKE) install
96 update-csproj:
97         -rm msvc/scripts/order 
98         -rm msvc/scripts/order.xml
99         -rm -rf msvc/scripts/inputs
100         -mkdir msvc/scripts/inputs
101         (cd runtime; $(MAKE) V=1 extra_targets=csproj-local)
103 package-inputs:
104         echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
105         echo '<root>' >> msvc/scripts/order.xml
106         for i in `cat msvc/scripts/order`; do \
107                 set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
108                 cat msvc/scripts/inputs/$$2.input | sed -e 's/\\\\/\\/g' -e 's/\\/\\\\/g' | \
109                 (echo "    <project dir=\"$$1\" library=\"$$2\">"; \
110                  read boot;   echo "      <boot>$$boot</boot>"; \
111                  read flags;  echo "      <flags>$$flags</flags>"; \
112                  read sources;echo "      <sources>$$sources</sources>"; \
113                  read output; echo "      <output>$$output</output>"; \
114                  read built;  echo "      <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
115                  read libou;  echo "      <library_output>$$libou</library_output>"; \
116                  read fx_ver; echo "      <fx_version>$$fx_ver</fx_version>"; \
117                  read profile; echo "      <profile>$$profile</profile>"; \
118                  read resxt;  echo "      <resources>$$resxt</resources>"; \
119                  read resp;   echo "      <response>$$resp</response>"; \
120                  echo "    </project>") >> msvc/scripts/order.xml; \
121         done
122         echo "</root>" >> msvc/scripts/order.xml
124 # Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
125 update-llvm-version:
126         if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
127         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."
130 update-solution-files:
131         cd msvc/scripts && $(MAKE) genproj.exe || exit $$?;
132         $(MAKE) update-csproj
133         $(MAKE) package-inputs
134         (cd msvc/scripts; mono --debug genproj.exe $(GENPROJ_ARGS))
136 update-solution-files-with-tests:
137         $(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files
139 endif