Changeset 34699 in project


Ignore:
Timestamp:
10/15/17 00:30:32 (2 years ago)
Author:
Kon Lovett
Message:

suppress global inline

Location:
release/4/setup-helper/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/setup-helper/trunk/setup-helper.scm

    r34411 r34699  
    11;;;; setup-helper.scm -*- Hen -*-
    22;;;; Kon Lovett, Mar '09
     3;;;; Kon Lovett, Oct '17
    34
    45;;Issues
     
    78;;
    89;; - Static support is wrong. Must collect .o into .a !
     10;;   - macOS : libtool -static a.o b.o -o libegg.a
     11;;   - Linux , BSD, ... ???
    912
    1013;;; Release 4 Only!
     
    1821  setup-api)
    1922
    20 (define *has-emit-inline* #f)
    21 (define *has-emit-types* #f)
    22 (when (version>=? (chicken-version) "4.0.0")
    23   (set! *has-emit-inline* #t) )
    24 (when (version>=? (chicken-version) "4.7.3")
    25   (set! *has-emit-types* #t) )
     23;;; Version
     24
     25(define *chicken-version* (chicken-version))
     26
     27;FIXME it doesn't really work yet
     28(define GLOBAL-INLINE-VERSION "6.0.0")  ;"4.0.0"
     29(define GLOBAL-TYPES-VERSION "4.7.3")
     30
     31(define *has-emit-inline* (version>=? *chicken-version* GLOBAL-INLINE-VERSION))
     32(define *has-emit-types* (version>=? *chicken-version* GLOBAL-TYPES-VERSION))
    2633
    2734;;; Extension Information
     
    5966
    6067(define (installation-chicken-home)
    61   (if (not (installation-prefix)) (chicken-home)
     68  (if (not (installation-prefix))
     69    (chicken-home)
    6270    (make-pathname `(,(installation-prefix) "share") "chicken") ) )
    6371
     
    6674  (if (deployment-mode)
    6775    (installation-prefix) ; deploy: copy directly into destdir
    68     (let ((p (destination-prefix)))
    69       (if p
     76    (let ((pre (destination-prefix)))
     77      (if pre
    7078        ; installation-prefix changed: use it
    71         (make-pathname p (sprintf "lib/chicken/~a" (##sys#fudge 42)))
     79        (make-pathname pre (sprintf "lib/chicken/~a" (##sys#fudge 42)))
    7280        ; otherwise use repo-path
    7381        (repository-path) ) ) ) )
     
    8492      ((string? dir)
    8593        (let ((end (sub1 (string-length dir))))
    86           (if (not (directory-separator? (string-ref dir end))) dir
    87               (substring dir 0 end) ) ) )
     94          (if (not (directory-separator? (string-ref dir end)))
     95            dir
     96            (substring dir 0 end) ) ) )
    8897      ((pair? dir)
    8998        (let ((len (length dir)))
    90           (if (= 1 len) (->string (car dir))
    91               ;Ensures no trailing directory separator.
    92               (make-pathname
    93                 (map ->string (take dir (sub1 len)))
    94                 (->string (last dir))) ) ) )
     99          (if (= 1 len)
     100            (->string (car dir))
     101            ;Ensures no trailing directory separator.
     102            (make-pathname
     103              (map ->string (take dir (sub1 len)))
     104              (->string (last dir))) ) ) )
    95105      (else
    96106        (sh:error-type 'make-directory-name dir) ) ) ) )
     
    181191      (sh:error-type 'built-filename knd "symbol or procedure") ) ) )
    182192
    183 (define (built-file nam . knds)
    184   (let loop ((knds (if (and (null? (cdr knds)) (list? (car knds))) (car knds) knds))
    185             (ls '()))
    186     (if (null? knds) (reverse ls)
    187       (let ((gnflnm (built-filename nam (car knds))))
    188         (loop (cdr knds)
    189               (if (file-exists? gnflnm) (cons gnflnm ls) ls))) ) ) )
     193(define (built-file nam . rest)
     194  (let ((iknds (if (and (null? (cdr rest)) (list? (car rest))) (car rest) rest)))
     195    (let loop ((knds iknds) (ls '()))
     196      (if (null? knds)
     197        (reverse ls)
     198        (let ((gnflnm (built-filename nam (car knds))))
     199          (loop (cdr knds)
     200                (if (file-exists? gnflnm) (cons gnflnm ls) ls))) ) ) ) )
    190201
    191202;; File Mode Support
     
    243254;FIXME -...o style!
    244255(define (output-file-option compile-options)
    245   (or (memq '-o compile-options)
    246       (memq '-output-file compile-options)) )
     256  (or
     257    (memq '-o compile-options)
     258    (memq '-output-file compile-options)) )
    247259
    248260(define (optional-output-file compile-options)
    249   (let ((of (output-file-option compile-options)))
    250     (if of (list (cadr of)) '()) ) )
     261  (let ((outfil-optn (output-file-option compile-options)))
     262    (if outfil-optn
     263      (list (cadr outfil-optn))
     264      '() ) ) )
    251265
    252266;;; Compile
     
    261275      (else      '()))))
    262276
    263 #;
     277#; ;UNUSED
    264278(define library-path-options
    265279  (make-parameter
     
    296310
    297311(define (has-emit-inline inline? nam)
    298   (if (not (and *has-emit-inline* inline?)) '()
     312  (if (not (and *has-emit-inline* inline?))
     313    '()
    299314    `(-emit-inline-file ,(inline-filename nam)) ) )
    300315
    301316(define (has-emit-types types? nam)
    302   (if (not (and *has-emit-types* types?)) '()
     317  (if (not (and *has-emit-types* types?))
     318    '()
    303319    `(-emit-type-file ,(types-filename nam)) ) )
    304320
     
    427443
    428444(define (setup-static-extension nam ver
    429           #!key (compile-options '())
    430                 inline? types?
    431                 (install-options '()) (files '()))
     445          #!key (compile-options '()) inline? types? (install-options '()) (files '()))
    432446  (let ((files (append files (optional-output-file compile-options))))
    433447    (compile-static nam #:options compile-options #:inline? inline? #:types? types?)
     
    435449
    436450(define (setup-shared-extension nam ver
    437           #!key (compile-options '())
    438                 inline? types?
    439                 (install-options '()) (files '()))
     451          #!key (compile-options '()) inline? types? (install-options '()) (files '()))
    440452  (let ((files (append files (optional-output-file compile-options))))
    441453    (compile-shared nam #:options compile-options #:inline? inline? #:types? types?)
     
    443455
    444456(define (setup-static-extension-module nam ver
    445           #!key (compile-options '())
    446                 inline? types?
    447                 (install-options '()) (files '()))
     457          #!key (compile-options '()) inline? types? (install-options '()) (files '()))
    448458  (let ((files (append files (optional-output-file compile-options))))
    449459    (compile-static-module nam #:options compile-options #:inline? inline? #:types? types?)
     
    451461
    452462(define (setup-shared-extension-module nam ver
    453           #!key (compile-options '())
    454                 inline? types?
    455                 (install-options '()) (files '()))
     463          #!key (compile-options '()) inline? types? (install-options '()) (files '()))
    456464  (let ((files (append files (optional-output-file compile-options))))
    457465    (compile-shared-module nam #:options compile-options #:inline? inline? #:types? types?)
     
    460468;cannot support -output-file option
    461469(define (setup-shared+static-extension-module nam ver
    462           #!key (shared-compile-options '())
    463                 (static-compile-options '())
    464                 (compile-options '())
    465                 inline? types?
    466                 (install-options '()) (files '()))
     470          #!key
     471          (shared-compile-options '())
     472          (static-compile-options '())
     473          (compile-options '())
     474          inline?
     475          types?
     476          (install-options '()) (files '()))
    467477  (compile-shared-module nam
    468478    #:options (append compile-options shared-compile-options)
  • release/4/setup-helper/trunk/setup-helper.setup

    r33614 r34699  
    11;;;; setup-helper.setup -*- Hen -*-
    22
    3 (define this-verno "2.0.0")
     3(define this-verno "2.1.0")
    44
    55(define (shared-filename bn)
Note: See TracChangeset for help on using the changeset viewer.