Changeset 13461 in project for release/4/box/trunk/box.setup


Ignore:
Timestamp:
03/03/09 05:03:14 (11 years ago)
Author:
Kon Lovett
Message:

Save

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/box/trunk/box.setup

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