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
diff options
context:
space:
mode:
authorPeter Williams <peterw@mono-cvs.ximian.com>2003-07-16 09:08:19 +0400
committerPeter Williams <peterw@mono-cvs.ximian.com>2003-07-16 09:08:19 +0400
commitaccc28dd648ec7b8a8ece85564efd9614059710f (patch)
tree0b24e6512d12f6b82203832d04bf9d7a5db01038
parentf900a2765ff70d5b483cac03127cf17e42053260 (diff)
2003-07-16 Peter Williams <peter@newton.cx>
A whole passel of build system changes. Doc updates: * build/README.makefiles: Doc updates. * build/profiles/net_1_0.make: Doc changes. * INSTALL.txt: A few more touchups. Better defaults: * build/config-default.make (prefix): Default install prefix should be /usr/local. * build/profiles/bootstrap.make: This profile ... * build/profiles/default.make: ... is now the default. * build/profiles/atomic.make: And the default is now this. Fixes for pre-build checks: * Makefile: Do the platform and (new) profile checks before the build, which took some infrastructure changes. * build/rules.make: Allow a Makefile to specify its own all/install/etc targets. * build/profiles/default.make (profile-check): Add a blank target here. * build/profiles/atomic.make: Check for a full MCS install to build against. HP/UX fixes with help from Bernie Solomon: * build/config-default.make (ECHO_ESCAPE): HP/UX 'echo' doesn't need a -e parameter to interpret escape codes. Test for that and define a configuration parameter. * build/library.make ($(makefrag)): Use $(ECHO_ESCAPE) instead of assuming that 'echo -e' will interpret escape codes. * build/executable.make ($(makefrag)): Here too. A make distcheck fix: * Makefile: Inherit the current prefix so that the build can find the right System.Xml.dll. And Windows build fixes with the invaluable help of Sebastian Pouliot (in various subdirectories). class/Mono.Data.SqliteClient: 2003-07-16 Peter Williams <peter@newton.cx> * Makefile (LIB_MCS_FLAGS): Add /r:System.dll here. Why wasn't this necessary with MCS? (csc.exe needs it.) class/System: 2003-07-16 Peter Williams <peter@newton.cx> * Makefile (SCARY_LIB): Flip around since what was bootstrap is now default. class/System/Test/System.Net: 2003-07-16 Peter Williams <peter@newton.cx> * IPAddressTest.cs: #if NET_1_1 for some IPv6 tests that rely on some NET_1_1-only features. class/System/Test/System.Net.Sockets: 2003-07-16 Peter Williams <peter@newton.cx> * TcpListenerTest.cs: Initialize outSock to null to prevent an mcs compile error. class/System.Data: 2003-07-16 Peter Williams <peter@newton.cx> * Makefile: Flip around for the new default build profile. (In a separate commit) class/System.Windows.Forms: 2003-07-16 Peter Williams <peter@newton.cx> * System.Windows.Forms.dll.sources: Don't build with two AssemblyInfo.cs files. class/corlib: 2003-07-16 Peter Williams <peter@newton.cx> * Makefile ($(test_makefrag)): Use $(ECHO_ESCAPE) for HP/UX portability fixes. (all-local): Don't build $(cmplib) by default, it's not something most people need, and the build is broken on Windows right now anyway. ilasm: 2003-07-16 Peter Williams <peter@newton.cx> * Makefile (ILParser.cs): Move this from parser/ so we avoid slash direction issues on the Windows build. * .cvsignore: Add ILParser.cs here. ilasm/parser: 2003-07-16 Peter Williams <peter@newton.cx> * .cvsignore: ILParser.cs has been moved. tools: 2003-07-16 Peter Williams <peter@newton.cx> * Makefile (DIST_ONLY_SUBDIRS): Don't build SqlSharp, it's very old and doesn't build on Windows. svn path=/trunk/mcs/; revision=16292
-rw-r--r--mcs/ChangeLog55
-rw-r--r--mcs/INSTALL.txt68
-rw-r--r--mcs/Makefile28
-rw-r--r--mcs/build/Makefile2
-rw-r--r--mcs/build/README.makefiles152
-rw-r--r--mcs/build/config-default.make11
-rw-r--r--mcs/build/executable.make2
-rw-r--r--mcs/build/library.make4
-rw-r--r--mcs/build/profiles/default.make25
-rw-r--r--mcs/build/profiles/net_1_0.make4
-rw-r--r--mcs/build/rules.make8
-rw-r--r--mcs/class/Mono.Data.SqliteClient/ChangeLog5
-rw-r--r--mcs/class/Mono.Data.SqliteClient/Makefile2
-rw-r--r--mcs/class/System.Data/Makefile6
-rw-r--r--mcs/class/System.Windows.Forms/ChangeLog5
-rw-r--r--mcs/class/System.Windows.Forms/System.Windows.Forms.dll.sources1
-rw-r--r--mcs/class/System/ChangeLog5
-rw-r--r--mcs/class/System/Makefile8
-rw-r--r--mcs/class/System/Test/System.Net.Sockets/ChangeLog5
-rwxr-xr-xmcs/class/System/Test/System.Net.Sockets/TcpListenerTest.cs2
-rw-r--r--mcs/class/System/Test/System.Net/ChangeLog5
-rw-r--r--mcs/class/System/Test/System.Net/IPAddressTest.cs2
-rw-r--r--mcs/class/corlib/ChangeLog7
-rw-r--r--mcs/class/corlib/Makefile19
-rw-r--r--mcs/ilasm/.cvsignore1
-rw-r--r--mcs/ilasm/ChangeLog7
-rw-r--r--mcs/ilasm/Makefile4
-rw-r--r--mcs/ilasm/parser/.cvsignore2
-rw-r--r--mcs/ilasm/parser/ChangeLog4
-rw-r--r--mcs/tools/ChangeLog5
-rw-r--r--mcs/tools/Makefile3
31 files changed, 328 insertions, 129 deletions
diff --git a/mcs/ChangeLog b/mcs/ChangeLog
index f124f9e9060..e3c98f9c09f 100644
--- a/mcs/ChangeLog
+++ b/mcs/ChangeLog
@@ -1,3 +1,58 @@
+2003-07-16 Peter Williams <peter@newton.cx>
+
+ A whole passel of build system changes. Doc updates:
+
+ * build/README.makefiles: Doc updates.
+
+ * build/profiles/net_1_0.make: Doc changes.
+
+ * INSTALL.txt: A few more touchups.
+
+ Better defaults:
+
+ * build/config-default.make (prefix): Default install prefix
+ should be /usr/local.
+
+ * build/profiles/bootstrap.make: This profile ...
+
+ * build/profiles/default.make: ... is now the default.
+
+ * build/profiles/atomic.make: And the default is now this.
+
+ Fixes for pre-build checks:
+
+ * Makefile: Do the platform and (new) profile checks
+ before the build, which took some infrastructure changes.
+
+ * build/rules.make: Allow a Makefile to specify its own all/install/etc
+ targets.
+
+ * build/profiles/default.make (profile-check): Add a blank
+ target here.
+
+ * build/profiles/atomic.make: Check for a full MCS install to
+ build against.
+
+ HP/UX fixes with help from Bernie Solomon:
+
+ * build/config-default.make (ECHO_ESCAPE): HP/UX 'echo'
+ doesn't need a -e parameter to interpret escape codes. Test for
+ that and define a configuration parameter.
+
+ * build/library.make ($(makefrag)): Use $(ECHO_ESCAPE)
+ instead of assuming that 'echo -e' will interpret escape
+ codes.
+
+ * build/executable.make ($(makefrag)): Here too.
+
+ A make distcheck fix:
+
+ * Makefile: Inherit the current prefix so that the build can
+ find the right System.Xml.dll.
+
+ And Windows build fixes with the invaluable help of Sebastian
+ Pouliot (in various subdirectories).
+
2003-07-14 Peter Williams <peter@newton.cx>
* build/rules.make (dist-recursive): Fix recursive rules
diff --git a/mcs/INSTALL.txt b/mcs/INSTALL.txt
index e21142f75a8..7013d30ea06 100644
--- a/mcs/INSTALL.txt
+++ b/mcs/INSTALL.txt
@@ -10,15 +10,16 @@ be supplemented by corlib, a CLR assembly to which they are closely
tied. This package provides the C# sources for corlib as well as some
additional assemblies and mcs, the Mono C# compiler.
-To build this package, you must already have a C# compiler installed.
-Build instructions for *NIX and Microsoft Windows follow.
-
-Building mcs
+Building MCS
============
-These instructions apply to both Unix and Windows. You need GNU make
-to build the software (on Windows, you will need for example the
-Cygwin environment setup)
+These instructions apply to both Linux and Windows. To build this
+package, you must already have a C# compiler installed. This means
+that to build on Linux, you need to get a distribution of the MCS
+binaries; these are called monocharges. See README.building for
+information on where to get them. On Windows, you can just use the
+Microsoft compiler. You also need GNU make to build the software (on
+Windows, you will need for example the Cygwin environment setup).
To build the compiler and class libraries, run:
@@ -31,31 +32,65 @@ To install them, run the following:
make install
-The default is /usr/local, to change this configuration option type:
+The default prefix is /usr/local. To change this configuration option type:
+
+ echo prefix=/your-prefix >> build/config.make
+
+If you get "corlib out of sync" errors, try
+
+ make PROFILE="atomic"
- echo prefix=/your-prefix > build/config.make
+The difference between the two modes is explained farther down.
+
+Monocharges
+===========
If you are tracking Mono's development, you may sometimes need to share
the compiled libraries with others, you can do:
make monocharge
-Or a light version:
+Or a light version, which contains only the essential libraries and
+results in a much smaller file:
make monocharge-lite
-
Configuration
--------------
+=============
If you want to change the configuration options for the build process,
place your configuration options in build/config.make
-A list of variables that control the build are listed in the
-build/config-default.make
+A list of variables that control the build are listed in the file
+build/config-default.make.
+
+Build profiles? What?
+======================
-The Build System
-----------------
+Don't worry about them too much. If you're wondering which to use:
+use the default if you can (that's why it's the default!) and use
+the atomic if you have to.
+
+The default profile uses the C# compiler and class libaries as they
+are built. This lets you build MCS without needing to have already
+installed it, but can fail if the libraries change significantly.
+(This is the source of the dreaded "corlib out of sync" warning, most
+of the time.)
+
+The atomic profile tries to use the system compiler and preexisting
+MCS libraries. New libaries are built against this constant reference
+point, so if a newly built library has a binary incompatibility, the
+rest of your build can proceed.
+
+If you want to always use the atomic profile, run this command:
+
+ echo PROFILE=atomic >> build/config.make
+
+More About the Build System
+===========================
+
+More information is found in build/README.*. Here's a quick rundown
+of the features:
* Unified build system for Windows and Linux. Windows is still
fairly untested, but "should work." Unfortunately I don't
@@ -96,4 +131,3 @@ The Build System
targets. They're made possible because 'make install' now
supports DESTDIR a la automake, which I'm sure someone cares
about.
-
diff --git a/mcs/Makefile b/mcs/Makefile
index fe4c5f7ceab..678ac7ea95a 100644
--- a/mcs/Makefile
+++ b/mcs/Makefile
@@ -1,28 +1,25 @@
thisdir := .
SUBDIRS := build jay mcs class mbas nunit20 monoresgen ilasm tools tests errors docs
+OVERRIDE_BARE_TARGETS = hells yeah
include build/rules.make
-all-local: platform-check
+# Define these ourselves to that the platform checks come first
-install-local: platform-check
+all: platform-check profile-check all-recursive #all-local
-test-local: platform-check
+install: platform-check profile-check install-recursive #install-local
-clean-local:
+test: platform-check profile-check test-recursive #test-local
-dist-local:
+run-test: run-test-recursive #run-test-local
+
+clean: clean-recursive #clean-local
# fun specialty targets
testcorlib:
@cd class/corlib && $(MAKE) test run-test
-bootstrap:
- $(MAKE) all MCS='$$(INTERNAL_MCS)'
-
-unbootstrap:
- $(MAKE) all MCS='$$(BOOTSTRAP_MCS)'
-
# Disting. We need to override $(distdir) here.
package := mcs-$(VERSION)
@@ -54,7 +51,9 @@ dist-pre:
dist-post:
tar cvzf $(package).tar.gz $(package)
-dist-tarball: dist-pre dist-default dist-recursive dist-post
+dist-local: dist-default
+
+dist-tarball: dist-pre dist-recursive dist-post
dist: dist-tarball
rm -rf $(package)
@@ -62,6 +61,9 @@ dist: dist-tarball
# the egrep -v is kind of a hack (to get rid of the makefrags)
# but otherwise we have to make dist then make clean which
# is sort of not kosher. And it breaks with DIST_ONLY_SUBDIRS.
+#
+# We need to set prefix on make so class/System/Makefile can find
+# the installed System.Xml to build properly
distcheck:
rm -rf InstallTest Distcheck-MCS ; \
@@ -70,7 +72,7 @@ distcheck:
$(MAKE) dist-tarball || exit 1 ; \
mv $(package) Distcheck-MCS ; \
(cd Distcheck-MCS && \
- make && make test && make install DESTDIR="$$destdir" && \
+ make prefix=$(prefix) && make test && make install DESTDIR="$$destdir" && \
make clean && make dist || exit 1) || exit 1 ; \
mv Distcheck-MCS $(package) ; \
tar tzf $(package)/$(package).tar.gz |sed -e 's,/$$,,' |sort >distdist.list ; \
diff --git a/mcs/build/Makefile b/mcs/build/Makefile
index 6d8e4b60493..dce90131082 100644
--- a/mcs/build/Makefile
+++ b/mcs/build/Makefile
@@ -15,7 +15,7 @@ DISTFILES = \
platforms/linux.make \
platforms/win32.make \
profiles/default.make \
- profiles/bootstrap.make \
+ profiles/atomic.make \
profiles/net_1_0.make
dist-local: dist-default
diff --git a/mcs/build/README.makefiles b/mcs/build/README.makefiles
index fedda941b00..bca5fd12287 100644
--- a/mcs/build/README.makefiles
+++ b/mcs/build/README.makefiles
@@ -23,7 +23,7 @@ A general makefile looks like this:
========================================
thisdir = class/Mono.My.Library
SUBDIRS =
-include ../../rules.make
+include ../../build/rules.make
all-local:
do some stuff
@@ -76,7 +76,8 @@ able to proceed unsupervised and test everything that can be tested in
such a manner.
* clean-local removes built files; 'make clean' should leave
-only files that go into a distribution tarball
+only files that go into a distribution tarball. (But it is not necessarily
+true that all files that go into a tarball need to be left after a make clean.)
* dist-local copies files into the distribution tree, which is
given by the variable $(distdir). dist-local always depends on the
@@ -91,8 +92,12 @@ target 'dist-default'. See ** 'make dist' below.
In general, MCS needs to be able to build relying only on the
existence of a runtime and core libraries (corlib, System,
System.Xml). So there shouldn't be any checking for libraries or
-whatnot; MCS should be able to build out of the box after only
-'./configure linux' or './configure win32'.
+whatnot; MCS should be able to build out of the box. We try to keep
+platform detection and feature testing (ie, for HP/UX echo) inside
+the makefiles; right now, there's no configuration script, and it'd
+be nice to keep it that way. (I am told that some people build on
+both Windows and Linux in the same tree, which would be impossible to
+do if we cached platform-related configury values.)
That being said, it's very convenient for developers to be able to
customize their builds to suit their needs. To allow this, the
@@ -100,11 +105,11 @@ Makefile rules are set up to allow people to override pretty much any
important variable.
Configuration variables are given defaults in `config-default.make';
-`rules.make' optionally includes `$(topdir)/config.make', so you can
-customize your build without CVS trying to commit your modified
+`rules.make' optionally includes `$(topdir)/build/config.make', so you
+can customize your build without CVS trying to commit your modified
`config-default.make' all the time. Platform-specific variables are
-defined in `$(topdir)/platform.make', which should be a copy of one of
-the appropriate platform-specific makefiles. (Currently, the only
+defined in `$(topdir)/build/platforms/$(PLATFORM).make', where
+$(PLATFORM) is detected in config-default.make. (Currently, the only
choices are linux.make and win32.make.)
The best way to learn what the configuration variables are is to read
@@ -216,7 +221,7 @@ carefully it can be extremely useful.
PROGRAM = myprogram.exe
LOCAL_MCS_FLAGS = /r:System.Xml.dll
-include ../executable.make
+include ../build/executable.make
========================================
executable.make builds a program in the current directory. Its name is
@@ -237,7 +242,7 @@ test, set the variable HAS_TEST:
PROGRAM = myprogram.exe
LOCAL_MCS_FLAGS = /r:System.Xml.dll
HAS_TEST = yes
-include ../executable.make
+include ../build/executable.make
test-local: mytester.exe
@@ -258,7 +263,7 @@ LOCAL_MCS_FLAGS = /r:System.Xml.dll
BUILT_SOURCES = parser.cs
CLEAN_FILES = y.output
-include ../executable.make
+include ../build/executable.make
parser.cs: parser.jay
$(topdir)/jay/jay $< > $@
@@ -282,7 +287,7 @@ LIBRARY = Mono.MyLib.dll
LIB_MCS_FLAGS = /unsafe
TEST_MCS_FLAGS = /r:System.Xml.dll
-include ../../library.make
+include ../../build/library.make
========================================
Where you library is called $(LIBRARY); it will be put into
@@ -312,7 +317,7 @@ LIBRARY = Mono.MyLib.dll
LIB_MCS_FLAGS = /unsafe
NO_TEST = yes
-include ../../library.make
+include ../../build/library.make
========================================
and feel ashamed. Every good library has a test suite!
@@ -372,7 +377,8 @@ be able to give it any arguments. If you're on a platform which has an
interpreter or jitter, $(RUNTIME_FLAGS) is included in $(RUNTIME), so
set that variable.
-
+$(TEST_RUNTIME) is the runtime to use when running tests. Right now it's
+just "mono --debug".
@@ -423,7 +429,7 @@ consistently.
The 'dist-default' target will copy the files listed in $(DISTFILES)
into the distribution directory, as well as Makefile and ChangeLog if
-it exists. This is almost always all that you need, so ideally your
+they exist. This is almost always all that you need, so ideally your
make dist support should only be:
========================================
@@ -552,71 +558,83 @@ class/Mono.MyFancyLib/Makefile
thisdir = class/Mono.MyFancyLib
SUBDIRS =
DIST_ONLY_SUBDIRS = MyFancyDemo
-include ../../rules.make
+include ../../build/rules.make
LIBRARY = Mono.MyFancyLib.dll
LIB_MCS_FLAGS = /r:System.dll
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
-include ../../library.make
+include ../../build/library.make
========================================
class/Mono.MyFancyLib/MyFancyDemo/Makefile
========================================
thisdir = class/Mono.MyFancyLib/MyFancyDemo
SUBDIRS =
-include ../../../rules.make
+include ../../../build/rules.make
PROGRAM = FancyDemo.exe
LOCAL_MCS_FLAGS = /r:gtk-sharp.dll
-include ../../../executable.make
+include ../../../build/executable.make
========================================
+* Special recursion needs? Use OVERRIDE_BARE_TARGETS
+By default, rules.make defines the all, install, clean, etc. targets
+to look something like this:
-** A few implementation details
+ all: all-recursive all-local
-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; so
-far, this hasn't really been a problem, and I hope it won't be. One
-crappy solution would be:
+Sometimes that doesn't cut it; say for example you want to check for
+something before doing a lengthy recursive build (see
+$(topdir)/Makefile) or you have a something like this
-========================================
-thisdir = directory/subdir
-SUBDIRS =
-include ../../rules.make
+ class/MyLibrary:
+ Build MyLibrary.dll
+ class/MyLibrary/Test:
+ Build TestMyLibrary.exe
-all-local: myfoo.exe
+'make clean test' will fail here, because the build will happen in
+the Test subdirectory first, so there will be no MyLibrary.dll to link
+against. (Unless you write a nasty evil relative path rule which is
+strongly discouraged.)
-myfoo.exe: ../libfoo.dll
- $(CSCOMPILE) ...
+Anyway, to solve this problem you can do
-../libfoo.dll:
- cd .. && $(MAKE) libfoo.dll
========================================
+OVERRIDE_BARE_TARGETS = yes
+thisdir = class/MyLibrary
+SUBDIRS = Test
+include ../../build/rules.make
-Alternatively, I think I could add support so that you could do this:
+# This is normally "all-recursive all-local"
+all: all-local all-recursive
+test: test-local test-recursive
+...
========================================
-thisdir = directory
-SUBDIRS = . subdir # <-- look at this
-include ../../rules.make
-all-local: libfoo.dll
-libfoo.dll:
- $(CSCOMPILE) ...
-========================================
-But that would get into some really nasty shell script so I'd rather
-not have to do that.
+
+
+** 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.
Note that even a directory that doesn't, for example, have any tests
must still define test-local; otherwise 'make test' run from the
@@ -627,7 +645,7 @@ toplevel directory will break.
-** Flags
+** Flags for Tools
We want to make it so that the user can specify certain flags to
always be given to a tool, so there's a general way of implementing
@@ -639,9 +657,14 @@ FLAGS variables:
* $(LOCAL_foo_FLAGS) is set in a specific Makefile to
provide necessary values.
- * $(USE_foo_FLAGS) is defined to be the combination of
- $(LOCAL_foo_FLAGS) and $(foo_FLAGS), and it's what is
- actually passed to $(foo).
+ * $(PLATFORM_foo_FLAGS) is set in the platform configuration
+ to provide platform-specific values.
+
+ * $(PROFILE_foo_FLAGS) is set in the profile configuration
+ to provide profile-specific values.
+
+ * $(USE_foo_FLAGS) is defined to be the combination of all of
+ the above, and it's what is actually passed to $(foo).
$(MCS_FLAGS) and $(CFLAGS) follow this model. If you end up finding
that another tool is used commonly (hm, jay...), please follow this form.
@@ -666,12 +689,20 @@ If you're writing shell script code as part of a make rule, remember
that Windows has command-line length limits. So something like
========================================
-for f in $(all_the_sources_to_corlib) ; do ....
+mytool $(all_the_sources_to_corlib)
========================================
-Is probably going to cause problems. Other than that, you can rely on
-fairly advanced (ie, GNU) behaviors from the standard shell utilities,
-since both Cygwin and Linux will be using them.
+Is probably going to cause problems. As I understand it,
+
+========================================
+for f in $(all_the_sources_to_corlib) ; do ...
+========================================
+
+is ok, since the shell itself doesn't have those limitations. Other
+than that, you should still try to write fairly portable shell
+script. Linux and Cygwin both use the GNU utilities, but there's at
+least one hardy soul trying to build Mono on HP/UX, and no doubt there
+will be ports to more Unices as time goes on.
@@ -680,8 +711,17 @@ since both Cygwin and Linux will be using them.
** Misc
-$(LIBRARY_FLAGS) would be a good place to add /d:DOT_NET_1_1 or whatever
-it is.
+We still don't use /d:NET_1_1 ; it causes some build problems right
+now.
+
+There's a hack in class/System.Data/Makefile to work around a very
+strange crash in the runtime with some custom attribute stuff. It'd be
+nice to fix it.
+
+Also, there's a /lib:$(prefix)/lib in the System.dll Makefile, which
+is for some reason necessary if System.Xml.dll hasn't been built yet.
+(Well, it's necessary because of the /r:System.Xml.dll, but that
+should be in the search path, it seems.)
A lot of the weird targets in the old makefiles have been dropped; I
have a feeling that a lot of them are archaic and not needed anymore.
diff --git a/mcs/build/config-default.make b/mcs/build/config-default.make
index 3dde4399ded..682f13d1279 100644
--- a/mcs/build/config-default.make
+++ b/mcs/build/config-default.make
@@ -15,13 +15,22 @@ CFLAGS = -g -O2
INSTALL = /usr/bin/install
RUNTIME = mono $(RUNTIME_FLAGS)
TEST_RUNTIME=MONO_PATH="$(topdir)/class/lib:.:$$MONO_PATH" $(RUNTIME) --debug
-prefix = /usr
+prefix = /usr/local
# In case you want to add MCS_FLAGS, this lets you not have to
# keep track of the default value
DEFAULT_MCS_FLAGS := $(MCS_FLAGS)
+# Not all echos are alike. HP/UX doesn't need a -e command.
+# Test for this here
+
+ifeq ($(shell echo -e foo),foo)
+ECHO_ESCAPE=echo -e
+else
+ECHO_ESCAPE=echo
+endif
+
# You shouldn't need to set these but might on a
# weird platform.
diff --git a/mcs/build/executable.make b/mcs/build/executable.make
index 48ed195fd94..189f91cd45b 100644
--- a/mcs/build/executable.make
+++ b/mcs/build/executable.make
@@ -54,7 +54,7 @@ $(makefrag): $(sourcefile)
@echo "$(stampfile): $(BUILT_SOURCES) \\" >>$@.new
@cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>$@.new
@cat $@.new |sed -e '$$s, \\$$,,' >$@
- @echo -e "\ttouch \$$@" >>$@
+ @$(ECHO_ESCAPE) "\ttouch \$$@" >>$@
@rm -rf $@.new
ifdef PLATFORM_CHANGE_SEPARATOR_CMD
diff --git a/mcs/build/library.make b/mcs/build/library.make
index 60623bbe096..1fbb990dd3d 100644
--- a/mcs/build/library.make
+++ b/mcs/build/library.make
@@ -85,7 +85,7 @@ $(makefrag): $(sourcefile)
@echo "$(stampfile): \\" >>$@.new
@cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>$@.new
@cat $@.new |sed -e '$$s, \\$$,,' >$@
- @echo -e "\ttouch \$$@" >>$@
+ @$(ECHO_ESCAPE) "\ttouch \$$@" >>$@
@rm -rf $@.new
ifdef PLATFORM_CHANGE_SEPARATOR_CMD
@@ -121,7 +121,7 @@ $(test_makefrag): $(test_response)
@echo "$(test_stampfile): \\" >>$@.new
@cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>$@.new
@cat $@.new |sed -e '$$s, \\$$,,' >$@
- @echo -e "\ttouch \$$@" >>$@
+ @$(ECHO_ESCAPE) "\ttouch \$$@" >>$@
@rm -rf $@.new
-include $(test_makefrag)
diff --git a/mcs/build/profiles/default.make b/mcs/build/profiles/default.make
index 51763f3c3af..d27f23bb1e9 100644
--- a/mcs/build/profiles/default.make
+++ b/mcs/build/profiles/default.make
@@ -1,14 +1,23 @@
-# -*- Makefile -*-
+# -*- makefile -*-
#
-# The default profile.
+# The default 'bootstrap' profile -- builds everything except corlib
+# with the internal MCS, and sets MONO_PATH so that we link against
+# the libraries as we build them.
-# In this profile we compile everything relative to the already-installed
-# runtime, so we use the bootstrap (external) compiler for everything and
-# don't set MONO_PATH.
+# Note that we have sort of confusing terminology here; BOOTSTRAP_MCS
+# is what allows us to bootstrap ourselves, but when we are bootstrapping,
+# we use INTERNAL_MCS.
-MCS = $(BOOTSTRAP_MCS)
+# When bootstrapping, compile against our new assemblies.
+# (MONO_PATH doesn't just affect what assemblies are loaded to
+# run the compiler; /r: flags are by default loaded from whatever's
+# in the MONO_PATH too).
+
+MCS = MONO_PATH="$(topdir)/class/lib:$$MONO_PATH" $(INTERNAL_MCS)
+
+# nuttzing!
+
+profile-check:
# Causes some build errors
#PROFILE_MCS_FLAGS = /d:NET_1_1
-
-# Exciting, no?
diff --git a/mcs/build/profiles/net_1_0.make b/mcs/build/profiles/net_1_0.make
index 32c5f1bce87..a998f2c28db 100644
--- a/mcs/build/profiles/net_1_0.make
+++ b/mcs/build/profiles/net_1_0.make
@@ -2,8 +2,8 @@
#
# Only build .NET 1.0 classes.
#
-# If we want to combine this with, say, the bootstrap profile,
-# we should create 'bs-net_1_0.make' which includes both.
+# If we want to combine this with, say, the atomic profile,
+# we should create 'atomic-net_1_0.make' which includes both.
#
# Ideally you could say 'make PROFILE="bootstrap net_1_0"' but
# that would be pretty hard to code.
diff --git a/mcs/build/rules.make b/mcs/build/rules.make
index 43f3c981f5f..deeb57c2a88 100644
--- a/mcs/build/rules.make
+++ b/mcs/build/rules.make
@@ -90,6 +90,12 @@ dist-recursive: dist-local
# 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
@@ -101,6 +107,8 @@ run-test: run-test-recursive run-test-local
clean: clean-recursive clean-local
+endif
+
# Can only do this from the top dir
# ## dist: dist-recursive dist-local
diff --git a/mcs/class/Mono.Data.SqliteClient/ChangeLog b/mcs/class/Mono.Data.SqliteClient/ChangeLog
index 1ebfc696bb8..b457b15339b 100644
--- a/mcs/class/Mono.Data.SqliteClient/ChangeLog
+++ b/mcs/class/Mono.Data.SqliteClient/ChangeLog
@@ -1,3 +1,8 @@
+2003-07-16 Peter Williams <peter@newton.cx>
+
+ * Makefile (LIB_MCS_FLAGS): Add /r:System.dll here. Why wasn't
+ this necessary with MCS? (csc.exe needs it.)
+
2002-11-16 Tim Coleman <tim@timcoleman.com>
* makefile.gnu:
Add MONO_PATH_PREFIX so build doesn't
diff --git a/mcs/class/Mono.Data.SqliteClient/Makefile b/mcs/class/Mono.Data.SqliteClient/Makefile
index 9275e6adc7e..25440dc0f2c 100644
--- a/mcs/class/Mono.Data.SqliteClient/Makefile
+++ b/mcs/class/Mono.Data.SqliteClient/Makefile
@@ -3,7 +3,7 @@ SUBDIRS =
include ../../build/rules.make
LIBRARY = Mono.Data.SqliteClient.dll
-LIB_MCS_FLAGS = /unsafe /r:System.Data.dll
+LIB_MCS_FLAGS = /unsafe /r:System.dll /r:System.Data.dll
NO_TEST = yes
EXTRA_DISTFILES = Test/SqliteTest.cs
diff --git a/mcs/class/System.Data/Makefile b/mcs/class/System.Data/Makefile
index 96b3e564d01..b8fe63d6752 100644
--- a/mcs/class/System.Data/Makefile
+++ b/mcs/class/System.Data/Makefile
@@ -4,10 +4,10 @@ include ../../build/rules.make
# I have *no idea* why I need to do this.
-ifeq ($(PROFILE),bootstrap)
-system = $(topdir)/class/lib/System.dll
-else
+ifeq ($(PROFILE),atomic)
system = System.dll
+else
+system = $(topdir)/class/lib/System.dll
endif
LIBRARY = System.Data.dll
diff --git a/mcs/class/System.Windows.Forms/ChangeLog b/mcs/class/System.Windows.Forms/ChangeLog
index 1b36790dfd5..399e6c8b80b 100644
--- a/mcs/class/System.Windows.Forms/ChangeLog
+++ b/mcs/class/System.Windows.Forms/ChangeLog
@@ -1,3 +1,8 @@
+2003-07-16 Peter Williams <peter@newton.cx>
+
+ * System.Windows.Forms.dll.sources: Don't build with two
+ AssemblyInfo.cs files.
+
2003-07-07 Martin Willemoes Hansen <mwh@sysrq.dk>
* System.Windows.Forms.Design/AnchorEditor.cs
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.dll.sources b/mcs/class/System.Windows.Forms/System.Windows.Forms.dll.sources
index ba9d8d5df9d..7f0f8ace77d 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms.dll.sources
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.dll.sources
@@ -321,7 +321,6 @@ System.Windows.Forms/win32Interfaces.cs
System.Windows.Forms/win32RegistryUtil.cs
System.Windows.Forms/win32Structs.cs
System.Windows.Forms/win32functions.cs
-System.Windows.Forms.Design/AssemblyInfo.cs
System.Windows.Forms.Design/ComponentEditor.cs
System.Windows.Forms.Design/ComponentEditorForm.cs
System.Windows.Forms.Design/EventsTab.cs
diff --git a/mcs/class/System/ChangeLog b/mcs/class/System/ChangeLog
index 046382d0d4e..d021fe56f49 100644
--- a/mcs/class/System/ChangeLog
+++ b/mcs/class/System/ChangeLog
@@ -1,3 +1,8 @@
+2003-07-16 Peter Williams <peter@newton.cx>
+
+ * Makefile (SCARY_LIB): Flip around since what was bootstrap
+ is now default.
+
2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
* System.dll.sources: Added NetConfigurationHandler.cs,
diff --git a/mcs/class/System/Makefile b/mcs/class/System/Makefile
index 8d97ff0e2e1..69bc218f1d2 100644
--- a/mcs/class/System/Makefile
+++ b/mcs/class/System/Makefile
@@ -4,16 +4,16 @@ include ../../build/rules.make
LIBRARY = System.dll
-# yeah so. If we're doing a bootstrap build,
+# yeah so. If we're doing a default build,
# System.Xml.dll doesn't exist yet, so we
# need to add in the /lib: to let mcs find it.
# Or at least, that's the only way I can make this
# work
-ifeq ($(PROFILE),bootstrap)
-SCARY_LIB=/lib:$(prefix)/lib
-else
+ifeq ($(PROFILE),atomic)
SCARY_LIB=
+else
+SCARY_LIB=/lib:$(prefix)/lib
endif
LIB_MCS_FLAGS = $(SCARY_LIB) /r:System.Xml.dll /r:$(corlib)
diff --git a/mcs/class/System/Test/System.Net.Sockets/ChangeLog b/mcs/class/System/Test/System.Net.Sockets/ChangeLog
index 3d44b5acf23..d839c3d14e3 100644
--- a/mcs/class/System/Test/System.Net.Sockets/ChangeLog
+++ b/mcs/class/System/Test/System.Net.Sockets/ChangeLog
@@ -1,3 +1,8 @@
+2003-07-16 Peter Williams <peter@newton.cx>
+
+ * TcpListenerTest.cs: Initialize outSock to null to
+ prevent an mcs compile error.
+
2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
* TcpListenerTest.cs: Forced IPv4 listener test.
diff --git a/mcs/class/System/Test/System.Net.Sockets/TcpListenerTest.cs b/mcs/class/System/Test/System.Net.Sockets/TcpListenerTest.cs
index d0af1dce5a7..76ff745d737 100755
--- a/mcs/class/System/Test/System.Net.Sockets/TcpListenerTest.cs
+++ b/mcs/class/System/Test/System.Net.Sockets/TcpListenerTest.cs
@@ -35,7 +35,7 @@ namespace MonoTests.System.Net.Sockets {
// connect to it from a new socket
IPHostEntry hostent = Dns.GetHostByAddress("127.0.0.1");
- Socket outSock;
+ Socket outSock = null;
foreach(IPAddress address in hostent.AddressList) {
if(address.AddressFamily == AddressFamily.InterNetwork) {
diff --git a/mcs/class/System/Test/System.Net/ChangeLog b/mcs/class/System/Test/System.Net/ChangeLog
index 3c856ce5748..a24028b24a5 100644
--- a/mcs/class/System/Test/System.Net/ChangeLog
+++ b/mcs/class/System/Test/System.Net/ChangeLog
@@ -1,3 +1,8 @@
+2003-07-16 Peter Williams <peter@newton.cx>
+
+ * IPAddressTest.cs: #if NET_1_1 for some IPv6 tests that
+ rely on some NET_1_1-only features.
+
2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
* IPAddressTest.cs: Added IPv6 addresses tests.
diff --git a/mcs/class/System/Test/System.Net/IPAddressTest.cs b/mcs/class/System/Test/System.Net/IPAddressTest.cs
index 06146024f97..359c0ada924 100644
--- a/mcs/class/System/Test/System.Net/IPAddressTest.cs
+++ b/mcs/class/System/Test/System.Net/IPAddressTest.cs
@@ -132,11 +132,13 @@ public class IPAddressTest
ip = IPAddress.Parse ("::101");
Assertion.AssertEquals ("IsLoopback #2", false, IPAddress.IsLoopback (ip));
+#if NET_1_1
ip = IPAddress.IPv6Loopback;
Assertion.AssertEquals ("IsLoopback #3", true, IPAddress.IsLoopback (ip));
ip = IPAddress.IPv6None;
Assertion.AssertEquals ("IsLoopback #7", false, IPAddress.IsLoopback (ip));
+#endif
ip = IPAddress.Any;
Assertion.AssertEquals ("IsLoopback #5", false, IPAddress.IsLoopback (ip));
diff --git a/mcs/class/corlib/ChangeLog b/mcs/class/corlib/ChangeLog
index c1ebe45c51d..04c2fb57fd1 100644
--- a/mcs/class/corlib/ChangeLog
+++ b/mcs/class/corlib/ChangeLog
@@ -1,3 +1,10 @@
+2003-07-16 Peter Williams <peter@newton.cx>
+
+ * Makefile ($(test_makefrag)): Use $(ECHO_ESCAPE) for HP/UX
+ portability fixes.
+ (all-local): Don't build $(cmplib) by default, it's not something
+ most people need, and the build is broken on Windows right now anyway.
+
2003-07-13 Zoltan Varga <vargaz@freemail.hu>
* unix.args: Fix UNIX build.
diff --git a/mcs/class/corlib/Makefile b/mcs/class/corlib/Makefile
index 9389e3f99a4..afba8ded729 100644
--- a/mcs/class/corlib/Makefile
+++ b/mcs/class/corlib/Makefile
@@ -32,22 +32,13 @@ cmp_flags = /r:$(real_corlib) $(corlib_flags)
# Here, we make all.
-ifdef PLATFORM_MAKE_CORLIB_CMP
-build_cmplib = $(cmplib)
-else
-build_cmplib =
-endif
-
-all-local: $(corlib) $(build_cmplib)
+all-local: $(corlib)
# should we install cmplib? sure!
-install-local: $(corlib) $(build_cmplib)
+install-local: $(corlib)
$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/lib
$(INSTALL_LIB) $(corlib) $(DESTDIR)$(prefix)/lib
-ifdef PLATFORM_MAKE_CORLIB_CMP
- $(INSTALL_LIB) $(cmplib) $(DESTDIR)$(prefix)/lib
-endif
clean-local:
-rm -f $(corlib) $(cmplib) $(testlib) TestResult.xml \
@@ -97,7 +88,7 @@ $(makefrag): $(response)
@echo "$(stampfile): \\" >>$@.new
@cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>$@.new
@cat $@.new |sed -e '$$s, \\$$,,' >$@
- @echo -e "\ttouch \$$@" >>$@
+ @$(ECHO_ESCAPE) "\ttouch \$$@" >>$@
@rm -rf $@.new
-include $(makefrag)
@@ -126,7 +117,7 @@ $(cmp_makefrag): $(cmp_response)
@echo "$(cmp_stampfile): \\" >>$@.new
@cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>$@.new
@cat $@.new |sed -e '$$s, \\$$,,' >$@
- @echo -e "\ttouch \$$@" >>$@
+ @$(ECHO_ESCAPE) "\ttouch \$$@" >>$@
@rm -rf $@.new
-include $(cmp_makefrag)
@@ -155,7 +146,7 @@ $(test_makefrag): $(test_response)
@echo "$(test_stampfile): \\" >>$@.new
@cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>$@.new
@cat $@.new |sed -e '$$s, \\$$,,' >$@
- @echo -e "\ttouch \$$@" >>$@
+ @$(ECHO_ESCAPE) "\ttouch \$$@" >>$@
@rm -rf $@.new
-include $(test_makefrag)
diff --git a/mcs/ilasm/.cvsignore b/mcs/ilasm/.cvsignore
index b92b8b70267..10f8165bd52 100644
--- a/mcs/ilasm/.cvsignore
+++ b/mcs/ilasm/.cvsignore
@@ -1 +1,2 @@
list
+ILParser.cs
diff --git a/mcs/ilasm/ChangeLog b/mcs/ilasm/ChangeLog
index 02c0bfb5c1a..e337c91bf89 100644
--- a/mcs/ilasm/ChangeLog
+++ b/mcs/ilasm/ChangeLog
@@ -1,3 +1,10 @@
+2003-07-16 Peter Williams <peter@newton.cx>
+
+ * Makefile (ILParser.cs): Move this from parser/ so we avoid
+ slash direction issues on the Windows build.
+
+ * .cvsignore: Add ILParser.cs here.
+
2003-07-14 Jackson Harper <jackson@latitudegeo.com>
* Makefile: Add the class/lib directory to the lib path so the
diff --git a/mcs/ilasm/Makefile b/mcs/ilasm/Makefile
index c8ee95c2bfc..0edc068b6a1 100644
--- a/mcs/ilasm/Makefile
+++ b/mcs/ilasm/Makefile
@@ -3,7 +3,7 @@ SUBDIRS =
include ../build/rules.make
PROGRAM = ilasm.exe
-BUILT_SOURCES = parser/ILParser.cs
+BUILT_SOURCES = ILParser.cs
LOCAL_MCS_FLAGS = /lib:../class/lib/ /r:PEAPI.dll
CLEAN_FILES = parser/y.output
@@ -15,7 +15,7 @@ EXTRA_DISTFILES = \
tests/ChangeLog \
$(wildcard tests/*.il)
-parser/ILParser.cs: parser/ILParser.jay $(topdir)/jay/skeleton.cs
+ILParser.cs: parser/ILParser.jay $(topdir)/jay/skeleton.cs
$(topdir)/jay/jay -ct < $(topdir)/jay/skeleton.cs $< >$@
include ../build/executable.make
diff --git a/mcs/ilasm/parser/.cvsignore b/mcs/ilasm/parser/.cvsignore
index 871e680e5bb..8b137891791 100644
--- a/mcs/ilasm/parser/.cvsignore
+++ b/mcs/ilasm/parser/.cvsignore
@@ -1 +1 @@
-ILParser.cs
+
diff --git a/mcs/ilasm/parser/ChangeLog b/mcs/ilasm/parser/ChangeLog
index 681e991f23e..870913d2a75 100644
--- a/mcs/ilasm/parser/ChangeLog
+++ b/mcs/ilasm/parser/ChangeLog
@@ -1,3 +1,7 @@
+2003-07-16 Peter Williams <peter@newton.cx>
+
+ * .cvsignore: ILParser.cs has been moved.
+
2003-07-14 Jackson Harper <jackson@latitudegeo.com>
* ILParser.jay: Seperate generic constraints from generic parameters.
diff --git a/mcs/tools/ChangeLog b/mcs/tools/ChangeLog
index face79ca902..1b1c8e55073 100644
--- a/mcs/tools/ChangeLog
+++ b/mcs/tools/ChangeLog
@@ -1,3 +1,8 @@
+2003-07-16 Peter Williams <peter@newton.cx>
+
+ * Makefile (DIST_ONLY_SUBDIRS): Don't build SqlSharp, it's
+ very old and doesn't build on Windows.
+
2003-05-01 Duncan Mak <duncan@ximian.com>
* makefile:
diff --git a/mcs/tools/Makefile b/mcs/tools/Makefile
index 73b8e2ca5ae..4ff971240e6 100644
--- a/mcs/tools/Makefile
+++ b/mcs/tools/Makefile
@@ -1,5 +1,6 @@
thisdir = tools
-SUBDIRS = cilc corcompare ictool mono-xsd security SqlSharp
+SUBDIRS = cilc corcompare ictool mono-xsd security
+DIST_ONLY_SUBDIRS = SqlSharp
include ../build/rules.make
MONO_TOOLS = \