[mono-api-info] Take return type into account when comparing methods.
[mono.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2
3 AM_CFLAGS = $(WERROR_CFLAGS)
4
5 MONOTOUCH_SUBDIRS = $(libgc_dir) eglib/src mono
6
7 if CROSS_COMPILING
8 SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir) acceptance-tests
9 # Keep in sync with SUBDIRS
10 ## 'tools' is not normally built
11 DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests
12 else
13 SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir) acceptance-tests
14 # Keep in sync with SUBDIRS
15 ## 'tools' is not normally built
16 DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests
17 endif
18
19 all: update_submodules
20
21 SUBMODULE_ERROR='Could not recursively update all git submodules. You may experience compilation problems if some submodules are out of date'
22 update_submodules:
23         @$(srcdir)/scripts/update_submodules
24
25 .PHONY: update_submodules
26
27 EXTRA_DIST= \
28         README.md \
29             LICENSE \
30             autogen.sh \
31             mkinstalldirs \
32             mono-uninstalled.pc.in \
33             winconfig.h \
34             external
35
36 DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
37
38 # Distribute the 'mcs' tree too
39 GIT_DIR ?= $(srcdir)/.git
40 dist-hook:
41         test -d $(distdir)/mcs || mkdir $(distdir)/mcs
42         d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
43         rm -rf `find $(top_distdir)/external -path '*\.git'`
44         rm -f `find $(top_distdir)/external -path '*\.exe'`
45         rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*'`
46         cp mcs/class/lib/basic/System.Configuration.dll mcs/class/lib/monolite/
47         cp mcs/class/lib/basic/System.Security.dll mcs/class/lib/monolite/
48 # Disable this for now because it is very slow and causes wrench to timeout:
49 #       test ! -d $(GIT_DIR) || ./scripts/commits-to-changelog.py --root=$(distdir) last-commit-with-compulsory-changelog-entry
50
51 pkgconfigdir = $(libdir)/pkgconfig
52 noinst_DATA = mono-uninstalled.pc
53 DISTCLEANFILES= mono-uninstalled.pc
54
55 # building with monolite
56 mcslib = $(mcs_topdir)/class/lib
57 monolite = $(mcslib)/monolite
58 mono_corlib_version = $(shell sed -n "s/\#define MONO_CORLIB_VERSION //p" $(srcdir)/mono/metadata/appdomain.c)
59 monolite_url = http://download.mono-project.com/monolite/monolite-$(mono_corlib_version)-latest.tar.gz
60 .PHONY: get-monolite-latest 
61 get-monolite-latest:
62         -rm -fr $(mcslib)/monolite-*
63         -mkdir -p $(mcslib)
64         test ! -d $(monolite) || test ! -d $(monolite).old || rm -fr $(monolite).old
65         test ! -d $(monolite) || mv -f $(monolite) $(monolite).old
66         cd $(mcslib) && { (wget -O- $(monolite_url) || curl $(monolite_url)) | gzip -d | tar xf - ; }
67         cd $(mcslib) && mv -f monolite-* monolite
68
69 .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
70 validate: do-build-mono-mcs
71         $(MAKE) mcs-do-tests
72 do-build-mono-mcs: mcs-do-clean
73         $(MAKE) all
74 mcs-do-clean:
75         cd runtime && $(MAKE) clean-local
76         cd mono/tests && $(MAKE) clean
77 mcs-do-tests:
78         cd runtime && $(MAKE) check-local
79         cd mono/tests && $(MAKE) check
80
81 .PHONY: compiler-tests mcs-do-compiler-tests
82 compiler-tests:
83         $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
84 mcs-do-compiler-tests:
85         $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
86
87 .PHONY: bootstrap-world
88 bootstrap-world: compiler-tests
89         $(MAKE) install
90
91 if INSTALL_MONOTOUCH
92 monotouch-do-build: config.h
93         @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
94           case "x$$subdir" in \
95                 xmono ) target="monotouch-do-build";; \
96                 * ) target="all";; \
97           esac; \
98           echo "Making $$target in $$subdir"; \
99           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
100         done;
101         (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
102
103 monotouch-do-clean:
104         @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
105           case "x$$subdir" in \
106                 xmono ) target="monotouch-do-clean";; \
107                 * ) target="clean";; \
108           esac; \
109           echo "Making $$target in $$subdir"; \
110           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
111         done;
112         (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-clean)
113
114 endif
115
116 win32getdeps:
117         wget http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip
118         wget http://www.go-mono.com/archive/glib-2.0.4-20020703.zip 
119         wget http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip 
120         wget http://www.go-mono.com/archive/libiconv-1.7.zip 
121         wget http://www.go-mono.com/archive/libiconv-dev-1.7.zip 
122         wget http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip
123         unzip -n -d / pkgconfig-0.11-20020310.zip
124         unzip -n -d / glib-2.0.4-20020703.zip
125         unzip -n -d / glib-dev-2.0.4-20020703.zip
126         unzip -n -d / libiconv-1.7.zip
127         unzip -n -d / libiconv-dev-1.7.zip
128         unzip -n -d / libintl-0.10.40-20020101.zip
129
130 win32setup:
131         makensis /DMILESTONE=$(VERSION) /DSOURCE_INSTALL_DIR=$(SOURCE_INSTALL_DIR) /DBUILDNUM=$(BUILDNUM) monowiz.win32.nsi
132
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)
139
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 output; echo "      <output>$$output</output>"; \
150                  read built;  echo "      <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
151                  read libou;  echo "      <library_output>$$libou</library_output>"; \
152                  read fx_ver; echo "      <fx_version>$$fx_ver</fx_version>"; \
153                  read profile; echo "      <profile>$$profile</profile>"; \
154                  read resp;   echo "      <response>$$resp</response>"; \
155                  echo "    </project>") >> msvc/scripts/order.xml; \
156         done
157         echo "</root>" >> msvc/scripts/order.xml
158
159 # Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
160 update-llvm-version:
161         if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
162         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."
163
164