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

Last change on this file was 28450, checked in by Christian Kellermann, 8 years ago

vandusen: add make dependency to .meta and use it in .setup

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