configure.ac, src/Makefile.am: Rename the FASL extension variable.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 19 Aug 2015 16:45:26 +0000 (17:45 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 19 Aug 2015 16:45:26 +0000 (17:45 +0100)
configure.ac
src/Makefile.am

index 361421f..264bef2 100644 (file)
@@ -60,10 +60,10 @@ AC_SUBST([LISPSYS])
 AC_MSG_RESULT([$LISPSYS])
 
 AC_MSG_CHECKING([FASL file extension])
-FASL_TYPE=$($CL_LAUNCH -l $LISPSYS -ip \
+fasl=$($CL_LAUNCH -l $LISPSYS -ip \
        '(pathname-type (compile-file-pathname "foo.lisp"))')
-AC_SUBST([FASL_TYPE])
-AC_MSG_RESULT([.$FASL_TYPE])
+AC_SUBST([fasl])
+AC_MSG_RESULT([.$fasl])
 
 AC_ARG_WITH([lisp-source-dir],
        [AS_HELP_STRING([--with-lisp-source-dir=DIR],
index b5150be..9773237 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,10 +98,35 @@ 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.
 
 ## We want a symlink $(lispsysdir)/sod.asd -> $(lispsrcdir)/sod/sod.asd.  It
@@ -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 --------------------------------------------------