[WCF] fix ChannelDispatcher by accepting InstanceProvider (#7909)
[mono-project.git] / Makefile.am
blob7165f466e63bd9d94b83c2e20b55523c7cbf018b
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 SUBDIRS = po $(libgc_dir) mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) msvc $(docs_dir) acceptance-tests llvm
15 # Keep in sync with SUBDIRS
16 DIST_SUBDIRS = m4 po $(libgc_dir) mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests llvm
18 all: update_submodules
20 SUBMODULE_ERROR='Could not recursively update all git submodules. You may experience compilation problems if some submodules are out of date'
21 update_submodules:
22         @$(srcdir)/scripts/update_submodules.sh
24 .PHONY: update_submodules
26 EXTRA_DIST= \
27         README.md               \
28         LICENSE                 \
29         autogen.sh              \
30         mkinstalldirs           \
31         mono-uninstalled.pc.in  \
32         winconfig.h             \
33         code_of_conduct.md      \
34         external                \
35         mcs/class/referencesource
37 DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
39 # Distribute the 'mcs' tree too
40 GIT_DIR ?= $(srcdir)/.git
41 dist-hook:
42         test -d $(distdir)/mcs || mkdir $(distdir)/mcs
43         d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
44         rm -rf `find $(top_distdir)/external -path '*\.git'`
45         rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
46         rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*'`
47         rm -rf "$(top_distdir)/external/linker/linker/Tests"
49 pkgconfigdir = $(libdir)/pkgconfig
50 noinst_DATA = mono-uninstalled.pc
51 DISTCLEANFILES= mono-uninstalled.pc
53 # building with monolite
54 .PHONY: get-monolite-latest 
55 get-monolite-latest:
56         $(MAKE) -C $(mcs_topdir)/class get-monolite-latest
58 if BITCODE
59 BITCODE_CHECK=yes
60 endif
62 .PHONY: check-ci
63 check-ci:
64         MONO_LLVMONLY=$(BITCODE_CHECK) $(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
66 .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
67 validate: do-build-mono-mcs
68         $(MAKE) mcs-do-tests
69 do-build-mono-mcs: mcs-do-clean
70         $(MAKE) all
71 mcs-do-clean:
72         cd runtime && $(MAKE) clean-local
73         cd mono/tests && $(MAKE) clean
74 mcs-do-tests:
75         cd runtime && $(MAKE) check-local
76         cd mono/tests && $(MAKE) check
78 .PHONY: compiler-tests mcs-do-compiler-tests
79 compiler-tests:
80         $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
81 mcs-do-compiler-tests:
82         $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
84 .PHONY: bootstrap-world
85 bootstrap-world: compiler-tests
86         $(MAKE) install
88 if INSTALL_MONOTOUCH
89 monotouch-do-build: config.h
90         @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
91           case "x$$subdir" in \
92                 xmono ) target="monotouch-do-build";; \
93                 * ) target="all";; \
94           esac; \
95           echo "Making $$target in $$subdir"; \
96           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
97         done;
98         (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
100 monotouch-do-clean:
101         @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
102           case "x$$subdir" in \
103                 xmono ) target="monotouch-do-clean";; \
104                 * ) target="clean";; \
105           esac; \
106           echo "Making $$target in $$subdir"; \
107           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
108         done;
109         (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-clean)
111 endif
113 update-csproj:
114         -rm msvc/scripts/order 
115         -rm msvc/scripts/order.xml
116         -rm -rf msvc/scripts/inputs
117         -mkdir msvc/scripts/inputs
118         (cd runtime; $(MAKE) V=1 extra_targets=csproj-local)
120 package-inputs:
121         echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
122         echo '<root>' >> msvc/scripts/order.xml
123         for i in `cat msvc/scripts/order`; do \
124                 set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
125                 cat msvc/scripts/inputs/$$2.input | sed -e 's/\\\\/\\/g' -e 's/\\/\\\\/g' | \
126                 (echo "    <project dir=\"$$1\" library=\"$$2\">"; \
127                  read boot;   echo "      <boot>$$boot</boot>"; \
128                  read flags;  echo "      <flags>$$flags</flags>"; \
129                  read output; echo "      <output>$$output</output>"; \
130                  read built;  echo "      <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
131                  read libou;  echo "      <library_output>$$libou</library_output>"; \
132                  read fx_ver; echo "      <fx_version>$$fx_ver</fx_version>"; \
133                  read profile; echo "      <profile>$$profile</profile>"; \
134                  read resxt;  echo "      <resources>$$resxt</resources>"; \
135                  read resp;   echo "      <response>$$resp</response>"; \
136                  echo "    </project>") >> msvc/scripts/order.xml; \
137         done
138         echo "</root>" >> msvc/scripts/order.xml
140 # Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
141 update-llvm-version:
142         if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
143         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."
146 update-solution-files:
147         (pushd msvc/scripts; rm genproj.exe; $(MAKE) genproj.exe; popd)
148         $(MAKE) update-csproj
149         $(MAKE) package-inputs
150         (cd msvc/scripts; mono --debug genproj.exe $(GENPROJ_ARGS))
152 update-solution-files-with-tests:
153         $(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files