1 AUTOMAKE_OPTIONS = foreign
4 SUBDIRS = @libgc_dir@ mono @ikvm_jni_dir@ docs runtime scripts man data samples support web
6 # Keep in sync with SUBDIRS
7 ## 'tools' is not normally built
8 DIST_SUBDIRS = libgc mono ikvm-jni docs runtime scripts man data samples support web tools
10 EXTRA_DIST= mono.pc.in mono.spec.in mint.pc.in
12 pkgconfigdir = $(libdir)/pkgconfig
14 pkgconfig_DATA= mono.pc mint.pc
16 pkgconfig_DATA= mint.pc
18 DISTCLEANFILES= mono.pc mint.pc
21 # The following targets are used to compile and install
22 # mono and mcs without running into the out-of-sync
23 # problems by doing the compilation in the right order.
26 mcs_topdir=$(top_srcdir)/../mcs
28 .PHONY: bootstrap faststrap fasterstrap bootstrap-clean bootstrap-check get-monolite-latest monolite-bootstrap
29 .PHONY: tmpinst-dir tmpinst-mcs-basic-build tmpinst-mcs-short-build tmpinst-mcs-full-build tmpinst-monolite
30 .PHONY: mono-do-runtime-only mcs-do-basic-build mcs-do-short-build mcs-do-full-build mcs-do-clean-profiles mcs-do-run-test
33 mono_runtime = mono/mini/mono
35 mono_runtime = mono/interpreter/mint
38 # Minimal set of directories to build, and files used to run the 'mcs' compiler
39 MCS_BASIC_DIRS = jay mcs class/corlib class/System
41 $(mcs_topdir)/mcs/mcs.exe \
42 $(mcs_topdir)/class/lib/default/mscorlib.dll \
43 $(mcs_topdir)/class/lib/default/System.dll
45 # Set of directories and files the 'mcs' compiler can use
46 ## We build class/System twice to resolve the cyclic dependency of class/System.XML
47 MCS_DIRS = $(MCS_BASIC_DIRS) class/System.XML class/System class/Mono.CSharp.Debugger
48 MCS_FILES = $(MCS_BASIC_FILES) \
49 $(mcs_topdir)/class/lib/default/System.Xml.dll \
50 $(mcs_topdir)/class/lib/default/Mono.CSharp.Debugger.dll
54 bootstrap: tmpinst-mcs-basic-build mono-do-runtime-only
55 $(MAKE) tmpinst-mcs-short-build
58 faststrap: tmpinst-mcs-short-build
59 $(MAKE) mono-do-runtime-only
62 .PHONY: populate-runtime-subdir
63 ## *** warning ***: tested only with GNU make
64 populate-runtime-subdir:
65 srcdir=`cd $(srcdir) && pwd`; tmpinst=`pwd`/$(tmpinst) ; \
66 PATH=$$tmpinst/bin:$$PATH ; export PATH ; \
68 && $(MAKE) PROGRAM_INSTALL_DIR=$$srcdir/runtime LIBRARY_INSTALL_DIR=$$srcdir/runtime/net_1_1 prefix=$$tmpinst/prefix PROFILE=default install \
69 && $(MAKE) PROGRAM_INSTALL_DIR=$$srcdir/runtime LIBRARY_INSTALL_DIR=$$srcdir/runtime/net_2_0 prefix=$$tmpinst/prefix PROFILE=net_2_0 install
70 test -z "`find $(tmpinst)/prefix -name '*.dll'`"
71 test -z "`find $(tmpinst)/prefix -name '*.exe'`"
72 set fnord `find $(tmpinst)/prefix -type f | wc -l` ; test "$$2" = 9
73 rm -rf $(tmpinst)/prefix
75 fasterstrap: tmpinst-mcs-full-build
76 $(MAKE) populate-runtime-subdir
79 bootstrap-clean: clean mcs-do-clean-profiles
80 bootstrap-check: check mcs-do-run-test
82 # building with monolite
85 wget -O $(srcdir)/../monolite-latest.tar.gz http://www.go-mono.com/daily/monolite-latest.tar.gz
87 monolite-bootstrap: tmpinst-monolite mono-do-runtime-only
89 $(MAKE) tmpinst-mcs-short-build
94 tmpinst-mcs-basic-build: mcs-do-basic-build tmpinst-dir
95 mv -f $(MCS_BASIC_FILES) $(tmpinst)/lib
97 tmpinst-mcs-short-build: mcs-do-short-build tmpinst-dir
98 mv -f $(MCS_FILES) $(tmpinst)/lib
100 tmpinst-mcs-full-build: mcs-do-full-build tmpinst-dir
101 cp -f $(MCS_FILES) $(tmpinst)/lib
103 tmpinst-monolite: tmpinst-dir
104 -rm -f $(tmpinst)/lib/mcs.exe $(tmpinst)/lib/*.dll
105 -rm -fr $(tmpinst)/monolite-*
106 srcdir=`cd $(srcdir) && pwd` && cd $(tmpinst) && ( gzip -d -c $$srcdir/../monolite-latest.tar.gz | tar xf - )
107 mv -f $(tmpinst)/monolite-*/mcs.exe $(tmpinst)/monolite-*/*.dll $(tmpinst)/lib
108 rm -fr $(tmpinst)/monolite-*
110 # Build enough of 'mono' to run the stage1 mcs.exe
111 mono-do-runtime-only: $(CONFIG_HEADER)
112 for dir in $(libgc_dir) mono data; do \
113 (cd $$dir && $(MAKE)) || exit 1 ; \
118 for dir in $(MCS_BASIC_DIRS); do \
119 (cd $(mcs_topdir)/$$dir && $(MAKE) PROFILE=default USE_BOOT_COMPILE=yes BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB") || exit 1 ; \
123 tmpinst=`cd $(tmpinst) && pwd` ; \
124 PATH=$$tmpinst/bin:$$PATH; export PATH ; \
125 for dir in $(MCS_DIRS); do \
126 (cd $(mcs_topdir)/$$dir && $(MAKE) PROFILE=default) || exit 1 ; \
130 tmpinst=`cd $(tmpinst) && pwd` ; \
131 PATH=$$tmpinst/bin:$$PATH ; export PATH ; \
132 cd $(mcs_topdir) && $(MAKE) all-profiles
134 mcs-do-clean-profiles:
135 cd $(mcs_topdir) && $(MAKE) clean-profiles
137 mcs-do-run-test: tmpinst-dir
138 tmpinst=`cd $(tmpinst) && pwd` ; \
139 PATH=$$tmpinst/bin:$$PATH ; export PATH ; \
140 cd $(mcs_topdir) && $(MAKE) PROFILE=default run-test
143 mkdir -p $(tmpinst) $(tmpinst)/bin $(tmpinst)/lib $(tmpinst)/etc/mono
144 $(MAKE) $(tmpinst)/bin/mono $(tmpinst)/bin/mcs $(tmpinst)/etc/mono/machine.config
146 $(tmpinst)/bin/mono: $(srcdir)/Makefile.am
147 echo '#! /bin/sh' > $@
148 echo 'builddir="'`pwd`'"; tmpinst=$$builddir/$(tmpinst)' >> $@
149 echo 'if test -z "$$MONO_PATH" ; then MONO_PATH=$$tmpinst/lib; else MONO_PATH=$${MONO_PATH}:$$tmpinst/lib ; fi' >> $@
150 echo 'MONO_CFG_DIR=$$tmpinst/etc' >> $@
151 echo 'export MONO_PATH MONO_CFG_DIR' >> $@
152 echo 'exec "$$builddir/libtool" --mode=execute "$$builddir/$(mono_runtime)" --config "$$builddir/data/config" "$$@"' >> $@
155 $(tmpinst)/bin/mcs: $(srcdir)/Makefile.am
156 (t=`cd $(tmpinst) && pwd`; echo '#! /bin/sh'; echo 'exec "'"$$t/bin/mono"'" "'"$$t/lib/mcs.exe"'" "$$@"') > $@
159 $(tmpinst)/etc/mono/machine.config: $(srcdir)/data/machine.config
161 srcdir=`cd $(srcdir) && pwd`; cd $(tmpinst)/etc/mono && $(LN_S) $$srcdir/data/machine.config machine.config
163 # Obsolete target -- don't use.
167 echo "*** 'fullbuild' is an obsolete target. Use 'make bootstrap && make install'."
171 wget http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip
172 wget http://www.go-mono.com/archive/glib-2.0.4-20020703.zip
173 wget http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip
174 wget http://www.go-mono.com/archive/libiconv-1.7.zip
175 wget http://www.go-mono.com/archive/libiconv-dev-1.7.zip
176 wget http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip
177 wget http://www.jroith.de/nsis4cygwin.zip
178 unzip -n -d / pkgconfig-0.11-20020310.zip
179 unzip -n -d / glib-2.0.4-20020703.zip
180 unzip -n -d / glib-dev-2.0.4-20020703.zip
181 unzip -n -d / libiconv-1.7.zip
182 unzip -n -d / libiconv-dev-1.7.zip
183 unzip -n -d / libintl-0.10.40-20020101.zip
184 unzip -n -d / nsis4cygwin.zip
187 makensis /DMILESTONE=$(VERSION) /DSOURCE_INSTALL_DIR=$(SOURCE_INSTALL_DIR) /DBUILDNUM=$(BUILDNUM) monowiz.win32.nsi