(parameterize ((current-directory "lib/foldling")) (let-values (((_ _ status) (process-wait (process-run "chicken-install")))) (unless (zero? status) (exit status)))) (define bin '("schematic-docco" "schematic-format" "schematic-markdown")) (define aux '("schematic.css")) (define man (map (lambda (b) (make-pathname #f b "1")) bin)) (define prelude '(-prelude "'(define (command-line) (cons (program-name) (command-line-arguments)))'")) (compile -O3 -d0 ,@prelude schematic-docco.scm) (compile -O3 -d0 ,@prelude schematic-format.scm) (compile -O3 -d0 ,@prelude -R extras -R command-line -prelude "'(define-syntax import (constantly 1))'" schematic-markdown.scm) (let ((prefix (installation-prefix))) (install-program 'schematic (append (filter file-exists? bin) (map (lambda (m) (cons m (make-pathname (list prefix "share/schematic") m))) (filter file-exists? aux)) (map (lambda (m) (cons m (make-pathname (list prefix "share/man/man1") m))) (filter file-exists? man))) '((version "0.1.1"))))