Skip to content

Commit a6aa93a

Browse files
committed
update gitignore, add options to makefile, update make-image, update asd file, fix some errors in code
1 parent 6b95f35 commit a6aa93a

File tree

6 files changed

+45
-22
lines changed

6 files changed

+45
-22
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
\'#*
55
.DS_Store
66
\#*
7-
nobot-app
7+
release/

make-image.lisp

+13-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,20 @@
66
(load "nobot/nobot.asd")
77
(asdf:load-system :nobot)
88

9+
;; application parameters
10+
(defparameter *nobot-application-name* "nobot")
11+
(defparameter *nobot-version* "0.1")
12+
(defparameter *nobot-spec-name* "mega-trash")
13+
914
;; make image
10-
(sb-ext:save-lisp-and-die
11-
#p "nobot-app"
15+
(sb-ext:save-lisp-and-die
16+
(make-pathname
17+
:directory '(:relative "release")
18+
:name (format nil "~a-~a-~a"
19+
*nobot-application-name*
20+
*nobot-version*
21+
*nobot-spec-name*)
22+
:type "bin")
1223
:toplevel #'nobot/startup:*run*
1324
:save-runtime-options t
1425
:executable t)

makefile

+18-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
11
# Copyright (c) 2021 Bohdan Sokolovskyi
22
# Author: Bohdan Sokolovskyi <[email protected]>
33

4+
# config variables
5+
project-dir=nobot/
6+
SHELL=/bin/bash
7+
48
.PHONY: clean
59

6-
project-dir=nobot/
10+
all: build install
11+
12+
build: clean
13+
mkdir release
14+
sbcl --disable-debugger \
15+
--load make-image.lisp
16+
17+
help:
18+
@echo "all build help install uninstall clean"
19+
20+
install:
721

8-
build:
9-
sbcl --load make-image.lisp
22+
uninstall:
1023

1124
clean:
12-
rm nobot-app || :
13-
(find $(project-dir) -name '*.fasl' -print0 | xargs -0 rm ||:)
25+
(rm -rf release || :)
26+
(find $(project-dir) -name '*.fasl' -print0 | xargs -0 rm || :)

nobot/botscript/parser/acacia.lisp

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
#:define-rule
2727
#:pack-parse-tree
2828
#:acacia-packed-result
29-
#:get-parse-tree
30-
#:get-source-type
31-
#:get-source))
29+
#:acacia-get-parse-tree
30+
#:acacia-get-source-type
31+
#:acacia-get-source))

nobot/botscript/parser/acacia/result-packaging.lisp

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@
66
(:use :cl)
77
(:export #:pack-parse-tree
88
#:acacia-packed-result
9-
#:get-parse-tree
10-
#:get-source-type
11-
#:get-source))
9+
#:acacia-get-parse-tree
10+
#:acacia-get-source-type
11+
#:acacia-get-source))
1212

1313
(in-package :nobot/botscript/parser/acacia/result-packaging)
1414

1515
(defclass acacia-packed-result ()
1616
((parse-tree
1717
:type list
1818
:initarg :parse-tree
19-
:reader get-parse-tree)
19+
:reader acacia-get-parse-tree)
2020
(source-type
2121
:type keyword
2222
:initarg :source-type
23-
:reader get-source-type)
23+
:reader acacia-get-source-type)
2424
(source
2525
:type string
2626
:initarg :source
27-
:reader get-source)))
27+
:reader acacia-get-source)))
2828

2929
(defmethod initialize-instance :around ((res acacia-packed-result) &key parse-tree
3030
source-type

nobot/nobot.asd

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
;;;; Author: Bohdan Sokolovskyi <[email protected]>
33

44

5-
(asdf:defsystem "nobot"
5+
(asdf:defsystem :nobot
66
:class :package-inferred-system
77
:defsystem-depends-on (:asdf-package-system)
88
:description "Engine for creating chat bots"
9-
:version "1.0"
9+
:version "0.1"
1010
:author "Sokolovskyi Bohdan"
1111
:depends-on ("nobot/startup"
1212
"nobot/toplevel"
@@ -24,6 +24,5 @@
2424
"cl-ppcre"
2525
"unix-opts"
2626
"yason")
27-
:in-order-to ((test-op (load-op "nobot/tests")))
28-
;;TODO: change to rewd from string + eval, or another solution
29-
:perform (test-op (o c) (uiop:symbol-call :nobot/tests :run-unit-tests)))
27+
:in-order-to ((asdf:test-op (asdf:load-op :nobot/tests)))
28+
:perform (asdf:test-op (o c) (uiop:symbol-call :nobot/tests :run-unit-tests)))

0 commit comments

Comments
 (0)