-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhato.setup
More file actions
99 lines (91 loc) · 3.24 KB
/
Copy pathhato.setup
File metadata and controls
99 lines (91 loc) · 3.24 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
(use extras)
(define version (call-with-input-file "VERSION" read-line))
;; compute dependencies for other modules in the current directory
;; (define (module-deps mod)
;; (let* ((path (string-append (symbol->string mod) ".scm"))
;; (code (read-file path)))
;; (let deps ((x code) (res '()))
;; (if (pair? x)
;; (case (car x)
;; ((import use require-extension)
;; )
;; ((autoload)
;; )
;; (else
;; (module-deps (cdr x) (module-deps (car x) res))))
;; res))))
(define-syntax compile-module
(er-macro-transformer
(lambda (expr rename compare)
(let* ((module (cadr expr))
(mod-str (symbol->string module))
(mod-src (string-append mod-str ".scm"))
(mod-import (string-append mod-str ".import.scm"))
(mod-so (string-append mod-str ".so"))
(mod-import-so (string-append mod-str ".import.so"))
(_begin (rename 'begin))
(_make (rename 'make))
(_compile (rename 'compile))
(_install-extension (rename 'install-extension)))
`(,_make ((,mod-so (,mod-src)
(,_begin
(,_compile -s -O2 -j ,module ,mod-src)
(,_compile -s -O2 ,mod-import)
(,_install-extension
',module
'(,mod-so ,mod-import-so)
'((version ,version)))))))))))
(define-syntax compile-executable
(er-macro-transformer
(lambda (expr rename compare)
(let* ((executable (cadr expr))
(exec-str (symbol->string executable))
(exec-src (string-append exec-str ".scm"))
(_begin (rename 'begin))
(_make (rename 'make))
(_compile (rename 'compile))
(_install-program (rename 'install-program)))
`(,_make ((,exec-str (,exec-src)
(,_begin
(,_compile -O2 -d2 ,exec-src)
(,_install-program
',executable
'(,exec-str)
'((version ,version)))))))))))
(compile-module dns)
(compile-module let-args)
(compile-module let-keywords)
(compile-module lru-cache)
(compile-module quoted-printable)
(compile-module safe-io)
(compile-module safe-eval)
(compile-module hato-base64)
(compile-module hato-uri)
(compile-module hato-log)
(compile-module hato-utils)
(compile-module hato-date)
(compile-module hato-mime)
(compile-module hato-archive)
(compile-module hato-db)
(compile-module hato-i3db)
(compile-module hato-config)
(compile-module hato-daemon)
(compile-module hato-imap)
(compile-module hato-md5)
(compile-module domain-keys)
(compile-module hato-pop)
(compile-module hato-smtp)
(compile-module hato-nntp)
(compile-module hato-rfc3028)
(compile-module hato-http)
(compile-module hato-spf)
(compile-module hato-token)
(compile-module hato-prob)
(compile-module hato-filter-env)
(compile-module highlight)
(compile-module html-summary)
(compile-module wiki-utils)
(compile-module wiki-parse)
(compile-module wiki-write)
(compile-executable hato-fetch)
(compile-executable hato-httpd)