Commits

evhan  committed 63cd2ab

Include man pages on chicken-install, when present

  • Participants
  • Parent commits bbea27f

Comments (0)

Files changed (1)

File schematic.setup

   (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)))'"))
 
 
 (let ((prefix (installation-prefix)))
   (install-program 'schematic
-   `("schematic-docco"
-     "schematic-format"
-     "schematic-markdown"
-     ("schematic.css" ,(make-pathname prefix "share/schematic/schematic.css")))
+   (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"))))