Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@hurrynot.org>2004-07-02 12:31:03 +0400
committerRaja R Harinath <harinath@hurrynot.org>2004-07-02 12:31:03 +0400
commit77c26d6ab9d017aa7546f0d65208d4ad40c661a4 (patch)
tree82f92b3899b3149e19c956d2e921024be059f7ff /mcs
parent8feefe364c32b7a820a96ae237883e816c52ee84 (diff)
* Makefile (OVERRIDE_BARE_TARGETS): Remove.
(OVERRIDE_TARGET_ALL): Define. (all-recursive,$(STD_TARGETS:=-recursive)): Depend on 'platform-check' and 'profile-check'. (all.override): New. Run two passes: once to build, and once to sign libraries. build/: * rules.make (OVERRIDE_BARE_TARGETS): Remove. (OVERRIDE_TARGET_ALL): New control for overriding the default all: rule. If set, 'make all' will run 'all.override' from the client Makefile. (all): Move commands ... (all.real): ... here. Make ordering assumptions explicit, and parallel-safe. (test,run-test,run-test-ondotnet,clean,install,uninstall): Consolidate into ... (STD_TARGETS): ... this new variable. Make ordering assumption between -recursive and -local targets explicit. (%-recursive): Handle W32 GNU make that has --unix as the first argument in $(MAKE). * README.makefiles (Special recursion needs): Update to reflect changes. * library.make (all-local): Build $(the_lib_signature_stamp) when NO_SIGN_ASSEMBLY is defined. ($(gacutil),$(sn)): Consolidate rules. (test-local,run-test-local,run-test-ondotnet-local): Likewise. class/: * IBM.Data.DB2/Makefile (all-local $(STD_TARGETS:=-local)): Simplify dummy rule somewhat. class/Npgsql/: * Makefile (OVERRIDE_BARE_TARGETS): Remove. ($(the_lib)): Make dependency explicit. class/corlib/: * Makefile ($(net20bootstrap_makefrag)): Build from net_2_0 profile response file. (gmcs): Style update. svn path=/trunk/mcs/; revision=30643
Diffstat (limited to 'mcs')
-rw-r--r--mcs/ChangeLog9
-rw-r--r--mcs/Makefile25
-rw-r--r--mcs/build/ChangeLog22
-rw-r--r--mcs/build/README.makefiles30
-rw-r--r--mcs/build/library.make23
-rw-r--r--mcs/build/rules.make44
-rw-r--r--mcs/class/ChangeLog5
-rw-r--r--mcs/class/IBM.Data.DB2/Makefile3
-rw-r--r--mcs/class/Npgsql/ChangeLog5
-rwxr-xr-xmcs/class/Npgsql/Makefile20
-rw-r--r--mcs/class/corlib/ChangeLog6
-rw-r--r--mcs/class/corlib/Makefile4
12 files changed, 96 insertions, 100 deletions
diff --git a/mcs/ChangeLog b/mcs/ChangeLog
index 121c9807947..3a92f62ec9e 100644
--- a/mcs/ChangeLog
+++ b/mcs/ChangeLog
@@ -1,3 +1,12 @@
+2004-07-02 Raja R Harinath <rharinath@novell.com>
+
+ * Makefile (OVERRIDE_BARE_TARGETS): Remove.
+ (OVERRIDE_TARGET_ALL): Define.
+ (all-recursive,$(STD_TARGETS:=-recursive)): Depend on
+ 'platform-check' and 'profile-check'.
+ (all.override): New. Run two passes: once to build, and once to
+ sign libraries.
+
2004-06-22 Todd Berman <tberman@off.net>
* configure: Patch from Mariano Suárez-Alvarez
diff --git a/mcs/Makefile b/mcs/Makefile
index 3d8978be03e..c2591932058 100644
--- a/mcs/Makefile
+++ b/mcs/Makefile
@@ -1,27 +1,16 @@
thisdir := .
SUBDIRS := build jay mcs monoresgen class mbas nunit20 ilasm tools tests errors docs
-OVERRIDE_BARE_TARGETS = hells yeah
+OVERRIDE_TARGET_ALL = yes
include build/rules.make
-# Define these ourselves to that the platform checks come first
+all-recursive $(STD_TARGETS:=-recursive): platform-check profile-check
-#all: platform-check profile-check all-recursive #all-local
+all.override:
+ $(MAKE) NO_SIGN_ASSEMBLY=yes all.real
+ $(MAKE) all.real
-.PHONY: all clean all-profiles clean-profiles install uninstall test run-test testcorlib
-
-all: platform-check profile-check all-recursive
-
-install: platform-check profile-check install-recursive #install-local
-
-uninstall: platform-check profile-check uninstall-recursive #uninstall-local
-
-test: platform-check profile-check test-recursive #test-local
-
-run-test: run-test-recursive #run-test-local
-
-run-test-ondotnet: run-test-ondotnet-recursive # run-test-ondotnet-local
-
-clean: clean-recursive #clean-local
+all-local $(STD_TARGETS:=-local):
+ @:
# fun specialty targets
diff --git a/mcs/build/ChangeLog b/mcs/build/ChangeLog
index 59fa8b8ac53..6b880531e45 100644
--- a/mcs/build/ChangeLog
+++ b/mcs/build/ChangeLog
@@ -1,5 +1,27 @@
2004-07-02 Raja R Harinath <rharinath@novell.com>
+ * rules.make (OVERRIDE_BARE_TARGETS): Remove.
+ (OVERRIDE_TARGET_ALL): New control for overriding the default all:
+ rule. If set, 'make all' will run 'all.override' from the client
+ Makefile.
+ (all): Move commands ...
+ (all.real): ... here. Make ordering assumptions explicit, and
+ parallel-safe.
+ (test,run-test,run-test-ondotnet,clean,install,uninstall):
+ Consolidate into ...
+ (STD_TARGETS): ... this new variable. Make ordering assumption
+ between -recursive and -local targets explicit.
+ (%-recursive): Handle W32 GNU make that has --unix as the first
+ argument in $(MAKE).
+ * README.makefiles (Special recursion needs): Update to reflect
+ changes.
+ * library.make (all-local): Build $(the_lib_signature_stamp) when
+ NO_SIGN_ASSEMBLY is defined.
+ ($(gacutil),$(sn)): Consolidate rules.
+ (test-local,run-test-local,run-test-ondotnet-local): Likewise.
+
+2004-07-02 Raja R Harinath <rharinath@novell.com>
+
* config-default.make (TEST_RUNTIME): Use 'mono' by default.
* platforms/win32.make (TEST_RUNTIME): Remove.
* profiles/default.make (TEST_RUNTIME): Remove.
diff --git a/mcs/build/README.makefiles b/mcs/build/README.makefiles
index 9132445cdf5..7460e88ff38 100644
--- a/mcs/build/README.makefiles
+++ b/mcs/build/README.makefiles
@@ -587,12 +587,13 @@ include ../../../build/executable.make
-* Special recursion needs? Use OVERRIDE_BARE_TARGETS
+* Special recursion needs?
By default, rules.make defines the all, install, clean, etc. targets
to look something like this:
- all: all-recursive all-local
+ all: all-recursive
+ $(MAKE) all-local
Sometimes that doesn't cut it; say for example you want to check for
something before doing a lengthy recursive build (see
@@ -611,15 +612,15 @@ strongly discouraged.)
Anyway, to solve this problem you can do
========================================
-OVERRIDE_BARE_TARGETS = yes
thisdir = class/MyLibrary
SUBDIRS = Test
include ../../build/rules.make
-# This is normally "all-recursive all-local"
-all: all-local all-recursive
+# Normally, make runs 'all-recursive' first, and then 'all-local'
+# With this, we ensure that 'all-local' is executed first.
+all-recursive: all-local
-test: test-local test-recursive
+test-recursive: test-local
...
========================================
@@ -630,16 +631,13 @@ test: test-local test-recursive
** A few implementation details
The way rules.make does its recursion is very standard; it maps
-{all,install,clean, dist,test} to $@-recursive, which executes that
-rule in each directory in $(SUBDIRS), and then calls $@-local in the
-current directory. So something that gets built in a subdirectory
-cannot rely on something that gets built in its parent directory. If
-this is a problem, see the bit about using OVERRIDE_BARE_TARGETS;
-since the recursive rules do $(MAKE) $* in their subdirectories,
-changing the 'all' target will do the right thing in a recursive
-build. Note that the recursive rule for 'dist' is different; it makes
-dist-recursive in subdirectories, so you at least have to define that
-rule, even if you use OVERRIDE_BARE_TARGETS.
+{all,install,clean, dist,test} to $@-recursive, which executes that rule
+in each directory in $(SUBDIRS), and then calls $@-local in the current
+directory. So something that gets built in a subdirectory cannot rely on
+something that gets built in its parent directory. If this is a problem,
+see the previous section. Note that the recursive rule for 'dist' is
+different; it makes dist-recursive in subdirectories, so you at least
+have to define that rule.
Note that even a directory that doesn't, for example, have any tests
must still define test-local; otherwise 'make test' run from the
diff --git a/mcs/build/library.make b/mcs/build/library.make
index bf0ed9c794d..5b04c686056 100644
--- a/mcs/build/library.make
+++ b/mcs/build/library.make
@@ -87,9 +87,7 @@ else
GACDIR = $(DESTDIR)$(prefix)/lib
endif
-all-local: $(the_lib)
-
-install-local: $(the_lib)
+all-local install-local test-local: $(the_lib)
ifdef LIBRARY_INSTALL_DIR
install-local:
@@ -107,13 +105,10 @@ install-local: $(gacutil)
uninstall-local: $(gacutil)
MONO_PATH="$(topdir)/class/lib/$(PROFILE):$$MONO_PATH" $(RUNTIME) $(gacutil) /u $(LIBRARY_NAME:.dll=)
-$(gacutil):
- cd $(topdir)/tools/gacutil && $(MAKE)
-
endif
ifndef NO_SIGN_ASSEMBLY
-install-local: $(the_lib_signature_stamp)
+all-local install-local: $(the_lib_signature_stamp)
ifndef LIBRARY_SNK
LIBRARY_SNK = $(topdir)/class/mono.snk
@@ -124,17 +119,10 @@ $(the_lib_signature_stamp): $(the_lib) $(sn)
echo stamp > $@
endif
-$(sn):
- cd $(topdir)/tools/security && $(MAKE) sn.exe
-
clean-local:
-rm -f $(library_CLEAN_FILES) $(CLEAN_FILES)
-test-local: $(the_lib)
- @:
-run-test-local:
- @:
-run-test-ondotnet-local:
+test-local run-test-local run-test-ondotnet-local:
@:
ifndef NO_TEST
@@ -205,7 +193,10 @@ ifndef BTEST_COMPILE
BTEST_COMPILE = $(BASCOMPILE)
endif
-# Fun with dependency tracking
+$(gacutil) $(sn):
+ cd $(@D) && $(MAKE) $(@F)
+
+# The library
$(the_lib): $(response)
$(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) /target:library /out:$@ @$(response)
diff --git a/mcs/build/rules.make b/mcs/build/rules.make
index 2ccedc96ac2..1aa11d54cd1 100644
--- a/mcs/build/rules.make
+++ b/mcs/build/rules.make
@@ -54,6 +54,7 @@ export RESGEN
# Get this so the platform.make platform-check rule doesn't become the
# default target
+.DEFAULT: all
default: all
# Get initial configuration. pre-config is so that the builder can
@@ -94,47 +95,34 @@ endif
include $(topdir)/build/profiles/$(PROFILE).make
-include $(topdir)/build/config.make
-# Simple rules
+ifdef OVERRIDE_TARGET_ALL
+all: all.override
+else
+all: all.real
+endif
+
+all.real: all-recursive
+ $(MAKE) all-local
+
+STD_TARGETS = test run-test run-test-ondotnet clean install uninstall
+
+$(STD_TARGETS): %: %-recursive
+ $(MAKE) $@-local
%-recursive:
@set . $$MAKEFLAGS; \
+ case $$2 in --unix) shift ;; esac; \
case $$2 in *=*) dk="exit 1" ;; *k*) dk=: ;; *) dk="exit 1" ;; esac; \
list='$(SUBDIRS)'; for d in $$list ; do \
(cd $$d && $(MAKE) $*) || $$dk ; \
done
-# note: dist-local dep, extra subdirs, $* has become $@
-
+# note: dist-local dep, extra subdirs, we invoke dist-recursive in the subdir too
dist-recursive: dist-local
@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
-
-install: install-recursive install-local
-
-test: test-recursive test-local
-
-run-test: run-test-recursive test-local run-test-local
-
-run-test-ondotnet: run-test-ondotnet-recursive test-local run-test-ondotnet-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
diff --git a/mcs/class/ChangeLog b/mcs/class/ChangeLog
index af4e56d2aac..970949c59c9 100644
--- a/mcs/class/ChangeLog
+++ b/mcs/class/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-02 Raja R Harinath <rharinath@novell.com>
+
+ * IBM.Data.DB2/Makefile (all-local $(STD_TARGETS:=-local)):
+ Simplify dummy rule somewhat.
+
2004-06-24 Raja R Harinath <rharinath@novell.com>
* IBM.Data.DB2/Makefile: Disable for 'net_2_0'.
diff --git a/mcs/class/IBM.Data.DB2/Makefile b/mcs/class/IBM.Data.DB2/Makefile
index adf7533c684..a057875f370 100644
--- a/mcs/class/IBM.Data.DB2/Makefile
+++ b/mcs/class/IBM.Data.DB2/Makefile
@@ -8,7 +8,8 @@ LIB_MCS_FLAGS = /unsafe /r:$(corlib) /r:System.dll \
NO_TEST = yes
ifeq (net_2_0, $(PROFILE))
-all-local install-local test-local run-test-local clean-local dist-local uninstall-local:
+all-local $(STD_TARGETS:=-local):
+ @:
else
include ../../build/library.make
endif
diff --git a/mcs/class/Npgsql/ChangeLog b/mcs/class/Npgsql/ChangeLog
index 95f175f439f..1ad96b0eebc 100644
--- a/mcs/class/Npgsql/ChangeLog
+++ b/mcs/class/Npgsql/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-02 Raja R Harinath <rharinath@novell.com>
+
+ * Makefile (OVERRIDE_BARE_TARGETS): Remove.
+ ($(the_lib)): Make dependency explicit.
+
2004-06-28 Raja R Harinath <rharinath@novell.com>
* Makefile (%.resources): Use $(RESGEN).
diff --git a/mcs/class/Npgsql/Makefile b/mcs/class/Npgsql/Makefile
index fae26173217..01f12cfdeed 100755
--- a/mcs/class/Npgsql/Makefile
+++ b/mcs/class/Npgsql/Makefile
@@ -1,9 +1,6 @@
thisdir = class/Npgsql
SUBDIRS =
-OVERRIDE_BARE_TARGETS = 1
-
-
include ../../build/rules.make
LIBRARY = Npgsql.dll
@@ -36,22 +33,7 @@ include ../../build/library.make
RESX_RES = Npgsql/NpgsqlState.resources Npgsql/NpgsqlClosedState.resources Npgsql/NpgsqlParameterCollection.resources Npgsql/NpgsqlCommand.resources Npgsql/NpgsqlConnectedState.resources Npgsql/NpgsqlParameter.resources Npgsql/NpgsqlConnection.resources Npgsql/NpgsqlReadyState.resources Npgsql/NpgsqlTransaction.resources Npgsql/NpgsqlEventLog.resources Npgsql/NpgsqlException.resources Npgsql/PGUtil.resources NpgsqlTypes/NpgsqlTypesHelper.resources Npgsql/Design/ConnectionStringEditorForm.resources
-all: $(RESX_RES) $(the_lib)
+$(the_lib): $(RESX_RES)
%.resources: %.resx
$(RESGEN) $<
-
-clean: clean-recursive clean-local
-
-install: install-recursive install-local
-
-uninstall: uninstall-recursive uninstall-local
-
-test: test-recursive test-local
-
-run-test: run-test-recursive test-local run-test-local
-
-clean: clean-recursive clean-local
-
-uninstall: uninstall-recursive uninstall-local
-
diff --git a/mcs/class/corlib/ChangeLog b/mcs/class/corlib/ChangeLog
index cabc990a89b..82cd0a15dcb 100644
--- a/mcs/class/corlib/ChangeLog
+++ b/mcs/class/corlib/ChangeLog
@@ -1,3 +1,9 @@
+2004-07-02 Raja R Harinath <rharinath@novell.com>
+
+ * Makefile ($(net20bootstrap_makefrag)): Build from net_2_0
+ profile response file.
+ (gmcs): Style update.
+
2004-06-14 Raja R Harinath <rharinath@novell.com>
* Makefile (net20bootstrap_response): Remove. This shouldn't
diff --git a/mcs/class/corlib/Makefile b/mcs/class/corlib/Makefile
index f1c218057cd..a48b2fd966b 100644
--- a/mcs/class/corlib/Makefile
+++ b/mcs/class/corlib/Makefile
@@ -93,13 +93,12 @@ net20bootstraplib = $(topdir)/class/lib/net_2_0_bootstrap/mscorlib.dll
ifeq (net_2_0, $(PROFILE))
$(the_lib): $(gmcs)
-endif
# The in-tree 'gmcs' needs at least a stripped-down version of the net 2.0 corlib.dll. We build that first.
# make sure that $(gmcs) is up-to-date
FORCE:
$(gmcs): $(net20bootstraplib) FORCE
- cd $(topdir)/gmcs && $(MAKE)
+ cd $(@D) && $(MAKE) $(@F)
#net_2_0_bootstrap
@@ -113,6 +112,7 @@ $(net20bootstrap_makefrag): $(response)
@sed 's,^,$(net20bootstraplib): ,' $< >$@
-include $(net20bootstrap_makefrag)
+endif
# corlib_cmp