xach / buildapp

Buildapp makes it easy to build application executables with SBCL
http://www.xach.com/lisp/buildapp/
122 stars 26 forks source link

Incorrect command line flags when providing path for SBCL #37

Open rpgoldman opened 1 year ago

rpgoldman commented 1 year ago

When I make buildapp with an absolute pathname for SBCL, like this:

make DESTDIR=/home/rpg/.local/bin/ LISP=/opt/sbcl/current/bin/sbcl

I get the wrong command line arguments to SBCL (--no-init instead of --no-userinit and --no-sysinit):

/opt/sbcl/current/bin/sbcl --quiet --no-init \
  --eval "(require 'asdf)" \
  --eval "(push \"$(pwd)/\" asdf:*central-registry*)" \
  --eval "(require 'buildapp)" \
          --eval "(buildapp::build-buildapp)" \
          --eval "#+sbcl (exit) #+ccl (quit)"

When I use simply sbcl I do not get this problem:

$ make DESTDIR=/home/rpg/.local/bin/ LISP=sbcl
sbcl --noinform --no-userinit --no-sysinit --disable-debugger \
  --eval "(require 'asdf)" \
  --eval "(push \"$(pwd)/\" asdf:*central-registry*)" \
  --eval "(require 'buildapp)" \
          --eval "(buildapp::build-buildapp)" \
          --eval "#+sbcl (exit) #+ccl (quit)"

This is due to a bug in the Makefile:

ifeq ($(LISP),sbcl)
FLAGS=--noinform --no-userinit --no-sysinit --disable-debugger
else
FLAGS=--quiet --no-init
endif

The check for sbcl should be a substring or basename check, not an absolute check.

I will try to get you an MR for this; I don't have time at the moment, but am filing this issue so I don't forget.