2004-05-01 Todd Berman <tberman@sevenl.net>
[mono.git] / Makefile.am
index b695a2c36c03cb018a10c5dbf9d5273a4ca45c15..2e5275cc52267c3e725ec97be3b5d7888c255c1d 100644 (file)
@@ -1,13 +1,20 @@
 AUTOMAKE_OPTIONS = foreign
 
-SUBDIRS = @libgc_dir@ mono doc docs runtime scripts man data samples
+SUBDIRS = @libgc_dir@ mono @ikvm_jni_dir@ docs runtime scripts man data samples support web
+
+# Keep in sync with SUBDIRS
+DIST_SUBDIRS = libgc mono ikvm-jni docs runtime scripts man data samples support web
 
 # EXTRA_SUBDIRS = libgc
 
 EXTRA_DIST= mono.pc.in mono.spec.in mint.pc.in
 
 pkgconfigdir = $(libdir)/pkgconfig
+if JIT_SUPPORTED
 pkgconfig_DATA= mono.pc mint.pc
+else
+pkgconfig_DATA= mint.pc
+endif
 DISTCLEANFILES= mono.pc mint.pc
 
 #
@@ -16,24 +23,32 @@ DISTCLEANFILES= mono.pc mint.pc
 # problems by doing the compilation in the right order.
 #
 
-fullbuild: remove-binaries mcs-tree-safe-build xinstall-runtime mcs-rest install
+mcs_topdir=$(top_srcdir)/../mcs
+
+.PHONY: fullbuild remove-binaries mcs-tree-safe-build xinstall-runtime mcs-rest
+
+fullbuild: mcs-rest
+       $(MAKE)
+       $(MAKE) install
 
-mcs-tree-safe-build:
-       (cd ../mcs/jay; $(MAKE))
-       (cd ../mcs/mcs; $(MAKE) MCS=mcs BOOTSTRAP_MCS=mcs)
-       (cd ../mcs/class/corlib; $(MAKE) MCS=mcs BOOTSTRAP_MCS=mcs)
-       cp ../mcs/class/lib/mscorlib.dll runtime
-       cp ../mcs/mcs/mcs.exe runtime
+mcs-tree-safe-build: remove-binaries
+       cd $(mcs_topdir)/jay && $(MAKE)
+       cd $(mcs_topdir)/mcs && $(MAKE) MCS=mcs BOOTSTRAP_MCS=mcs PROFILE=default
+       cd $(mcs_topdir)/class/corlib && $(MAKE) MCS=mcs BOOTSTRAP_MCS=mcs PROFILE=default
+       cp $(mcs_topdir)/class/lib/default/mscorlib.dll $(top_srcdir)/runtime/net_1_1
+       cp $(mcs_topdir)/mcs/mcs.exe $(top_srcdir)/runtime
 
-xinstall-runtime:
-       if echo $(SUBDIRS) | grep "libgc " > /dev/null; then (cd libgc; $(MAKE) && $(MAKE) install); fi
-       (cd mono; $(MAKE) && $(MAKE) install)
+xinstall-runtime: mcs-tree-safe-build $(CONFIG_HEADER)
+       if test -z "$(libgc_dir)"; then :; else cd libgc && $(MAKE) && $(MAKE) install ; fi
+       cd mono && $(MAKE) && $(MAKE) install
+       cd runtime && $(MAKE) dist_monobins_DATA=mcs.exe install-dist_monobinsDATA
+       cd runtime/net_1_1 && $(MAKE) install-dist_corlibDATA
 
-mcs-rest:
-       (cd ../mcs/class; $(MAKE))
+mcs-rest: xinstall-runtime
+       cd $(mcs_topdir) && $(MAKE)
 
 remove-binaries:
-       rm ../mcs/class/lib/mscorlib.dll ../mcs/mcs/mcs.exe runtime/*dll runtime/*.exe >& /dev/null; echo
+       rm -f $(mcs_topdir)/class/lib/default/mscorlib.dll $(mcs_topdir)/mcs/mcs.exe $(top_srcdir)/runtime/*/*.dll $(top_srcdir)/runtime/*.exe
 
 
 win32getdeps: