Makefile and -v flag

This commit is contained in:
secretspecter 2023-08-01 13:41:08 -06:00
parent cf232ec4d1
commit 360623154d
4 changed files with 27 additions and 5 deletions

View file

@ -4,3 +4,6 @@ indent_style=space
indent_size=2
tab_width=2
trim_trailing_whitespace=true
[Makefile]
indent_style=tab

17
Makefile Normal file
View file

@ -0,0 +1,17 @@
bin/geml-server: src/*.lisp
mkdir -p bin
sbcl --no-userinit --no-sysinit --non-interactive \
--load ~/quicklisp/setup.lisp \
--load build.lisp
clean:
-rm quicklisp-manifest.txt
-rm bin/geml-server
install: bin/geml-server
cp bin/geml-server /usr/local/bin/geml-server
#cp geml.service /etc/systemd/system
uninstall:
rm /usr/local/bin/geml-server
#rm /etc/systemd/system/geml.service

View file

@ -1,3 +0,0 @@
#!/bin/bash
mkdir bin
sbcl --non-interactive --load build.lisp

View file

@ -9,8 +9,12 @@
:meta-var "FILE"
:description "path to a geml.ini file"
:default "/etc/geml/geml.ini")
;; TODO --help gets picked upby sbcl...
;; -h works tho
;; TODO --help and --version gets picked up by sbcl...
;; -h and -v work tho
(:name :version
:short #\v
:long "version"
:description "shows the version of this build")
(:name :help
:short #\h
:long "help"
@ -34,4 +38,5 @@
(opts:exit 1)))
(cond
((getf options :help) (opts:describe :usage-of "geml-server"))
((getf options :version) (format t "~a~%" (slot-value (asdf:find-system 'geml) 'asdf:version)))
(t (start-server (getf options :config))))))