-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathomg.asd
39 lines (35 loc) · 1.84 KB
/
omg.asd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
(defsystem "omg"
:description "A Common Lisp library to build fully dynamic web interfaces"
:version "0.2.0"
:author "Pavel Kaygorodov <hemml@me.com>"
:licence "GPLv3"
:homepage "https://github.com/hemml/OMGlib"
:source-control "https://github.com/hemml/OMGlib.git"
:depends-on ("clack" "websocket-driver-server" "bordeaux-threads" "trivial-utf-8" "media-types" "hunchentoot"
"pngload" "skippy" "cl-jpeg" "cl-parallel")
:build-operation "static-program-op"
:components ((:static-file "README.md")
(:static-file "LICENSE")
(:file "omg")
(:file "omgui" :depends-on ("omg"))
(:file "omgutil" :depends-on ("omg"))
(:file "omgwidgets" :depends-on ("omg" "omgui"))))
(defparameter *jscl-dir* (merge-pathnames (make-pathname :directory '(:relative "jscl"))
(asdf:system-source-directory :omg)))
(load (merge-pathnames (make-pathname :name "jscl.lisp") *jscl-dir*))
(defparameter jscl::*jscl-js* (make-array '(0) :element-type 'base-char :fill-pointer 0 :adjustable t))
;; Adopted from jscl.lisp:
(let ((jscl::*features* (list* :jscl :jscl-xc jscl::*features*))
(jscl::*package* (find-package "JSCL"))
(jscl::*default-pathname-defaults* *jscl-dir*))
(setq jscl::*environment* (jscl::make-lexenv))
(jscl::with-compilation-environment
(jscl::with-output-to-string (jscl::out jscl::*jscl-js*)
(format jscl::out "(function(){~%")
(format jscl::out "'use strict';~%")
(jscl::write-string (jscl::read-whole-file (jscl::source-pathname "prelude.js")) jscl::out)
(jscl::do-source input :target
(jscl::!compile-file input jscl::out :print nil))
(jscl::dump-global-environment jscl::out)
(jscl::!compile-file "src/toplevel.lisp" jscl::out :print nil)
(format jscl::out "})();~%"))))