chiark / gitweb /
configure.ac, src/Makefile.am: Rename the FASL extension variable.
[sod] / src / Makefile.am
index b5150be1c2dba187e73c0d7fd6dc1bc7c0db4005..97732379589379510d67af5591bedd3b95ee131b 100644 (file)
@@ -90,7 +90,7 @@ dist_pkglispsrc_DATA  += frontend.lisp optparse.lisp
 ###--------------------------------------------------------------------------
 ### Constructing an output image.
 
-CLEANFILES             += *.$(FASL_TYPE)
+CLEANFILES             += *.$(fasl) parser/*.$(fasl)
 
 ## Building the executable image.
 bin_PROGRAMS           += sod
@@ -98,9 +98,34 @@ sod_SOURCES           =
 sod: $(dist_pkglispsrc_DATA)
        set -ex; true_srcdir=$$(cd $(srcdir); pwd); \
        ASDF_OUTPUT_TRANSLATIONS=$$true_srcdir:$(abs_builddir): \
-       $(CL_LAUNCH) -o sod -d ! -l $(LISPSYS) +I -S $$true_srcdir/ \
+       $(CL_LAUNCH) -o sod -d ! -l $(LISPSYS) +I -S $$true_srcdir/: \
                -s sod-frontend -r sod-frontend:main
 
+###--------------------------------------------------------------------------
+### Unit testing.
+
+## The system definition.
+EXTRA_DIST             += sod-test.asd
+
+## Basic utilities.
+EXTRA_DIST             += test-base.lisp
+
+## Parser tests.
+EXTRA_DIST             += parser/parser-test.lisp
+EXTRA_DIST             += parser/scanner-charbuf-test.lisp
+
+## Translator tests.
+EXTRA_DIST             += c-types-test.lisp
+EXTRA_DIST             += codegen-test.lisp
+EXTRA_DIST             += lexer-test.lisp
+
+## Running the Lisp tests.
+check-local:
+       set -ex; true_srcdir=$$(cd $(srcdir); pwd); \
+       ASDF_OUTPUT_TRANSLATIONS=$$true_srcdir:$(abs_builddir): \
+       $(CL_LAUNCH) -l $(LISPSYS) +I -S $$true_srcdir/: \
+               -i '(asdf:test-system "sod")'
+
 ###--------------------------------------------------------------------------
 ### Installation.
 
@@ -127,7 +152,7 @@ install-data-local:
        dots=$$(echo $$fwd | sed 's/[^ ][^ ]*/../g'); \
        rel=$$(echo $$dots $$twd | tr " " "/"); \
        echo >&2 "ln -s $$rel $$to"; \
-       ln -s $$rel $(DESTDIR)$$from.new; \
-       mv $(DESTDIR)$$from.new $(DESTDIR)$$from
+       ln -s $$rel $(DESTDIR)$$from/sod.asd.new; \
+       mv $(DESTDIR)$$from/sod.asd.new $(DESTDIR)$$from/sod.asd
 
 ###----- That's all, folks --------------------------------------------------