Source

lowdown / lowdown.setup

Full commit
(define info
  '((version "0.0.3")))

(define-for-syntax (lib-file name suffix)
  (string-append name suffix))

(define-syntax compile-lib
  (ir-macro-transformer
   (lambda (x i c)
     (let ((name (symbol->string (strip-syntax (last x)))))
       `(begin
          (compile -d0 -O2 -J -s ,@(butlast (cdr x)) ,(lib-file name ".scm"))
          (compile -d0 -O3 -s ,(lib-file name ".import.scm")))))))

(compile-lib -X char-set-literals lowdown-lolevel)
(compile-lib lowdown)
(compile-lib lowdown-extra)

(install-extension
 'lowdown
 '("lowdown-lolevel.so" "lowdown-lolevel.import.so"
   "lowdown.so" "lowdown.import.so")
 info)

(install-extension
 'lowdown
 '("lowdown-extra.so" "lowdown-extra.import.so")
 info)