source: project/release/4/vandusen/trunk/vandusen.setup @ 21101

Last change on this file since 21101 was 21101, checked in by Moritz Heidkamp, 10 years ago

vandusen: add vandusen-pager module by Christian Kellermann and bump version

File size: 1.8 KB
Line 
1(define version (call-with-input-file "VERSION" read-line))
2
3;; these macros are stolen from hato
4
5(define-syntax compile-module
6  (er-macro-transformer
7   (lambda (expr rename compare)
8     (let* ((module (cadr expr))
9            (mod-str (symbol->string module))
10            (mod-src (string-append mod-str ".scm"))
11            (mod-import (string-append mod-str ".import.scm"))
12            (mod-so (string-append mod-str ".so"))
13            (mod-import-so (string-append mod-str ".import.so"))
14            (_begin (rename 'begin))
15            (_make (rename 'make))
16            (_compile (rename 'compile))
17            (_install-extension (rename 'install-extension)))
18       `(,_begin
19         (,_make ((,mod-so (,mod-src)
20                           (,_begin
21                            (,_compile -s -O2 -j ,module ,mod-src)
22                            (,_compile -s -O2 ,mod-import)))))
23         (,_install-extension
24          ',module
25          '(,mod-so ,mod-import-so)
26          '((version ,version))))))))
27
28(define-syntax compile-executable
29  (er-macro-transformer
30   (lambda (expr rename compare)
31     (let* ((executable (cadr expr))
32            (exec-str (symbol->string (caddr expr)))
33            (exec-src (string-append (symbol->string (cadr expr)) ".scm"))
34            (_begin (rename 'begin))
35            (_make (rename 'make))
36            (_compile (rename 'compile))
37            (_install-program (rename 'install-program)))
38       `(,_begin
39         (,_make ((,exec-str (,exec-src)
40                             (,_begin
41                              (,_compile -o ,exec-str -O2 -d2 ,exec-src)))))
42         (,_install-program
43          ',executable
44          '(,exec-str)
45          '((version ,version))))))))
46
47
48(compile-module vandusen)
49(compile-module vandusen-doc)
50(compile-module vandusen-eval)
51(compile-module vandusen-remote)
52(compile-module vandusen-random-talk)
53(compile-module vandusen-poll)
54(compile-module vandusen-control)
55(compile-module vandusen-pager)
56(compile-executable vandusen-cmd vandusen)
Note: See TracBrowser for help on using the repository browser.