1;;; csc interface tests 2 3(import (chicken file) 4 (chicken pathname) 5 (chicken platform) 6 (chicken process) 7 (chicken process-context) 8 (chicken string)) 9 10(include "programs-path.scm") 11 12(define (realpath x) 13 (normalize-pathname (make-pathname (current-directory) x))) 14 15(define (run x . args) 16 (system* (string-intersperse (cons (realpath x) args)))) 17 18(define (csc . args) 19 (apply run csc-path "-v" "-I.." "-compiler" (realpath chicken-path) "-libdir" ".." args)) 20 21(csc "null.scm" "-t") 22(assert (file-exists? "null.c")) 23 24(define obj-file (if (eq? (software-version) 'mingw32) "null.obj" "null.o")) 25 26(csc "null.c" "-c") 27(assert (file-exists? obj-file)) 28 29(csc obj-file) 30(run "null") 31