2003-12-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / build / rules.make
index 6e566392bfdd0edfce6b7eb5f0d9097255e4a552..63d947095aa799a5f748798419bce4f0a37d0e4b 100644 (file)
@@ -13,7 +13,7 @@
 dots := $(shell echo $(thisdir) |sed -e 's,[^./][^/]*,..,g')
 topdir := $(dots)
 
-VERSION = 0.25.99
+VERSION = 0.29.99
 
 USE_MCS_FLAGS = $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
 USE_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS)
@@ -25,6 +25,7 @@ INSTALL_BIN = $(INSTALL) -m 755
 INSTALL_LIB = $(INSTALL_BIN)
 MKINSTALLDIRS = $(SHELL) $(topdir)/mkinstalldirs
 INTERNAL_MCS = $(RUNTIME) $(topdir)/mcs/mcs.exe
+corlib = mscorlib.dll
 
 depsdir = $(topdir)/build/deps
 distdir = $(dots)/$(package)/$(thisdir)
@@ -42,6 +43,7 @@ export MKINSTALLDIRS
 export TEST_HARNESS
 export BOOTSTRAP_MCS
 export DESTDIR
+export RESGEN
 
 # Get this so the platform.make platform-check rule doesn't become the
 # default target
@@ -64,32 +66,50 @@ PLATFORM = linux
 endif
 endif
 
-ifndef PROFILE
-PROFILE = default
+# Platform config
+
+include $(topdir)/build/platforms/$(PLATFORM).make
+
+ifdef PLATFORM_CORLIB
+corlib = $(PLATFORM_CORLIB)
+endif
+# Useful
+
+ifeq ($(PLATFORM_RUNTIME),$(RUNTIME))
+PLATFORM_MONO_NATIVE = yes
 endif
 
 # Rest of the configuration
 
-include $(topdir)/build/platforms/$(PLATFORM).make
+ifndef PROFILE
+PROFILE = default
+endif
+
 include $(topdir)/build/profiles/$(PROFILE).make
 -include $(topdir)/build/config.make
 
 # Simple rules
 
 %-recursive:
-       @for d in $(SUBDIRS) ; do \
+       @list='$(SUBDIRS)'; for d in $$list ; do \
            (cd $$d && $(MAKE) $*) || exit 1 ; \
        done
 
 # note: dist-local dep, extra subdirs, $* has become $@
 
 dist-recursive: dist-local
-       @for d in $(SUBDIRS) $(DIST_ONLY_SUBDIRS) ; do \
+       @list='$(SUBDIRS) $(DIST_ONLY_SUBDIRS)'; for d in $$list ; do \
            (cd $$d && $(MAKE) $@) || exit 1 ; \
        done
 
 # We do this manually to not have a make[1]: blah message (That is,
 # instead of using a '%: %-recursive %-local' construct.)
+#
+# Let the makefile override these for special situations (running checks
+# in the toplevel makefile, or a directory that needs to be built before
+# its subdirectories).
+
+ifndef OVERRIDE_BARE_TARGETS
 
 all: all-recursive all-local
 
@@ -97,10 +117,14 @@ install: install-recursive install-local
 
 test: test-recursive test-local
 
-run-test: run-test-recursive run-test-local
+run-test: run-test-recursive test-local run-test-local
 
 clean: clean-recursive clean-local
 
+uninstall: uninstall-recursive uninstall-local
+
+endif
+
 # Can only do this from the top dir
 # ## dist: dist-recursive dist-local
 
@@ -117,3 +141,8 @@ dist-default:
            dest=`dirname $(distdir)/$$f` ; \
            $(MKINSTALLDIRS) $$dest && cp $$f $$dest || exit 1 ; \
        done
+
+# Useful
+
+withmcs:
+       $(MAKE) MCS='$(INTERNAL_MCS)' BOOTSTRAP_MCS='$(INTERNAL_MCS)' all