Out-of-tree building and testing now seems to work
This commit is contained in:
parent
3aad0fbe0b
commit
5c941ea62c
|
@ -29,7 +29,7 @@ EXTRA_DIST=ikarus.boot.4.prebuilt ikarus.boot.8.prebuilt \
|
||||||
ikarus.string-to-number.ss ikarus.compiler.source-optimizer.ss \
|
ikarus.string-to-number.ss ikarus.compiler.source-optimizer.ss \
|
||||||
ikarus.compiler.tag-annotation-analysis.ss ikarus.ontology.ss \
|
ikarus.compiler.tag-annotation-analysis.ss ikarus.ontology.ss \
|
||||||
ikarus.reader.annotated.ss ikarus.pointers.ss ikarus.equal.ss \
|
ikarus.reader.annotated.ss ikarus.pointers.ss ikarus.equal.ss \
|
||||||
ikarus.symbol-table.ss ikarus.apropos.ss
|
ikarus.symbol-table.ss ikarus.apropos.ss ikarus.include-src.ss
|
||||||
|
|
||||||
all: $(nodist_pkglib_DATA)
|
all: $(nodist_pkglib_DATA)
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ sizeofvoidp = $(shell grep SIZEOF_VOID_P ../config.h | sed "s/.*\(.\)/\1/g")
|
||||||
|
|
||||||
ikarus.config.ss: Makefile last-revision ../config.h
|
ikarus.config.ss: Makefile last-revision ../config.h
|
||||||
echo '(define ikarus-version "$(PACKAGE_VERSION)")' >$@
|
echo '(define ikarus-version "$(PACKAGE_VERSION)")' >$@
|
||||||
echo '(define ikarus-revision "$(shell cat last-revision)")' >>$@
|
echo '(define ikarus-revision "$(shell cat $(srcdir)/last-revision)")' >>$@
|
||||||
echo '(define ikarus-lib-dir "$(pkglibdir)")' >>$@
|
echo '(define ikarus-lib-dir "$(pkglibdir)")' >>$@
|
||||||
echo '(define target "$(target)")' >>$@
|
echo '(define target "$(target)")' >>$@
|
||||||
echo '(define wordsize $(sizeofvoidp))' >>$@
|
echo '(define wordsize $(sizeofvoidp))' >>$@
|
||||||
|
@ -50,8 +50,14 @@ ikarus.config.ss: Makefile last-revision ../config.h
|
||||||
CLEANFILES=$(nodist_pkglib_DATA) ikarus.config.ss
|
CLEANFILES=$(nodist_pkglib_DATA) ikarus.config.ss
|
||||||
MAINTAINERCLEANFILES=last-revision
|
MAINTAINERCLEANFILES=last-revision
|
||||||
|
|
||||||
ikarus.boot: $(EXTRA_DIST) ikarus.config.ss
|
ikarus.boot: $(EXTRA_DIST) ikarus.config.ss
|
||||||
../src/ikarus -b ./ikarus.boot.$(sizeofvoidp).prebuilt --r6rs-script makefile.ss
|
IKARUS_SRC_DIR=$(srcdir) \
|
||||||
|
IKARUS_BUILD_DIR=$(builddir) \
|
||||||
|
IKARUS_LIBRARY_PATH=$(srcdir) \
|
||||||
|
../src/ikarus -b $(srcdir)/ikarus.boot.$(sizeofvoidp).prebuilt \
|
||||||
|
--r6rs-script $(srcdir)/makefile.ss
|
||||||
|
|
||||||
check: ikarus.boot
|
check: ikarus.boot
|
||||||
../src/ikarus -b ikarus.boot --r6rs-script run-tests.ss
|
IKARUS_SRC_DIR=$(srcdir) \
|
||||||
|
IKARUS_LIBRARY_PATH=$(srcdir) \
|
||||||
|
../src/ikarus -b ikarus.boot --r6rs-script $(srcdir)/run-tests.ss
|
||||||
|
|
|
@ -184,7 +184,7 @@ EXTRA_DIST = ikarus.boot.4.prebuilt ikarus.boot.8.prebuilt \
|
||||||
ikarus.string-to-number.ss ikarus.compiler.source-optimizer.ss \
|
ikarus.string-to-number.ss ikarus.compiler.source-optimizer.ss \
|
||||||
ikarus.compiler.tag-annotation-analysis.ss ikarus.ontology.ss \
|
ikarus.compiler.tag-annotation-analysis.ss ikarus.ontology.ss \
|
||||||
ikarus.reader.annotated.ss ikarus.pointers.ss ikarus.equal.ss \
|
ikarus.reader.annotated.ss ikarus.pointers.ss ikarus.equal.ss \
|
||||||
ikarus.symbol-table.ss ikarus.apropos.ss
|
ikarus.symbol-table.ss ikarus.apropos.ss ikarus.include-src.ss
|
||||||
|
|
||||||
revno = "$(shell sed 's/ .*//' ../.bzr/branch/last-revision 2>/dev/null)"
|
revno = "$(shell sed 's/ .*//' ../.bzr/branch/last-revision 2>/dev/null)"
|
||||||
sizeofvoidp = $(shell grep SIZEOF_VOID_P ../config.h | sed "s/.*\(.\)/\1/g")
|
sizeofvoidp = $(shell grep SIZEOF_VOID_P ../config.h | sed "s/.*\(.\)/\1/g")
|
||||||
|
@ -380,16 +380,22 @@ last-revision: $(shell ls ../.bzr/branch/last-revision 2>/dev/null)
|
||||||
|
|
||||||
ikarus.config.ss: Makefile last-revision ../config.h
|
ikarus.config.ss: Makefile last-revision ../config.h
|
||||||
echo '(define ikarus-version "$(PACKAGE_VERSION)")' >$@
|
echo '(define ikarus-version "$(PACKAGE_VERSION)")' >$@
|
||||||
echo '(define ikarus-revision "$(shell cat last-revision)")' >>$@
|
echo '(define ikarus-revision "$(shell cat $(srcdir)/last-revision)")' >>$@
|
||||||
echo '(define ikarus-lib-dir "$(pkglibdir)")' >>$@
|
echo '(define ikarus-lib-dir "$(pkglibdir)")' >>$@
|
||||||
echo '(define target "$(target)")' >>$@
|
echo '(define target "$(target)")' >>$@
|
||||||
echo '(define wordsize $(sizeofvoidp))' >>$@
|
echo '(define wordsize $(sizeofvoidp))' >>$@
|
||||||
|
|
||||||
ikarus.boot: $(EXTRA_DIST) ikarus.config.ss
|
ikarus.boot: $(EXTRA_DIST) ikarus.config.ss
|
||||||
../src/ikarus -b ./ikarus.boot.$(sizeofvoidp).prebuilt --r6rs-script makefile.ss
|
IKARUS_SRC_DIR=$(srcdir) \
|
||||||
|
IKARUS_BUILD_DIR=$(builddir) \
|
||||||
|
IKARUS_LIBRARY_PATH=$(srcdir) \
|
||||||
|
../src/ikarus -b $(srcdir)/ikarus.boot.$(sizeofvoidp).prebuilt \
|
||||||
|
--r6rs-script $(srcdir)/makefile.ss
|
||||||
|
|
||||||
check: ikarus.boot
|
check: ikarus.boot
|
||||||
../src/ikarus -b ikarus.boot --r6rs-script run-tests.ss
|
IKARUS_SRC_DIR=$(srcdir) \
|
||||||
|
IKARUS_LIBRARY_PATH=$(srcdir) \
|
||||||
|
../src/ikarus -b ikarus.boot --r6rs-script $(srcdir)/run-tests.ss
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
.NOEXPORT:
|
.NOEXPORT:
|
||||||
|
|
|
@ -319,7 +319,7 @@
|
||||||
(make-codes (map Clambda code*) (Main body))]))
|
(make-codes (map Clambda code*) (Main body))]))
|
||||||
(Program x))
|
(Program x))
|
||||||
|
|
||||||
(include "pass-specify-rep.ss")
|
(include-src "pass-specify-rep.ss")
|
||||||
|
|
||||||
(define parameter-registers '(%edi))
|
(define parameter-registers '(%edi))
|
||||||
(define return-value-register '%eax)
|
(define return-value-register '%eax)
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
(ikarus system $pairs)
|
(ikarus system $pairs)
|
||||||
(only (ikarus system $codes) $code->closure)
|
(only (ikarus system $codes) $code->closure)
|
||||||
(only (ikarus system $structs) $struct-ref $struct/rtd?)
|
(only (ikarus system $structs) $struct-ref $struct/rtd?)
|
||||||
|
(ikarus.include-src)
|
||||||
(except (ikarus)
|
(except (ikarus)
|
||||||
optimize-level debug-optimizer
|
optimize-level debug-optimizer
|
||||||
fasl-write scc-letrec optimize-cp
|
fasl-write scc-letrec optimize-cp
|
||||||
|
@ -39,6 +40,7 @@
|
||||||
(ikarus.intel-assembler))
|
(ikarus.intel-assembler))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(define-syntax struct-case
|
(define-syntax struct-case
|
||||||
(lambda (x)
|
(lambda (x)
|
||||||
(define (enumerate fld* i)
|
(define (enumerate fld* i)
|
||||||
|
@ -1052,7 +1054,7 @@
|
||||||
;(pretty-print (unparse x))
|
;(pretty-print (unparse x))
|
||||||
x))
|
x))
|
||||||
|
|
||||||
(include "ikarus.compiler.source-optimizer.ss")
|
(include-src "ikarus.compiler.source-optimizer.ss")
|
||||||
|
|
||||||
(define (rewrite-assignments x)
|
(define (rewrite-assignments x)
|
||||||
(define who 'rewrite-assignments)
|
(define who 'rewrite-assignments)
|
||||||
|
@ -1140,7 +1142,7 @@
|
||||||
[else (error who "invalid expression" (unparse x))]))
|
[else (error who "invalid expression" (unparse x))]))
|
||||||
(Expr x))
|
(Expr x))
|
||||||
|
|
||||||
(include "ikarus.compiler.tag-annotation-analysis.ss")
|
(include-src "ikarus.compiler.tag-annotation-analysis.ss")
|
||||||
|
|
||||||
(define (introduce-vars x)
|
(define (introduce-vars x)
|
||||||
(define who 'introduce-vars)
|
(define who 'introduce-vars)
|
||||||
|
@ -2408,7 +2410,7 @@
|
||||||
(define eval-core
|
(define eval-core
|
||||||
(lambda (x) ((compile-core-expr x))))
|
(lambda (x) ((compile-core-expr x))))
|
||||||
|
|
||||||
(include "ikarus.compiler.altcogen.ss")
|
(include-src "ikarus.compiler.altcogen.ss")
|
||||||
|
|
||||||
(define current-primitive-locations
|
(define current-primitive-locations
|
||||||
(let ([plocs (lambda (x) #f)])
|
(let ([plocs (lambda (x) #f)])
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
|
|
||||||
;;; THIS IS WIP
|
;;; THIS IS WIP
|
||||||
(include "ikarus.ontology.ss")
|
(include-src "ikarus.ontology.ss")
|
||||||
|
|
||||||
(define tag-analysis-output (make-parameter #f))
|
(define tag-analysis-output (make-parameter #f))
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
;;; Ikarus Scheme -- A compiler for R6RS Scheme.
|
||||||
|
;;; Copyright (C) 2009 Abdulaziz Ghuloum
|
||||||
|
;;;
|
||||||
|
;;; This program is free software: you can redistribute it and/or modify
|
||||||
|
;;; it under the terms of the GNU General Public License version 3 as
|
||||||
|
;;; published by the Free Software Foundation.
|
||||||
|
;;;
|
||||||
|
;;; This program is distributed in the hope that it will be useful, but
|
||||||
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
;;; General Public License for more details.
|
||||||
|
;;;
|
||||||
|
;;; You should have received a copy of the GNU General Public License
|
||||||
|
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
(library (ikarus.include-src)
|
||||||
|
(export include-src)
|
||||||
|
(import (ikarus))
|
||||||
|
(define-syntax include-src
|
||||||
|
(lambda (x)
|
||||||
|
(syntax-case x ()
|
||||||
|
[(ctxt filename)
|
||||||
|
(with-syntax ([filename
|
||||||
|
(string-append
|
||||||
|
(or (getenv "IKARUS_SRC_DIR") ".")
|
||||||
|
"/"
|
||||||
|
(syntax->datum #'filename))])
|
||||||
|
#'(include-into ctxt filename))]))))
|
|
@ -31,6 +31,7 @@
|
||||||
string-ci=? string-ci>? string-ci>=? string-normalize-nfd
|
string-ci=? string-ci>? string-ci>=? string-normalize-nfd
|
||||||
string-normalize-nfkd string-normalize-nfc string-normalize-nfkc )
|
string-normalize-nfkd string-normalize-nfc string-normalize-nfkc )
|
||||||
(import
|
(import
|
||||||
|
(ikarus.include-src)
|
||||||
(except (ikarus)
|
(except (ikarus)
|
||||||
unicode-printable-char?
|
unicode-printable-char?
|
||||||
char-upcase char-downcase char-titlecase char-foldcase
|
char-upcase char-downcase char-titlecase char-foldcase
|
||||||
|
@ -99,8 +100,8 @@
|
||||||
(define (char- x y)
|
(define (char- x y)
|
||||||
(fx- (char->integer x) (char->integer y)))
|
(fx- (char->integer x) (char->integer y)))
|
||||||
|
|
||||||
(include "unicode/unicode-char-cases.ss")
|
(include-src "unicode/unicode-char-cases.ss")
|
||||||
(include "unicode/unicode-charinfo.ss")
|
(include-src "unicode/unicode-charinfo.ss")
|
||||||
|
|
||||||
(define-syntax define-char-op
|
(define-syntax define-char-op
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
|
|
|
@ -1727,6 +1727,8 @@
|
||||||
`([$init-symbol-value! . ,label])
|
`([$init-symbol-value! . ,label])
|
||||||
`([,label . (global . ,loc)])))
|
`([,label . (global . ,loc)])))
|
||||||
|
|
||||||
|
(define src-dir (or (getenv "IKARUS_SRC_DIR") "."))
|
||||||
|
|
||||||
(define (expand-all files)
|
(define (expand-all files)
|
||||||
;;; remove all re-exported identifiers (those with labels in
|
;;; remove all re-exported identifiers (those with labels in
|
||||||
;;; subst but not binding in env).
|
;;; subst but not binding in env).
|
||||||
|
@ -1740,7 +1742,7 @@
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (file)
|
(lambda (file)
|
||||||
(debugf " ~s" file)
|
(debugf " ~s" file)
|
||||||
(load file
|
(load (string-append src-dir "/" file)
|
||||||
(lambda (x)
|
(lambda (x)
|
||||||
(let-values ([(name code export-subst export-env)
|
(let-values ([(name code export-subst export-env)
|
||||||
(boot-library-expand x)])
|
(boot-library-expand x)])
|
||||||
|
|
|
@ -550,4 +550,4 @@
|
||||||
(let ([x (Program x)])
|
(let ([x (Program x)])
|
||||||
x))
|
x))
|
||||||
|
|
||||||
(include "pass-specify-rep-primops.ss"))
|
(include-src "pass-specify-rep-primops.ss"))
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
|
|
||||||
(library (tests framework)
|
(library (tests framework)
|
||||||
(export define-tests)
|
(export define-tests src-file)
|
||||||
(import (ikarus))
|
(import (ikarus))
|
||||||
|
|
||||||
|
(define (src-file x)
|
||||||
|
(string-append (or (getenv "IKARUS_SRC_DIR") ".") "/" x))
|
||||||
(define-syntax define-tests
|
(define-syntax define-tests
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
[(_ test-all [p0 e0] ...)
|
[(_ test-all [p0 e0] ...)
|
||||||
|
|
|
@ -541,16 +541,16 @@
|
||||||
(f (fx+ i 1)))))
|
(f (fx+ i 1)))))
|
||||||
|
|
||||||
(define (test-input-files)
|
(define (test-input-files)
|
||||||
(assert (= (file-size-char-by-char "tests/SRFI-1.ss") 56573))
|
(assert (= (file-size-char-by-char (src-file "tests/SRFI-1.ss")) 56573))
|
||||||
(assert (= (file-size "tests/SRFI-1.ss") 56573))
|
(assert (= (file-size (src-file "tests/SRFI-1.ss")) 56573))
|
||||||
(let ([bv (file->bytevector "tests/SRFI-1.ss")])
|
(let ([bv (file->bytevector (src-file "tests/SRFI-1.ss"))])
|
||||||
(let-values ([(p extract) (open-bytevector-output-port #f)])
|
(let-values ([(p extract) (open-bytevector-output-port #f)])
|
||||||
(bytevector->binary-port bv p)
|
(bytevector->binary-port bv p)
|
||||||
(let ([bv2 (extract)])
|
(let ([bv2 (extract)])
|
||||||
(assert (bytevector=? bv bv2))
|
(assert (bytevector=? bv bv2))
|
||||||
(assert (bytevector=? #vu8() (extract))))))
|
(assert (bytevector=? #vu8() (extract))))))
|
||||||
|
|
||||||
(let ([bv (file->bytevector "tests/SRFI-1.ss")])
|
(let ([bv (file->bytevector (src-file "tests/SRFI-1.ss"))])
|
||||||
(let-values ([(p extract) (open-bytevector-output-port
|
(let-values ([(p extract) (open-bytevector-output-port
|
||||||
(native-transcoder))])
|
(native-transcoder))])
|
||||||
(bytevector->textual-port bv p)
|
(bytevector->textual-port bv p)
|
||||||
|
@ -558,7 +558,7 @@
|
||||||
(assert (bytevector=? bv bv2))
|
(assert (bytevector=? bv bv2))
|
||||||
(assert (bytevector=? #vu8() (extract))))))
|
(assert (bytevector=? #vu8() (extract))))))
|
||||||
|
|
||||||
(let ([bv (file->bytevector "tests/SRFI-1.ss")])
|
(let ([bv (file->bytevector (src-file "tests/SRFI-1.ss"))])
|
||||||
(let-values ([(p extract) (open-bytevector-output-port
|
(let-values ([(p extract) (open-bytevector-output-port
|
||||||
(make-transcoder (latin-1-codec)))])
|
(make-transcoder (latin-1-codec)))])
|
||||||
(bytevector->textual-port bv p)
|
(bytevector->textual-port bv p)
|
||||||
|
@ -566,7 +566,7 @@
|
||||||
(assert (bytevector=? bv bv2))
|
(assert (bytevector=? bv bv2))
|
||||||
(assert (bytevector=? #vu8() (extract))))))
|
(assert (bytevector=? #vu8() (extract))))))
|
||||||
|
|
||||||
(let ([bv (file->bytevector "tests/SRFI-1.ss")])
|
(let ([bv (file->bytevector (src-file "tests/SRFI-1.ss"))])
|
||||||
(let-values ([(p extract) (open-string-output-port)])
|
(let-values ([(p extract) (open-string-output-port)])
|
||||||
(bytevector->textual-port bv p)
|
(bytevector->textual-port bv p)
|
||||||
(let ([str (extract)])
|
(let ([str (extract)])
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
(library (tests normalization)
|
(library (tests normalization)
|
||||||
(export run-tests)
|
(export run-tests)
|
||||||
(import (ikarus) (unicode-data))
|
(import (ikarus) (tests framework) (unicode-data))
|
||||||
|
|
||||||
(define (reset) (error 'reset "yukk"))
|
(define (reset) (error 'reset "yukk"))
|
||||||
(define (enumerate ls)
|
(define (enumerate ls)
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
(let ([data (map (lambda (x) (map conv (list-head x 5)))
|
(let ([data (map (lambda (x) (map conv (list-head x 5)))
|
||||||
(filter (lambda (x) (>= (length x) 5))
|
(filter (lambda (x) (>= (length x) 5))
|
||||||
(get-unicode-data
|
(get-unicode-data
|
||||||
"unicode/UNIDATA/NormalizationTest.txt")))])
|
(src-file "unicode/UNIDATA/NormalizationTest.txt"))))])
|
||||||
(define NFD string-normalize-nfd)
|
(define NFD string-normalize-nfd)
|
||||||
(define NFKD string-normalize-nfkd)
|
(define NFKD string-normalize-nfkd)
|
||||||
(define NFC string-normalize-nfc)
|
(define NFC string-normalize-nfc)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
|
|
||||||
(library (tests parse-flonums)
|
(library (tests parse-flonums)
|
||||||
(export run-tests)
|
(export run-tests)
|
||||||
(import (ikarus))
|
(import (ikarus) (tests framework))
|
||||||
|
|
||||||
(define file "tests/rn100")
|
(define file (src-file "tests/rn100"))
|
||||||
|
|
||||||
(define (read-all)
|
(define (read-all)
|
||||||
(with-input-from-file file
|
(with-input-from-file file
|
||||||
|
|
Loading…
Reference in New Issue