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],
###--------------------------------------------------------------------------
### Constructing an output image.
-CLEANFILES += *.$(FASL_TYPE)
+CLEANFILES += *.$(fasl) parser/*.$(fasl)
## Building the executable image.
bin_PROGRAMS += sod
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.
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 --------------------------------------------------