~ chicken-core (chicken-5) a976778b50688c58ac6a43faf83be8c54492a796


commit a976778b50688c58ac6a43faf83be8c54492a796
Author:     felix <bunny351@gmail.com>
AuthorDate: Thu May 27 12:45:12 2010 +0200
Commit:     felix <bunny351@gmail.com>
CommitDate: Thu May 27 12:45:12 2010 +0200

    added boot-chicken makefile target (untested) and better bootstrapping explanation in README (the latter being suggested by zbigniew)

diff --git a/Makefile b/Makefile
index 7b9b27e4..e5293ce4 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@ endif
 
 STANDARD_TARGETS \
 	= all clean distclean spotless install uninstall confclean check \
-	  fullcheck dist libs install-target install-dev bench
+	  fullcheck dist libs install-target install-dev bench boot-chicken
 
 SRCDIR = .
 
@@ -89,4 +89,7 @@ dist:
 	csi -s scripts/makedist.scm
 libs:
 	$(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) CONFIG=$(CONFIG) libs
+boot-chicken:
+	$(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) boot-chicken
+
 endif
diff --git a/README b/README
index 7413a6cc..0425edd0 100644
--- a/README
+++ b/README
@@ -1,12 +1,15 @@
 
   README file for the CHICKEN Scheme system
+  =========================================
+
+
   (c) 2008-2010, The Chicken Team
   (c) 2000-2007, Felix L. Winkelmann
 
   version 4.5.1
 
 
- 1. Introduction:
+ 1. Introduction
 
         CHICKEN is a Scheme-to-C compiler supporting the language
         features as defined in the 'Revised^5 Report on
@@ -37,7 +40,7 @@
         http://www.call-with-current-continuation.org)
 
 
- 2. Installation:
+ 2. Installation
 
         First unzip the package ("unzip chicken-<version>.zip" or "tar
         xzf chicken-<version>.tar.gz" on UNIX or use your favorite
@@ -78,8 +81,9 @@
 
         If you do not have a "chicken" binary installed, you will have
 	to obtain a "bootstrapping" compiler, which can either be
-	built from a release tarball or by using a precompiled and
-	statically linked compiler binary from here:
+	built from a release tarball (see below for instructions) or
+	by using a precompiled and statically linked compiler binary
+	from here:
 
 	  http://chicken.wiki.br/chicken-projects/bootstrap/
 
@@ -196,7 +200,7 @@
         to remove old configuration files.
 
 
- 3. Usage:
+ 3. Usage
 
         Documentation can be found in the directory
         PREFIX/share/chicken/doc in svnwiki format (see
@@ -206,7 +210,7 @@
         date documentation.
 
 
- 4. Extensions:
+ 4. Extensions
 
         A large number of extension libraries for CHICKEN are
         available at
@@ -221,9 +225,9 @@
         <http://www.call-with-current-continuation.org/tarballs/>.
 
         
- 5. Platform issues:
+ 5. Platform issues
 
-    	*BSD:
+    	FreeBSD/NetBSD/OpenBSD:
 
           - *BSD system users *must* use GNU make ("gmake") - the makefiles
             can not be processed by BSD make.
@@ -330,13 +334,26 @@
 	    warnings are bogus and can be ignored.
 
 
- 6. Emacs support:
+ 6. Bootstrapping
+
+	To build a bootstrapping compiler yourself, obtain a recent
+	release tarball, unpack it, change into the extracted
+	directory and enter
+
+          make PLATFORM=<platform> boot-chicken
+
+	This will produce a statically linked binary with the name
+	"chicken-boot[.exe]" that can be given as the value of the
+	"CHICKEN" argument when invoking make(1).
+
+
+ 7. Emacs support
 
         See http://chicken.wiki.br/emacs for tips and links to emacs
 	extensions for Scheme and CHICKEN programming.
 
 
- 7. Compatibility notes
+ 8. Compatibility notes
 
         In CHICKEN 4, the macro system has been reimplemented
 	completely and provides module system, which has considerably
@@ -347,7 +364,7 @@
 	low-level hygienic macros or ask on the CHICKEN mailing list.
 
 
- 8. What's next?
+ 9. What's next?
 
         If you find any bugs, or want to report a problem, please consider
         using the "chicken-bug" tool to create a detailed bug report.
diff --git a/rules.make b/rules.make
index 8735cb9f..6905a7eb 100644
--- a/rules.make
+++ b/rules.make
@@ -1097,3 +1097,12 @@ buildhead:
 	git archive --format=tar --prefix=chicken-`cat buildversion`/ $(HEAD) | tar x
 	cd chicken-`cat buildversion`; $(MAKE) -f Makefile.$(PLATFORM) \
 	  PLATFORM=$(PLATFORM) PREFIX=`pwd` CONFIG= CHICKEN=$(CHICKEN) all install
+
+
+# build static bootstrapping chicken
+
+.PHONY: boot-chicken
+
+boot-chicken:
+	$(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) PREFIX=/nowhere CONFIG= \
+	  PROGRAM_SUFFIX=-boot STATICBUILD=1 confclean chicken-boot$(EXE) confclean
Trap