source: project/release/4/synch/tags/2.0.0/synch.setup @ 13514

Last change on this file since 13514 was 13514, checked in by Kon Lovett, 11 years ago

Real verno.

File size: 1.7 KB
Line 
1;;;; synch.setup
2
3;;;
4
5(required-chicken-version 4.0)
6
7;;
8
9(define (make-fn bn . en)
10  (apply make-pathname #f (->string bn) en) )
11
12(define (doc-fn bn)
13  (make-fn bn "html") )
14
15(define (source-fn bn)
16  (make-fn bn "scm") )
17
18(define (shared-fn bn)
19  (make-fn bn ##sys#load-dynamic-extension) )
20
21(define (static-fn bn)
22  (make-fn bn "o") )
23
24(define (import-fn bn)
25  (make-fn bn "import") )
26
27(define (source-import-fn bn)
28  (source-fn (import-fn bn)) )
29
30(define (shared-import-fn bn)
31  (shared-fn (import-fn bn)) )
32
33;;
34
35(define (compile-static-extension nam . args)
36  (compile ,(source-fn nam)
37    -optimize-level 2 -debug-level 1
38    -c -unit ,nam -output-file ,(static-fn nam)
39    ,@args) )
40
41(define (compile-shared-extension nam . args)
42  (compile ,(source-fn nam)
43    -optimize-level 2 -debug-level 1
44    -shared -output-file ,(shared-fn nam)
45    -emit-import-library ,nam
46    ,@args)
47  (compile ,(source-import-fn nam)
48    -optimize-level 2 -debug-level 0
49    -shared -output-file ,(shared-import-fn nam)) )
50
51;;
52
53(define (install-shared-extension nam #!key (compile '()) (install '()))
54  (apply compile-shared-extension nam compile)
55  (install-extension nam
56   `(,(shared-fn nam) ,(shared-import-fn nam))
57   `((version ,*version*)
58     (documentation ,(doc-fn nam))
59     ,@install)) )
60
61(define (install-shared-static-extension nam  #!key (compile '()) (install '()))
62  (apply compile-shared-extension nam compile)
63  (apply compile-static-extension nam compile)
64  (install-extension nam
65   `(,(shared-fn nam) ,(static-fn nam) ,(shared-import-fn nam))
66   `((version ,*version*)
67     (static ,(static-fn nam))
68     (documentation ,(doc-fn nam))
69     ,@install)) )
70
71;;;
72
73(define *version* "2.0.0")
74
75(install-shared-extension 'synch)
Note: See TracBrowser for help on using the repository browser.