[sdks] Disable excluding assets from archive
[mono-project.git] / Makefile.am
bloba16d23045299d512a6f1452ddbc1ecbd169328bd
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 ENABLE_MSVC
15 build_with_msvc = msvc
16 build_without_msvc =
17 else
18 build_with_msvc =
19 build_without_msvc = msvc
20 endif
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 update_submodules:
29         @cd $(srcdir) && scripts/update_submodules.sh
31 .PHONY: update_submodules
33 EXTRA_DIST= \
34         README.md               \
35         LICENSE                 \
36         autogen.sh              \
37         mkinstalldirs           \
38         mono-uninstalled.pc.in  \
39         winconfig.h             \
40         code_of_conduct.md      \
41         external                \
42         mcs/class/referencesource
44 DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
46 # Distribute the 'mcs' tree too
47 GIT_DIR ?= $(srcdir)/.git
48 dist-hook:
49         test -d $(distdir)/mcs || mkdir $(distdir)/mcs
50         d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
51         rm -rf `find $(top_distdir)/external -path '*\.git'`
52         rm -rf `find $(top_distdir)/external -path '*\.libs'`
53         rm -rf `find $(top_distdir)/external -path '*\.deps'`
54         rm -f `find $(top_distdir)/external -path '*\.o'`
55         rm -f `find $(top_distdir)/external -path '*\.so'`
56         rm -f `find $(top_distdir)/external -path '*\.lo'`
57         rm -f `find $(top_distdir)/external -path '*\.Plo'`
58         rm -f `find $(top_distdir)/external -name '\.dirstamp'`
59         rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
60         rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*' -not -path '*/helix-binaries/*'`
61         rm -rf "$(top_distdir)/external/linker/test"
63 pkgconfigdir = $(libdir)/pkgconfig
64 noinst_DATA = mono-uninstalled.pc
65 DISTCLEANFILES= mono-uninstalled.pc
67 # building with monolite
68 .PHONY: get-monolite-latest 
69 get-monolite-latest:
70         $(MAKE) -C $(mcs_topdir)/class get-monolite-latest
72 if BITCODE
73 BITCODE_CHECK=yes
74 endif
76 if DEFAULT_TESTS
77 CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-default.sh
78 else
79 CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
80 endif
82 .PHONY: check-ci
83 check-ci:
84         MONO_LLVMONLY=$(BITCODE_CHECK) $(CI_TEST_SCRIPT)
86 .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
87 validate: do-build-mono-mcs
88         $(MAKE) mcs-do-tests
89 do-build-mono-mcs: mcs-do-clean
90         $(MAKE) all
91 mcs-do-clean:
92         cd runtime && $(MAKE) clean-local
93         cd mono/tests && $(MAKE) clean
94 mcs-do-tests:
95         cd runtime && $(MAKE) check-local
96         cd mono/tests && $(MAKE) check
98 .PHONY: compiler-tests mcs-do-compiler-tests
99 compiler-tests:
100         $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
101 mcs-do-compiler-tests:
102         $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
104 .PHONY: bootstrap-world
105 bootstrap-world: compiler-tests
106         $(MAKE) install
108 if INSTALL_MONOTOUCH
109 monotouch-do-build: config.h
110         @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
111           case "x$$subdir" in \
112                 xmono ) target="monotouch-do-build";; \
113                 * ) target="all";; \
114           esac; \
115           echo "Making $$target in $$subdir"; \
116           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
117         done;
118         (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
120 monotouch-do-clean:
121         @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
122           case "x$$subdir" in \
123                 xmono ) target="monotouch-do-clean";; \
124                 * ) target="clean";; \
125           esac; \
126           echo "Making $$target in $$subdir"; \
127           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
128         done;
129         (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-clean)
131 endif
133 update-csproj:
134         -rm msvc/scripts/order 
135         -rm msvc/scripts/order.xml
136         -rm -rf msvc/scripts/inputs
137         -mkdir msvc/scripts/inputs
138         (cd runtime; $(MAKE) V=1 extra_targets=csproj-local)
140 package-inputs:
141         echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
142         echo '<root>' >> msvc/scripts/order.xml
143         for i in `cat msvc/scripts/order`; do \
144                 set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
145                 cat msvc/scripts/inputs/$$2.input | sed -e 's/\\\\/\\/g' -e 's/\\/\\\\/g' | \
146                 (echo "    <project dir=\"$$1\" library=\"$$2\">"; \
147                  read boot;   echo "      <boot>$$boot</boot>"; \
148                  read flags;  echo "      <flags>$$flags</flags>"; \
149                  read sources;echo "      <sources>$$sources</sources>"; \
150                  read output; echo "      <output>$$output</output>"; \
151                  read built;  echo "      <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
152                  read libou;  echo "      <library_output>$$libou</library_output>"; \
153                  read fx_ver; echo "      <fx_version>$$fx_ver</fx_version>"; \
154                  read profile; echo "      <profile>$$profile</profile>"; \
155                  read resxt;  echo "      <resources>$$resxt</resources>"; \
156                  read resp;   echo "      <response>$$resp</response>"; \
157                  echo "    </project>") >> msvc/scripts/order.xml; \
158         done
159         echo "</root>" >> msvc/scripts/order.xml
161 # Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
162 update-llvm-version:
163         if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
164         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."
167 update-solution-files:
168         cd msvc/scripts && $(MAKE) genproj.exe || exit $$?;
169         $(MAKE) update-csproj
170         $(MAKE) package-inputs
171         (cd msvc/scripts; mono --debug genproj.exe $(GENPROJ_ARGS))
173 update-solution-files-with-tests:
174         $(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files