diff --git a/INSTALL.txt b/INSTALL.txt index 388694fad0..5f928efdf3 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -179,11 +179,12 @@ More Instructions: Building Racket-on-Chez The `make cs` target (or `make cs-as-is` for a rebuild, or `nmake win32-cs` on Windows with Visual Studio) builds an experimental -variant of Racket that runs on Chez Scheme. The executables for the -Racket-on-Chez variant all have a "cs" or "CS" suffix, so they coexist -with a traditional Racket build. (One day, if the experiment goes -well, there will be an option or default to build Racket-on-Chez as -`racket` instead of `racketcs`.) +variant of Racket that runs on Chez Scheme. By default, the +executables for the Racket-on-Chez variant all have a "cs" or "CS" +suffix, so they coexist with a traditional Racket build. You can +remove the "cs" suffix by providing `RACKETCS_SUFFIX=""` to `make`. +(One day, if the experiment goes well, the default for +`RACKETCS_SUFFIX with change from "cs" to "".) Building Racket-on-Chez requires an existing Racket and Chez Scheme. If you use `make cs` with no further arguments, then the build process diff --git a/Makefile b/Makefile index 2e625b6c0d..36d7138928 100644 --- a/Makefile +++ b/Makefile @@ -140,7 +140,7 @@ cpus-unix-style: plain-unix-style: if [ "$(PREFIX)" = "" ] ; then $(MAKE) error-need-prefix ; fi - $(MAKE) base CONFIGURE_ARGS_qq='$(CONFIGURE_ARGS_qq) $(CONFIG_PREFIX_ARGS)' $(UNIX_BASE_ARGS) + $(MAKE) base MORE_CONFIGURE_ARGS="$(MORE_CONFIGURE_ARGS) $(CONFIG_PREFIX_ARGS)" $(UNIX_BASE_ARGS) $(MAKE) set-src-catalog $(MAKE) local-catalog "$(DESTDIR)$(PREFIX)/bin/raco" pkg install $(UNIX_RACO_ARGS) $(REQUIRED_PKGS) $(PKGS) @@ -169,7 +169,8 @@ set-src-catalog: # an empty set of link files, so that any installation-wide # links or packages are ignored during the base build. -CONFIGURE_ARGS_qq = +CONFIGURE_ARGS_qq = +MORE_CONFIGURE_ARGS = SELF_UP = SELF_FLAGS_qq = SELF_RACKET_FLAGS="-G `cd $(SELF_UP)../../../build/config; pwd`" @@ -210,7 +211,7 @@ win32-remove-setup-dlls: IF EXIST racket\lib\ssleay32.dll cmd /c del racket\lib\ssleay32.dll racket/src/build/Makefile: racket/src/configure racket/src/Makefile.in - cd racket/src/build; ../configure $(CONFIGURE_ARGS_qq) + cd racket/src/build; ../configure $(CONFIGURE_ARGS_qq) $(MORE_CONFIGURE_ARGS) # For cross-compilation, build a native executable with no configure options: @@ -226,6 +227,11 @@ racket/src/build/cross/Makefile: racket/src/configure racket/src/Makefile.in # ------------------------------------------------------------ # Racket-on-Chez build +# If `RACKETCS_SUFFIX` is set to the empty string, the Racket-on-Chez +# is build as `racket` instead of `racketcs`. Also, if `RACKET` +# is not set, then `--enable-csdefault` is added to +RACKETCS_SUFFIX = cs + # If `RACKET` is not set, then we bootstrap by first building the # traditional virtual machine RACKET = @@ -280,7 +286,14 @@ cs-after-racket: then $(MAKE) cs-after-racket-with-racket RACKET="$(PLAIN_RACKET)" ; \ else $(MAKE) cs-after-racket-with-racket RACKET="$(RACKET)" ; fi +RACKETCS_SUFFIX_CONFIG = MORE_CONFIGURE_ARGS="$(MORE_CONFIGURE_ARGS) --enable-csdefault" PLAIN_RACKET="$(PLAIN_RACKET)3m" + racket-then-cs: + if [ "$(RACKETCS_SUFFIX)" = "" ] ; \ + then $(MAKE) racket-configured-then-cs $(RACKETCS_SUFFIX_CONFIG) ; \ + else $(MAKE) racket-configured-then-cs ; fi + +racket-configured-then-cs: $(MAKE) $(BASE_TARGET) PKGS="compiler-lib parser-tools-lib" $(RUN_RACO) setup $(ALL_PLT_SETUP_OPTIONS) -D -l compiler parser-tools $(MAKE) cs-after-racket-with-racket RACKET="$(PLAIN_RACKET)" @@ -296,12 +309,15 @@ cs-after-racket-with-racket: cs-after-racket-with-racket-and-scheme-src: $(MAKE) cs-after-racket-with-abs-paths RACKET="$(ABS_RACKET)" SCHEME_SRC="$(ABS_SCHEME_SRC)" SELF_UP=../ +UPCASE_PROG = "(displayln (string-upcase (vector-ref (current-command-line-arguments) 0)))" +SUFFIX_ARGS = CS_INSTALLED=$(RACKETCS_SUFFIX) CS_GR_INSTALLED="`$(RACKET) -I racket/base -e $(UPCASE_PROG) "$(RACKETCS_SUFFIX)"`" + cs-after-racket-with-abs-paths: $(MAKE) racket/src/build/cs/Makefile cd racket/src/build/cs; $(MAKE) RACKET="$(RACKET)" SCHEME_SRC="$(SCHEME_SRC)" MAKE_BUILD_SCHEME="$(MAKE_BUILD_SCHEME)" $(MAKE) base-config - cd racket/src/build/cs; $(MAKE) install RACKET="$(RACKET)" $(INSTALL_SETUP_ARGS) - $(MAKE) $(CS_SETUP_TARGET) PLAIN_RACKET=racket/bin/racketcs + cd racket/src/build/cs; $(MAKE) install RACKET="$(RACKET)" $(SUFFIX_ARGS) $(INSTALL_SETUP_ARGS) + $(MAKE) $(CS_SETUP_TARGET) PLAIN_RACKET=racket/bin/racket$(RACKETCS_SUFFIX) nothing-after-base: echo base done @@ -336,8 +352,8 @@ win32-just-cs: cmd /c $(RACKET) racket\src\worksp\csbuild.rkt --scheme-dir "$(SCHEME_SRC)" IF NOT EXIST build\config cmd /c mkdir build\config cmd /c echo #hash((links-search-files . ())) > build\config\config.rktd - racket\racketcs -G build\config -N raco -l- raco setup $(JOB_OPTIONS) $(PLT_SETUP_OPTIONS) - $(MAKE) win32-in-place-after-base WIN32_PLAIN_RACKET=racket\racketcs $(WIN32_CS_COPY_ARGS) + racket\racket$(RACKETCS_SUFFIX) -G build\config -N raco -l- raco setup $(JOB_OPTIONS) $(PLT_SETUP_OPTIONS) + $(MAKE) win32-in-place-after-base WIN32_PLAIN_RACKET=racket\racket$(RACKETCS_SUFFIX) $(WIN32_CS_COPY_ARGS) # ------------------------------------------------------------ # Configuration options for building installers diff --git a/racket/src/configure b/racket/src/configure index e3745e0b45..642dce1016 100755 --- a/racket/src/configure +++ b/racket/src/configure @@ -821,6 +821,7 @@ enable_libfw enable_macprefix enable_mac64 enable_cgcdefault +enable_csefault enable_sgc enable_sgcdebug enable_backtrace @@ -1477,6 +1478,7 @@ Optional Features: --enable-macprefix allow --prefix with a Mac OS install --enable-mac64 allow 64-bit Mac OS build (enabled by default) --enable-cgcdefault use CGC as default build (NOT RECOMMENDED) + --enable-csdefault prepare for CS as default build (not CGC or 3m) --enable-sgc use Senora GC instead of Boehm GC (enabled by default) --enable-sgcdebug use Senora GC for debugging (expensive debug mode) --enable-backtrace 3m: support GC backtrace dumps (expensive debug mode) @@ -2771,6 +2773,11 @@ if test "${enable_cgcdefault+set}" = set; then : enableval=$enable_cgcdefault; fi +# Check whether --enable-csefault was given. +if test "${enable_csefault+set}" = set; then : + enableval=$enable_csefault; +fi + # Check whether --enable-sgc was given. if test "${enable_sgc+set}" = set; then : enableval=$enable_sgc; @@ -3056,7 +3063,13 @@ show_explicitly_enabled() fi } +if test "${enable_cgcdefault}" != "" ; then + if test "${enable_csdefault}" != "" ; then + echo "ERROR: cannot specify both --enable-cgcdefault and --enable-csdefault" + fi +fi show_explicitly_enabled "${enable_cgcdefault}" "CGC as default" "Note that this mode is NOT RECOMMENDED for normal Racket use" +show_explicitly_enabled "${enable_csdefault}" "CS will be default" show_explicitly_disabled "${enable_docs}" "Documentation build" show_explicitly_enabled "${enable_usersetup}" "User-specific setup on install" @@ -4912,6 +4925,11 @@ if test "${enable_cgcdefault}" ; then MAIN_VARIANT=cgc fi +if test "${enable_csdefault}" ; then + MMM_INSTALLED=3m + MMM_CAP_INSTALLED=3m +fi + ############## SGC ################ if test "${enable_sgcdebug}" = "yes" ; then diff --git a/racket/src/cs/c/Makefile.in b/racket/src/cs/c/Makefile.in index 4049bc4f6f..77ae2d4501 100644 --- a/racket/src/cs/c/Makefile.in +++ b/racket/src/cs/c/Makefile.in @@ -198,7 +198,7 @@ ICP=@ICP@ install: $(MAKE) plain-install - $(srcdir)/../../../bin/racketcs $(SELF_RACKET_FLAGS) -N raco -l- raco setup $(PLT_SETUP_OPTIONS) + $(srcdir)/../../../bin/racket$(RACKETCS_SUFFIX) $(SELF_RACKET_FLAGS) -N raco -l- raco setup $(PLT_SETUP_OPTIONS) plain-install@NOT_OSX@: $(MAKE) unix-install diff --git a/racket/src/racket/configure.ac b/racket/src/racket/configure.ac index 8f8d81dfef..a00d7d7be7 100644 --- a/racket/src/racket/configure.ac +++ b/racket/src/racket/configure.ac @@ -69,6 +69,7 @@ AC_ARG_ENABLE(macprefix, [ --enable-macprefix allow --prefix with a Mac OS AC_ARG_ENABLE(mac64, [ --enable-mac64 allow 64-bit Mac OS build (enabled by default)], , enable_mac64=yes) AC_ARG_ENABLE(cgcdefault, [ --enable-cgcdefault use CGC as default build (NOT RECOMMENDED)]) +AC_ARG_ENABLE(csefault, [ --enable-csdefault prepare for CS as default build (not CGC or 3m)]) AC_ARG_ENABLE(sgc, [ --enable-sgc use Senora GC instead of Boehm GC (enabled by default)], , enable_sgc=yes) AC_ARG_ENABLE(sgcdebug,[ --enable-sgcdebug use Senora GC for debugging (expensive debug mode)]) AC_ARG_ENABLE(backtrace, [ --enable-backtrace 3m: support GC backtrace dumps (expensive debug mode)]) @@ -296,7 +297,13 @@ show_explicitly_enabled() fi } +if test "${enable_cgcdefault}" != "" ; then + if test "${enable_csdefault}" != "" ; then + echo "ERROR: cannot specify both --enable-cgcdefault and --enable-csdefault" + fi +fi show_explicitly_enabled "${enable_cgcdefault}" "CGC as default" "Note that this mode is NOT RECOMMENDED for normal Racket use" +show_explicitly_enabled "${enable_csdefault}" "CS will be default" show_explicitly_disabled "${enable_docs}" "Documentation build" show_explicitly_enabled "${enable_usersetup}" "User-specific setup on install" @@ -1003,6 +1010,11 @@ if test "${enable_cgcdefault}" ; then MAIN_VARIANT=cgc fi +if test "${enable_csdefault}" ; then + MMM_INSTALLED=3m + MMM_CAP_INSTALLED=3m +fi + ############## SGC ################ if test "${enable_sgcdebug}" = "yes" ; then