2004-11-08 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / Makefile
index 6a0caf3bd3baee048e036b78a335f13c9262f601..cdc526c608c8c8e55121d5e487759b33c7cd310e 100644 (file)
@@ -1,22 +1,28 @@
 thisdir := .
 
 SUBDIRS := build jay mcs monoresgen class mbas nunit20 ilasm tools tests errors docs
+DIST_ONLY_SUBDIRS := gmcs
+
+bootstrap_dirs := class
+net_1_1_bootstrap_SUBDIRS := $(bootstrap_dirs)
+net_2_0_bootstrap_SUBDIRS := $(bootstrap_dirs)
+net_2_0_SUBDIRS := gmcs class tests errors tools
 
 ifdef TEST_SUBDIRS
-SUBDIRS := $(TEST_SUBDIRS)
+$(PROFILE)_SUBDIRS := $(TEST_SUBDIRS)
 endif
 
-ifndef NO_SIGN_ASSEMBLIES
 OVERRIDE_TARGET_ALL = yes
-endif
 
 include build/rules.make
 
 all-recursive $(STD_TARGETS:=-recursive): platform-check profile-check
 
-# Used only if OVERRIDE_TARGET_ALL is defined
+# Used when OVERRIDE_TARGET_ALL is defined
 all.override:
+ifndef NO_SIGN_ASSEMBLY
        $(MAKE) NO_SIGN_ASSEMBLY=yes all.real
+endif
        $(MAKE) all.real
 
 .PHONY: all-local $(STD_TARGETS:=-local)
@@ -25,10 +31,21 @@ all-local $(STD_TARGETS:=-local):
 
 # fun specialty targets
 
+PROFILES = default net_2_0
+
 .PHONY: all-profiles $(STD_TARGETS:=-profiles)
 all-profiles $(STD_TARGETS:=-profiles):
-       $(MAKE) PROFILE=default $(@:-profiles=)
-       $(MAKE) PROFILE=net_2_0 $(@:-profiles=)
+       $(MAKE) $(PROFILES:%=profile-do--%--$(@:-profiles=))
+
+# The % below looks like profile-name--target-name
+profile-do--%:
+       $(MAKE) PROFILE=$(subst --, ,$*)
+
+# Ensure these don't run in parallel, for now.
+profile-do--net_2_0--run-test: profile-do--default--run-test
+
+profile-do--net_2_0--all: profile-do--net_2_0_bootstrap--all
+profile-do--net_2_0_bootstrap--all: profile-do--default--all
 
 testcorlib:
        @cd class/corlib && $(MAKE) test run-test
@@ -36,12 +53,11 @@ testcorlib:
 compiler-tests:
        $(MAKE) TEST_SUBDIRS="tests errors" run-test-profiles
 
-# Disting. We need to override $(distdir) here.
+test-installed-compiler:
+       $(MAKE) TEST_SUBDIRS="tests errors" PROFILE=default TEST_RUNTIME=mono MCS=mcs run-test
+       $(MAKE) TEST_SUBDIRS="tests errors" PROFILE=net_2_0 TEST_RUNTIME=mono MCS=gmcs run-test
 
 package := mcs-$(VERSION)
-top_distdir = $(dots)/$(package)
-distdir = $(top_distdir)
-export package
 
 DISTFILES = \
        AUTHORS                 \
@@ -60,15 +76,14 @@ DISTFILES = \
        ScalableMonoIcon.svg    \
        winexe.in
 
-
 dist-local: dist-default
-dist-recursive: dist-pre
 
 dist-pre:
        rm -rf $(package)
        mkdir $(package)
 
-dist-tarball: dist-recursive
+dist-tarball: dist-pre
+       $(MAKE) distdir='$(package)' dist-recursive
        tar cvzf $(package).tar.gz $(package)
 
 dist: dist-tarball