1
0
Fork 0

Compare commits

..

No commits in common. "00351e0c4bfa5fc3cfa75e1bdf50130d7005473a" and "a959c5ea4b0dfc21e02112cd9e6373d0d6b16486" have entirely different histories.

5 changed files with 80 additions and 55 deletions

7
Jenkinsfile vendored
View File

@ -57,12 +57,5 @@ pipeline {
} }
} }
} }
stage('.deb package') {
steps {
sh "make deb"
archiveArtifacts artifacts: '*.deb', allowEmptyArchive: true, fingerprint: true, onlyIfSuccessful: true
}
}
} }
} }

View File

@ -1,7 +1,7 @@
.SILENT: test-r6rs test-r6rs-docker test-r7rs test-r7rs-docker .SILENT: test-r6rs test-r6rs-docker test-r7rs test-r7rs-docker
PREFIX=/usr/local PREFIX=/usr/local
SCHEME=chibi SCHEME=chibi
VERSION=1.1.0 VERSION=1.0.0
R6RSTMP=.tmp/${SCHEME}-r6rs R6RSTMP=.tmp/${SCHEME}-r6rs
R7RSTMP=.tmp/${SCHEME}-r7rs R7RSTMP=.tmp/${SCHEME}-r7rs
DOCKERTAG=compile-scheme-test-${SCHEME} DOCKERTAG=compile-scheme-test-${SCHEME}
@ -102,7 +102,6 @@ test-r6rs:
mkdir -p ${R6RSTMP} mkdir -p ${R6RSTMP}
cp -r r6rs-testfiles/* ${R6RSTMP}/ cp -r r6rs-testfiles/* ${R6RSTMP}/
cd ${R6RSTMP} && COMPILE_R7RS=${SCHEME} compile-scheme -I ./libs -o main --debug main.sps cd ${R6RSTMP} && COMPILE_R7RS=${SCHEME} compile-scheme -I ./libs -o main --debug main.sps
cd ${R6RSTMP} && file main
cd ${R6RSTMP} && ./main 1 2 3 > test-result.txt cd ${R6RSTMP} && ./main 1 2 3 > test-result.txt
@grep "Test successfull (\"1\" \"2\" \"3\")" ${R6RSTMP}/test-result.txt || (echo "Test failed, output: " && cat ${R6RSTMP}/test-result.txt && exit 1) @grep "Test successfull (\"1\" \"2\" \"3\")" ${R6RSTMP}/test-result.txt || (echo "Test failed, output: " && cat ${R6RSTMP}/test-result.txt && exit 1)
@ -114,8 +113,7 @@ test-r7rs:
rm -rf ${R7RSTMP} rm -rf ${R7RSTMP}
mkdir -p ${R7RSTMP} mkdir -p ${R7RSTMP}
cp -r r7rs-testfiles/* ${R7RSTMP}/ cp -r r7rs-testfiles/* ${R7RSTMP}/
cd ${R7RSTMP} && COMPILE_R7RS=${SCHEME} compile-scheme -I ./libs -o main --debug main.scm cd ${R7RSTMP} && COMPILE_R7RS=${SCHEME} compile-scheme -I ./libs --debug main.scm
cd ${R7RSTMP} && file main
-cd ${R7RSTMP} && ./main 1 2 3 > test-result.txt 2>&1 -cd ${R7RSTMP} && ./main 1 2 3 > test-result.txt 2>&1
@grep "Test successfull (\"1\" \"2\" \"3\")" ${R7RSTMP}/test-result.txt || (echo "Test failed, output: " && cat ${R7RSTMP}/test-result.txt && exit 1) @grep "Test successfull (\"1\" \"2\" \"3\")" ${R7RSTMP}/test-result.txt || (echo "Test failed, output: " && cat ${R7RSTMP}/test-result.txt && exit 1)

View File

@ -24,7 +24,7 @@ DESCRIPTION
SUPPORTED IMPLEMENTATIONS SUPPORTED IMPLEMENTATIONS
Some implementations support both compiling and interpreting, in that Some implementations support both compiling and interpreting, in that
case only the compiler functionality is used and the implementation is case only the compiler functionality is used and the implementation is
marked as compiler. Except currently with Gambit. marked as compiler.
R6RS Compilers R6RS Compilers
loko loko

View File

@ -216,47 +216,81 @@
,args))))) ,args)))))
(gambit (gambit
(type . compiler) (type . compiler)
(command . ,(lambda (exec-cmd #;(library-command . ,(lambda (library-file prepend-directories append-directories r6rs?)
script-file `(,(string-append "gsc -:search="
args (apply string-append
input-file (map (lambda (item)
output-file (string-append item "/, "))
prepend-directories (append prepend-directories
append-directories append-directories)))
library-files (search-library-file (append append-directories
r6rs? prepend-directories)
compilation-target) library-file)))))
(let ((library-files-paths (command . ,(lambda (exec-cmd
(map (lambda (item) script-file
(search-library-file (append prepend-directories args
append-directories) input-file
item)) output-file
library-files))) prepend-directories
`(,(string-append "echo \"#!/usr/bin/env gsi -:r7rs,search=" append-directories
(apply string-append library-files
(map (lambda (item) r6rs?
(string-append item "/, ")) compilation-target)
(append prepend-directories (let ((library-files-paths
append-directories))) (map (lambda (item)
"\" > " (search-library-file (append prepend-directories
(string-append output-file ".tmp")) append-directories)
,(string-append "cat " item))
input-file library-files))
" >> " (link-file
(string-append output-file ".tmp")) (string-append
,(apply string-append (string-cut-from-end input-file 4) "_.c")))
`(" gsc " `(,(string-append "gsc -:search="
,(util-getenv "COMPILE_R7RS_GAMBIT") (string-cut-from-end
" -:r7rs,search=" (apply string-append
,(apply string-append (map (lambda (item)
(map (lambda (item) (string-append item ","))
(string-append item "/, ")) (append prepend-directories
(append prepend-directories append-directories)))
append-directories))) 1)
" -o " " -link -flat -nopreload "
,output-file (string-cut-from-end
" -exe -nopreload " (apply string-append
,(string-append output-file ".tmp")))))))) (map (lambda (item)
(string-append item " "))
library-files-paths))
1)
" "
input-file)
,(string-append "gsc -:search="
(string-cut-from-end
(apply string-append
(map (lambda (item)
(string-append item ","))
(append prepend-directories
append-directories)))
1)
" -obj "
(apply string-append
(map (lambda (item)
(string-append (string-cut-from-end item 4) ".c "))
library-files-paths))
" "
(string-append (string-cut-from-end input-file 4) ".c")
" "
(string-append (string-cut-from-end input-file 4) "_.c"))
,(string-append "gcc -o "
output-file
" "
(apply string-append
(map (lambda (item)
(string-append (string-cut-from-end item 4) ".o "))
library-files-paths))
" "
(string-append (string-cut-from-end input-file 4) ".o")
" "
(string-append (string-cut-from-end input-file 4) "_.o"))
)))))
(gauche (gauche
(type . interpreter) (type . interpreter)
(command . ,(lambda (exec-cmd (command . ,(lambda (exec-cmd

View File

@ -67,9 +67,9 @@
chibi chibi
chicken chicken
cyclone cyclone
;gambit
foment foment
gauche gauche
gambit
guile guile
kawa kawa
larceny larceny
@ -88,8 +88,8 @@
chibi chibi
chicken chicken
cyclone cyclone
;gambit
foment foment
gambit
gauche gauche
guile guile
ikarus ikarus