X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/b5d086c2894c492e17391b17f2600de83206a7b6..a898c9e295c84062379cda5cd42f113bee0138e2:/src/Makefile.am?ds=sidebyside diff --git a/src/Makefile.am b/src/Makefile.am index b5150be..fd70ab3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -87,21 +87,49 @@ dist_pkglispsrc_DATA += method-proto.lisp method-impl.lisp dist_pkglispsrc_DATA += sod-frontend.asd dist_pkglispsrc_DATA += frontend.lisp optparse.lisp +## Interactive testing. +dist_pkglispsrc_DATA += debug.lisp + ###-------------------------------------------------------------------------- ### Constructing an output image. -CLEANFILES += *.$(FASL_TYPE) +CLEANFILES += *.$(fasl) parser/*.$(fasl) ## Building the executable image. bin_PROGRAMS += sod sod_SOURCES = sod: $(dist_pkglispsrc_DATA) - set -ex; true_srcdir=$$(cd $(srcdir); pwd); \ + $(V_DUMP)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: + $(V_TEST)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 +155,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 --------------------------------------------------