Easier install by detecting SBCL core-compression.

Various Linux distributions provide SBCL without core-compression
enabled. On the other hand, Mac OSX (at least via `homebrew`) SBCL with
core-compression enabled.  To make installation easier, teach the make
process to detect core-compression, and use it if possible.
This commit is contained in:
Richard Michael 2015-12-11 18:34:33 -05:00
parent d60b64c03b
commit 6dcdf4711b
3 changed files with 18 additions and 24 deletions

View File

@ -60,9 +60,9 @@ Now that the dependences are installed, just type make.
make
If using Mac OS X, and depending on how you did install `SBCL` and which
version you have (the brew default did change recently), you might need to
ask the Makefile to refrain from trying to compress your binary image:
If your `SBCL` supports core compression, the make process will use it
to generate a smaller binary. To force disabling core compression, you
may use:
make COMPRESS_CORE=no
@ -101,4 +101,3 @@ The `build` step install build dependencies in a debian jessie container,
then `git clone` and build `pgloader` in `/opt/src/pgloader` and finally
copy the resulting binary image in `/usr/local/bin/pgloader` so that it's
easily available.

View File

@ -35,27 +35,26 @@ BUILDAPP_CCL = $(BUILDDIR)/bin/buildapp.ccl$(EXE)
BUILDAPP_SBCL = $(BUILDDIR)/bin/buildapp.sbcl$(EXE)
ifeq ($(CL),sbcl)
BUILDAPP = $(BUILDAPP_SBCL)
CL_OPTS = --no-sysinit --no-userinit
BUILDAPP = $(BUILDAPP_SBCL)
BUILDAPP_OPTS = --require sb-posix \
--require sb-bsd-sockets \
--require sb-rotate-byte
CL_OPTS = --noinform --no-sysinit --no-userinit
else
BUILDAPP = $(BUILDAPP_CCL)
CL_OPTS = --no-init
endif
COMPRESS_CORE ?= yes
ifeq ($(CL),sbcl)
COMPRESS_CORE ?= $(shell $(CL) --noinform \
--quit \
--eval '(when (member :sb-core-compression cl:*features*) (write-string "yes"))')
endif
# note: on Windows_NT, we never core-compress; see above.
ifeq ($(COMPRESS_CORE),yes)
COMPRESS_CORE_OPT = --compress-core
else
COMPRESS_CORE_OPT =
endif
endif
ifeq ($(CL),sbcl)
BUILDAPP_OPTS = --require sb-posix \
--require sb-bsd-sockets \
--require sb-rotate-byte
endif
DEBUILD_ROOT = /tmp/pgloader

View File

@ -103,13 +103,9 @@ binary image, though it's possible to build using
$ make CL=ccl pgloader
Note that the `Makefile` uses the `--compress-core` option when using SBCL,
that should be enabled in your local copy of `SBCL`. If that's not the case,
it's probably because you did compile and install `SBCL` yourself, so that
you have a decently recent version to use. Then you need to compile it with
the `--with-sb-core-compression` option.
You can also remove the `--compress-core` option that way:
If using `SBCL` and it supports core compression, the make process will
use it to generate a smaller binary. To force disabling core
compression, you may use:
$ make COMPRESS_CORE=no pgloader