[xbuild] Add $(TargetFrameworkDirectory) for msbuild compatibility.
[mono.git] / Makefile.am
1 AUTOMAKE_OPTIONS = foreign
2 ACLOCAL_AMFLAGS = -I .
3
4 MOONLIGHT_SUBDIRS =    $(libgc_dir) $(eglib_dir) mono $(ikvm_native_dir)         data
5
6 if CROSS_COMPILING
7 SUBDIRS = po $(libgc_dir) $(eglib_dir) mono $(ikvm_native_dir) data runtime scripts man samples web 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 web tools msvc docs
11 else
12 if ONLY_MOONLIGHT
13 SUBDIRS = $(MOONLIGHT_SUBDIRS) runtime
14 else
15 SUBDIRS = po $(libgc_dir) $(eglib_dir) mono $(ikvm_native_dir) support data runtime scripts man samples web 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 web tools msvc docs
19 endif
20 endif
21
22 EXTRA_DIST= nls.m4 po.m4 progtest.m4 mono-uninstalled.pc.in build-mingw32.sh LICENSE mkinstalldirs autogen.sh 
23
24 DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
25
26 # Distribute the 'mcs' tree too
27 dist-hook:
28         ./scripts/commits-to-changelog.py --root=$(distdir) last-commit-with-compulsory-changelog-entry
29         test -d $(distdir)/mcs || mkdir $(distdir)/mcs
30         d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
31
32 pkgconfigdir = $(libdir)/pkgconfig
33 noinst_DATA = mono-uninstalled.pc
34 DISTCLEANFILES= mono-uninstalled.pc
35
36 # building with monolite
37 mcslib = $(mcs_topdir)/class/lib
38 monolite = $(mcslib)/monolite
39 monolite_url = http://mono.ximian.com/daily/monolite-latest.tar.gz
40 .PHONY: get-monolite-latest 
41 get-monolite-latest:
42         -rm -fr $(mcslib)/monolite-*
43         -mkdir -p $(mcslib)
44         test ! -d $(monolite) || test ! -d $(monolite).old || rm -fr $(monolite).old
45         test ! -d $(monolite) || mv -f $(monolite) $(monolite).old
46         cd $(mcslib) && { (wget -O- $(monolite_url) || curl $(monolite_url)) | gzip -d | tar xf - ; }
47         cd $(mcslib) && mv -f monolite-* monolite
48
49 .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
50 validate: do-build-mono-mcs
51         $(MAKE) mcs-do-tests
52 do-build-mono-mcs: mcs-do-clean
53         $(MAKE) all
54 mcs-do-clean:
55         cd runtime && $(MAKE) clean-local
56         cd mono/tests && $(MAKE) clean
57 mcs-do-tests:
58         cd runtime && $(MAKE) check-local
59         cd mono/tests && $(MAKE) check
60
61 .PHONY: compiler-tests mcs-do-compiler-tests
62 compiler-tests:
63         $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
64 mcs-do-compiler-tests:
65         $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
66
67 .PHONY: bootstrap-world
68 bootstrap-world: compiler-tests
69         $(MAKE) install
70
71 if MOONLIGHT
72 moon-do-build: config.h
73         @list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
74           echo "Making all in $$subdir"; \
75           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) all); \
76         done;
77         cd $(mcs_topdir) && NO_DIR_CHECK=1 $(MAKE) PROFILE=moonlight_raw all
78
79 moon-do-clean:
80         @list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
81           echo "Making clean in $$subdir"; \
82           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean); \
83         done;
84         cd $(mcs_topdir) && NO_DIR_CHECK=1 $(MAKE) PROFILE=moonlight_raw clean
85 endif
86
87 win32getdeps:
88         wget http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip
89         wget http://www.go-mono.com/archive/glib-2.0.4-20020703.zip 
90         wget http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip 
91         wget http://www.go-mono.com/archive/libiconv-1.7.zip 
92         wget http://www.go-mono.com/archive/libiconv-dev-1.7.zip 
93         wget http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip
94         unzip -n -d / pkgconfig-0.11-20020310.zip
95         unzip -n -d / glib-2.0.4-20020703.zip
96         unzip -n -d / glib-dev-2.0.4-20020703.zip
97         unzip -n -d / libiconv-1.7.zip
98         unzip -n -d / libiconv-dev-1.7.zip
99         unzip -n -d / libintl-0.10.40-20020101.zip
100
101 win32setup:
102         makensis /DMILESTONE=$(VERSION) /DSOURCE_INSTALL_DIR=$(SOURCE_INSTALL_DIR) /DBUILDNUM=$(BUILDNUM) monowiz.win32.nsi
103
104 patch-quiet:
105         find mono -name Makefile -exec scripts/patch-quiet.sh {} \;
106         find libgc -name Makefile -exec scripts/patch-quiet.sh {} \;
107
108 update-csproj:
109         -rm msvc/scripts/order 
110         -mkdir msvc/scripts/inputs
111         (cd runtime; make V=1 extra_targets=csproj-local)
112
113 package-inputs:
114         echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
115         echo '<root>' >> msvc/scripts/order.xml
116         for i in `cat msvc/scripts/order`; do \
117                 set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
118                 cat msvc/scripts/inputs/$$2.input | \
119                 (echo "    <project dir=\"$$1\" library=\"$$2\">"; \
120                  read boot;   echo "      <boot>$$boot</boot>"; \
121                  read mcs;    echo "      <mcs>$$mcs</mcs>"; \
122                  read flags;  echo "      <flags>$$flags</flags>"; \
123                  read output; echo "      <output>$$output</output>"; \
124                  read built;  echo "      <built_sources>$$built</built_sources>"; \
125                  read libou;  echo "      <library_output>$$libou</library_output>"; \
126                  read resp;   echo "      <response>$$resp</response>"; \
127                 echo "    </project>") >> msvc/scripts/order.xml; \
128         done
129         echo "</root>" >> msvc/scripts/order.xml