Browse Source

updated makefile to newer style

changed variable names in db
master
ava 8 months ago
parent
commit
73a8919ef4
2 changed files with 10 additions and 17 deletions
  1. +8
    -15
      Makefile
  2. +2
    -2
      src/db.lisp

+ 8
- 15
Makefile View File

@@ -1,26 +1,19 @@
LISPS = sbcl ros clisp cmucl ccl
LISPS = ros sbcl clisp cmucl ccl
CMDS = --eval "(ql:quickload :universe-time-calc)" --eval "(asdf:make :universe-time-calc)" --eval "(quit)"

ifeq ($(OS),Windows_NT)
WHERE = where
else
WHERE = which
endif

ifeq ($(OS),Windows_NT)
NULL = >NUL
LISP := $(foreach lisp,$(LISPS), \
$(shell where $(lisp)) \
$(if $(.SHELLSTATUS),$(strip $(lisp)),))
else
NULL = 2>/dev/null
LISP := $(foreach lisp,$(LISPS), \
$(if $(findstring $(lisp),"$(shell which $(lisp) 2>/dev/null)"), $(strip $(lisp)),))
endif

CMDS = --load universe-time-calc.asd --eval '(ql:quickload :)' --eval '(asdf:make :universe-time-calc)' --eval '(quit)'

# this doesnt seem to work in windows?
LISP := $(foreach lisp,$(LISPS), \
$(if $(findstring $(lisp),"$(shell $(WHERE) $(lisp) $(NULL))"), $(strip $(lisp)),))

ifeq ($(LISP),)
$(error "No lisps found")
endif

build:
all:
$(LISP) $(CMDS)

+ 2
- 2
src/db.lisp View File

@@ -35,9 +35,9 @@
"runs all database create statements"

;; creates our database file if using sqlite3
(let ((sqlite? (car (connection-settings)))
(let ((type (car (connection-settings)))
(db-name (getf (cdr (connection-settings)) :database-name)))
(when (eql sqlite? :sqlite3)
(when (eql type :sqlite3)
(with-open-file (out db-name
:direction :output
:if-exists nil


Loading…
Cancel
Save