commit e2a366997c94967c9e11dfb7a9f868cf5ba36007
parent 24f97a5702c9ff37a23bd5170bb5a69d1507e170
Author: Tomas Hlavaty <tom@logand.com>
Date:   Sat,  1 Nov 2014 13:08:14 +0100
build also demo-counter image
Diffstat:
3 files changed, 77 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
@@ -0,0 +1,10 @@
+all: cl-rw-demo-counter cl-rw-demo-zappel
+
+cl-rw-demo-counter:
+	sbcl --eval '(require :cl-rw-demo-counter)' --eval '(rw.demo.counter::save-image)'
+
+cl-rw-demo-zappel:
+	sbcl --eval '(require :cl-rw-demo-zappel)' --eval '(rw.demo.zappel::save-image)'
+
+clean:
+	rm -f cl-rw-demo-counter cl-rw-demo-zappel
diff --git a/cl-rw-demo-counter.asd b/cl-rw-demo-counter.asd
@@ -0,0 +1,31 @@
+;;; -*- lisp; -*-
+
+;;; Copyright (C) 2013, 2014 Tomas Hlavaty <tom@logand.com>
+;;;
+;;; Permission is hereby granted, free of charge, to any person
+;;; obtaining a copy of this software and associated documentation
+;;; files (the "Software"), to deal in the Software without
+;;; restriction, including without limitation the rights to use, copy,
+;;; modify, merge, publish, distribute, sublicense, and/or sell copies
+;;; of the Software, and to permit persons to whom the Software is
+;;; furnished to do so, subject to the following conditions:
+;;;
+;;; The above copyright notice and this permission notice shall be
+;;; included in all copies or substantial portions of the Software.
+;;;
+;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+;;; DEALINGS IN THE SOFTWARE.
+
+(asdf:defsystem :cl-rw-demo-counter
+  :author "Tomas Hlavaty"
+  :maintainer "Tomas Hlavaty"
+  :licence "MIT"
+  :depends-on (:cl-rw)
+  :serial t
+  :components ((:file "demo-counter")))
diff --git a/demo-counter.lisp b/demo-counter.lisp
@@ -1,3 +1,25 @@
+;;; Copyright (C) 2013, 2014 Tomas Hlavaty <tom@logand.com>
+;;;
+;;; Permission is hereby granted, free of charge, to any person
+;;; obtaining a copy of this software and associated documentation
+;;; files (the "Software"), to deal in the Software without
+;;; restriction, including without limitation the rights to use, copy,
+;;; modify, merge, publish, distribute, sublicense, and/or sell copies
+;;; of the Software, and to permit persons to whom the Software is
+;;; furnished to do so, subject to the following conditions:
+;;;
+;;; The above copyright notice and this permission notice shall be
+;;; included in all copies or substantial portions of the Software.
+;;;
+;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+;;; DEALINGS IN THE SOFTWARE.
+
 (defpackage :rw.demo.counter
   (:use :cl))
 
@@ -76,3 +98,17 @@
   (rw.http:server "0.0.0.0" 2349 'counter-handler :quit (lambda () nil)))
 
 ;;(start)
+
+(defun save-image ()
+  #-sbcl
+  (error "TODO RW.DEMO.COUNTER::SAVE-IMAGE")
+  #+sbcl
+  (sb-ext:save-lisp-and-die "cl-rw-demo-counter"
+                            :executable t
+                            :toplevel (lambda ()
+                                        (handler-case
+                                            (progn
+                                              (start)
+                                              (loop (sleep 1)))
+                                          (condition ()
+                                            (sb-ext:exit :code 1 :abort t))))))