Backport gc_memmove and gc_bzero with all fixes together.
[mono-project.git] / Makefile.am
blobb5079153b8e860031a83b0cfd7280824caf092e7
1 AUTOMAKE_OPTIONS = foreign
2 ACLOCAL_AMFLAGS = -I .
4 MOONLIGHT_SUBDIRS = $(libgc_dir) eglib/src mono
6 if CROSS_COMPILING
7 SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) data runtime scripts man samples msvc $(docs_dir)
8 # Keep in sync with SUBDIRS
9 ## 'tools' is not normally built
10 DIST_SUBDIRS = po libgc eglib mono ikvm-native         data runtime scripts man samples tools msvc docs
11 else
12 if ONLY_MOONLIGHT
13 SUBDIRS = $(MOONLIGHT_SUBDIRS) runtime
14 else
15 SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir)
16 # Keep in sync with SUBDIRS
17 ## 'tools' is not normally built
18 DIST_SUBDIRS = po libgc eglib mono ikvm-native support data runtime scripts man samples tools msvc docs
19 endif
20 endif
22 EXTRA_DIST= \
23             LICENSE \
24             autogen.sh \
25             build-mingw32.sh \
26             mkinstalldirs \
27             mono-uninstalled.pc.in \
28             nls.m4 \
29             po.m4 \
30             progtest.m4 \
31             winconfig.h
33 DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
35 # Distribute the 'mcs' tree too
36 GIT_DIR ?= $(srcdir)/.git
37 dist-hook:
38         test -d $(distdir)/mcs || mkdir $(distdir)/mcs
39         d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
40         test ! -d $(GIT_DIR) || ./scripts/commits-to-changelog.py --root=$(distdir) last-commit-with-compulsory-changelog-entry
42 pkgconfigdir = $(libdir)/pkgconfig
43 noinst_DATA = mono-uninstalled.pc
44 DISTCLEANFILES= mono-uninstalled.pc
46 # building with monolite
47 mcslib = $(mcs_topdir)/class/lib
48 monolite = $(mcslib)/monolite
49 mono_corlib_version = $(shell sed -n "s/\#define MONO_CORLIB_VERSION //p" $(srcdir)/mono/metadata/appdomain.c)
50 monolite_url = http://mono.ximian.com/daily/monolite-$(mono_corlib_version)-latest.tar.gz
51 .PHONY: get-monolite-latest 
52 get-monolite-latest:
53         -rm -fr $(mcslib)/monolite-*
54         -mkdir -p $(mcslib)
55         test ! -d $(monolite) || test ! -d $(monolite).old || rm -fr $(monolite).old
56         test ! -d $(monolite) || mv -f $(monolite) $(monolite).old
57         cd $(mcslib) && { (wget -O- $(monolite_url) || curl $(monolite_url)) | gzip -d | tar xf - ; }
58         cd $(mcslib) && mv -f monolite-* monolite
60 .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
61 validate: do-build-mono-mcs
62         $(MAKE) mcs-do-tests
63 do-build-mono-mcs: mcs-do-clean
64         $(MAKE) all
65 mcs-do-clean:
66         cd runtime && $(MAKE) clean-local
67         cd mono/tests && $(MAKE) clean
68 mcs-do-tests:
69         cd runtime && $(MAKE) check-local
70         cd mono/tests && $(MAKE) check
72 .PHONY: compiler-tests mcs-do-compiler-tests
73 compiler-tests:
74         $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
75 mcs-do-compiler-tests:
76         $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
78 .PHONY: bootstrap-world
79 bootstrap-world: compiler-tests
80         $(MAKE) install
82 if MOONLIGHT
83 moon-do-build: config.h
84         @list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
85           case "x$$subdir" in \
86                 xmono ) target="moon-do-build";; \
87                 * ) target="all";; \
88           esac; \
89           echo "Making $$target in $$subdir"; \
90           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
91         done;
92         (cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-build)
94 moon-do-clean:
95         @list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
96           case "x$$subdir" in \
97                 xmono ) target="moon-do-clean";; \
98                 * ) target="clean";; \
99           esac; \
100           echo "Making $$target in $$subdir"; \
101           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
102         done;
103         (cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-clean)
105 endif
107 win32getdeps:
108         wget http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip
109         wget http://www.go-mono.com/archive/glib-2.0.4-20020703.zip 
110         wget http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip 
111         wget http://www.go-mono.com/archive/libiconv-1.7.zip 
112         wget http://www.go-mono.com/archive/libiconv-dev-1.7.zip 
113         wget http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip
114         unzip -n -d / pkgconfig-0.11-20020310.zip
115         unzip -n -d / glib-2.0.4-20020703.zip
116         unzip -n -d / glib-dev-2.0.4-20020703.zip
117         unzip -n -d / libiconv-1.7.zip
118         unzip -n -d / libiconv-dev-1.7.zip
119         unzip -n -d / libintl-0.10.40-20020101.zip
121 win32setup:
122         makensis /DMILESTONE=$(VERSION) /DSOURCE_INSTALL_DIR=$(SOURCE_INSTALL_DIR) /DBUILDNUM=$(BUILDNUM) monowiz.win32.nsi
124 patch-quiet:
125         find mono -name Makefile -exec scripts/patch-quiet.sh {} \;
126         find libgc -name Makefile -exec scripts/patch-quiet.sh {} \;
128 update-csproj:
129         -rm msvc/scripts/order 
130         -mkdir msvc/scripts/inputs
131         (cd runtime; make V=1 extra_targets=csproj-local)
133 package-inputs:
134         echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
135         echo '<root>' >> msvc/scripts/order.xml
136         for i in `cat msvc/scripts/order`; do \
137                 set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
138                 cat msvc/scripts/inputs/$$2.input | \
139                 (echo "    <project dir=\"$$1\" library=\"$$2\">"; \
140                  read boot;   echo "      <boot>$$boot</boot>"; \
141                  read mcs;    echo "      <mcs>$$mcs</mcs>"; \
142                  read flags;  echo "      <flags>$$flags</flags>"; \
143                  read output; echo "      <output>$$output</output>"; \
144                  read built;  echo "      <built_sources>$$built</built_sources>"; \
145                  read libou;  echo "      <library_output>$$libou</library_output>"; \
146                  read resp;   echo "      <response>$$resp</response>"; \
147                 echo "    </project>") >> msvc/scripts/order.xml; \
148         done
149         echo "</root>" >> msvc/scripts/order.xml