Commit 3f2d4375 authored by Radford Neal's avatar Radford Neal

fix problems with enabling/disabling byte-compilation

parent 37012399
......@@ -6,6 +6,9 @@ abs_top_builddir = @abs_top_builddir@
include $(top_srcdir)/share/make/vars.mk
@BYTE_COMPILE_PACKAGES_FALSE@R_NO_BASE_COMPILE = TRUE
@BYTE_COMPILE_PACKAGES_TRUE@R_NO_BASE_COMPILE = FALSE
AR = @AR@
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
......
Changes to fix installation problems, especially for Windows.
......@@ -5,7 +5,7 @@
$(top_builddir)/library/$(pkg)/R/$(pkg).rdb: all.R
@$(INSTALL_DATA) all.R $(top_builddir)/library/$(pkg)/R/$(pkg)
@if [ x$(R_NO_BASE_COMPILE) != x -a x$(R_NO_BASE_COMPILE) != xFALSE ]; then \
@if [ x$(R_NO_BASE_COMPILE) != xFALSE ]; then \
$(ECHO) "tools:::makeLazyLoading(\"$(pkg)\")" | \
R_DEFAULT_PACKAGES=$(DEFPKGS) LC_ALL=C $(R_EXE) > /dev/null; \
else \
......
......@@ -114,14 +114,19 @@ always completely adequate, is as follows:
compressed pointers are enabled) at the start of fixed\h\config.h
(in src\gnuwin32).
11) Enter the command
11) If you want the base and recommended packages to be byte compiled,
enter the commands
set R_NO_BASE_COMPILE=TRUE
set R_NO_BASE_COMPILE=FALSE
set R_PKG_BYTECOMPILE=TRUE
if you don't want the base and recommended packages to be byte
compiled. (If you want byte compilation, though it isn't always
desirable for pqR, do not set R_NO_BASE_COMPILE at all, or set it
to FALSE.)
Note that byte compilation is NOT recommended, so you should
probably NOT do this.
The compiled byte code will not actually be used unless the
following command is also entered each time before R is run:
set R_USE_BYTECODE=TRUE
12) Issue the following commands in a Windows console (command
prompt) window (after issuing the commands in step (5)), in order
......
......@@ -24,8 +24,6 @@ all: Makefile R
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
@BYTE_COMPILE_PACKAGES_FALSE@R_NO_BASE_COMPILE = true
## FIXME: do some of this in parallel?
## Beware there is a bootstrapping problem here: tools uses tools to
## dump its namespace. So it works initially, but not to update.
......@@ -37,13 +35,13 @@ R:
@for pkg in profile base tools compiler; do \
(cd $${pkg} && $(MAKE) all) || exit 1; \
done
@if [ x$(R_NO_BASE_COMPILE) = x -o x$(R_NO_BASE_COMPILE) = xFALSE ]; then \
@if [ x$(R_NO_BASE_COMPILE) != xFALSE ]; then \
for pkg in base tools; do \
(cd $${pkg} && $(MAKE) mklazycomp) || exit 1; \
(cd $${pkg} && $(MAKE) Rlazy) || exit 1; \
done; \
else \
for pkg in base tools; do \
(cd $${pkg} && $(MAKE) Rlazy) || exit 1; \
(cd $${pkg} && $(MAKE) mklazycomp) || exit 1; \
done; \
fi
@for pkg in $(R_PKGS_BASE1); do \
......
......@@ -33,13 +33,13 @@ R:
$(MAKE) -C $${pkg} -f Makefile.win R_ARCH=$(R_ARCH) VERSION=$(RVER) \
all install-tests || exit 1; \
done
@if [ x$(R_NO_BASE_COMPILE) = x -o x$(R_NO_BASE_COMPILE) = xFALSE ]; then \
@if [ x$(R_NO_BASE_COMPILE) != xFALSE ]; then \
for pkg in base tools; do \
$(MAKE) -C $${pkg} -f Makefile.win mklazycomp || exit 1; \
$(MAKE) -C $${pkg} -f Makefile.win Rlazy || exit 1; \
done; \
else \
for pkg in base tools; do \
$(MAKE) -C $${pkg} -f Makefile.win Rlazy || exit 1; \
$(MAKE) -C $${pkg} -f Makefile.win mklazycomp || exit 1; \
done; \
fi
@for pkg in $(R_PKGS_BASE1); do \
......
......@@ -51,7 +51,7 @@ INSTALL_OPTS2 =@BYTE_COMPILE_PACKAGES_TRUE@ --byte-compile
@$(ECHO) "begin installing recommended package" `basename $< .tgz`
@rm -f $@.out
## Avoid user/site libraries, pass down MAKE
@if [ x$(R_NO_BASE_COMPILE) != x -a x$(R_NO_BASE_COMPILE) != xFALSE ]; then \
@if [ x$(R_NO_BASE_COMPILE) != xFALSE ]; then \
MAKE="$(MAKE)" R_LIBS_USER= R_LIBS_SITE= \
_R_CHECK_INSTALL_DEPENDS_=no \
$(R) CMD INSTALL $(INSTALL_OPTS) -l "$(top_builddir)/library" $< > $@.out 2>&1 || (cat $@.out && exit 1); \
......
#-*- Makefile -*-
1#-*- Makefile -*-
#
# ${R_HOME}/src/library/Recommended/Makefile.win
......@@ -37,7 +37,7 @@ RCMD = $(top_builddir)/$(BINDIR)/Rcmd
.tgz.ts:
@echo
@echo "----- installing recommended package" `basename $< .tgz`
@if [ x$(R_NO_BASE_COMPILE) != x -a x$(R_NO_BASE_COMPILE) != xFALSE ]; then \
@if [ x$(R_NO_BASE_COMPILE) != xFALSE ]; then \
R_INSTALL_TAR='tar.exe --no-same-owner --no-same-permissions' \
R_LIBS_USER= R_LIBS_SITE= \
_R_CHECK_INSTALL_DEPENDS_=no \
......
......@@ -19,12 +19,15 @@ RSRC = `LC_COLLATE=C ls $(srcdir)/R/*.R`
R_EXE = $(top_builddir)/bin/R --vanilla --slave
EXTRAS = @BYTE_COMPILE_PACKAGES_TRUE@ R_COMPILE_PKGS=1 R_COMPILER_SUPPRESS_ALL=1
@BYTE_COMPILE_PACKAGES_FALSE@R_NO_BASE_COMPILE = TRUE
@BYTE_COMPILE_PACKAGES_TRUE@R_NO_BASE_COMPILE = FALSE
all: Makefile DESCRIPTION
@$(ECHO) "building package '$(pkg)'"
@$(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)
@$(MAKE) mkR2 mkdesc mkpo
@$(MAKE) mksrc
@if [ x$(R_NO_BASE_COMPILE) != x -a x$(R_NO_BASE_COMPILE) != xFALSE ]; then \
@if [ x$(R_NO_BASE_COMPILE) != xFALSE ]; then \
$(MAKE) RfilesLazy; \
else \
$(MAKE) RfilesLazy EXTRAS2=$(EXTRAS); \
......
......@@ -19,7 +19,7 @@ all:
@$(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)
@$(MAKE) -f Makefile.win mkR2 front mkdesc mkpo
@$(MAKE) -f Makefile.win mksrc-win2
@if [ x$(R_NO_BASE_COMPILE) != x -a x$(R_NO_BASE_COMPILE) != xFALSE ]; then \
@if [ x$(R_NO_BASE_COMPILE) != xFALSE ]; then \
$(MAKE) -f Makefile.win RfilesLazy; \
else \
$(MAKE) -f Makefile.win RfilesLazy EXTRAS2=$(EXTRAS); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment