X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/9bd7c3e92e3db5eeac695c52d8917677439b7b79..refs/heads/mdw/progfmt:/src/Makefile.am?ds=sidebyside diff --git a/src/Makefile.am b/src/Makefile.am index 053ca1c..8a23b69 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -29,9 +29,6 @@ nobase_dist_pkglispsrc_DATA = $(LISP_SOURCES) LISP_SOURCES = SYSDEFS = -ASDF_ENV = \ - ASDF_OUTPUT_TRANSLATIONS=$$(cd $(srcdir); pwd):$(abs_builddir): - ###-------------------------------------------------------------------------- ### The source files. @@ -113,25 +110,20 @@ sod.asd: sod.asd.in Makefile $(SUBST) $(srcdir)/sod.asd.in >$@.new $(SUBSTITUTIONS) && \ mv $@.new $@ -EXTRA_DIST += sod-frontend.asd.in -CLEANFILES += sod-frontend.asd -sod-frontend.asd: sod-frontend.asd.in Makefile - $(SUBST) $(srcdir)/sod-frontend.asd.in >$@.new $(SUBSTITUTIONS) && \ - mv $@.new $@ - ## Building the executable image. bin_PROGRAMS += sod sod_SOURCES = -sod$(EXEEXT): $(LISP_SOURCES) sod.asd sod-frontend.asd auto.lisp - $(V_DUMP)$(ASDF_ENV) $(CL_LAUNCH) -o $@ -d ! -l $(LISPSYS) +I \ - -s sod-frontend -r sod-frontend:main +sod$(EXEEXT): $(LISP_SOURCES) sod.asd auto.lisp + $(V_DUMP)$(ASDF_ENV) $(RUNLISP) -L$(WORKING_LISPS) \ + -e "(asdf:clear-configuration)" \ + -e "(asdf:operate 'asdf:program-op \"sod/frontend\")" + +## The executable is needed if we're just distributing. +dist-hook: sod$(EXEEXT) ###-------------------------------------------------------------------------- ### Unit testing. -## The system definition. -EXTRA_DIST += sod-test.asd.in - ## Basic utilities. EXTRA_DIST += test-base.lisp @@ -144,26 +136,21 @@ EXTRA_DIST += c-types-test.lisp EXTRA_DIST += codegen-test.lisp EXTRA_DIST += lexer-test.lisp -## The system definition. -EXTRA_DIST += sod-test.asd.in -CLEANFILES += sod-test.asd -sod-test.asd: sod-test.asd.in Makefile - $(SUBST) $(srcdir)/sod-test.asd.in >$@.new $(SUBSTITUTIONS) && \ - mv $@.new $@ - ## Running the Lisp tests. -check-local: sod sod-test.asd - $(V_TEST)$(ASDF_ENV) $(CL_LAUNCH) -l $(LISPSYS) -s sod-test +I \ - -i '(handler-case (asdf:test-system "sod") ;\ - (error (cond) ;\ - (format *error-output* "ERR: ~A~%" cond) ;\ - (cl-launch:quit 1)))' +check-local: sod sod.asd + $(V_TEST)$(ASDF_ENV) $(RUNLISP) -L$(WORKING_LISPS) -e \ + '(asdf:clear-configuration) ;\ + (handler-case (asdf:test-system "sod") ;\ + (error (cond) ;\ + (format *error-output* "ERR: ~A~%" cond) ;\ + (uiop:quit 1)))' ###-------------------------------------------------------------------------- ### Manual pages. -dist_man_MANS += sod.1 -dist_man_MANS += sod-module.5 +man_MANS += sod.1 sod-module.5 +CLEANFILES += sod.1 sod-module.5 +EXTRA_DIST += sod.1.in sod-module.5.in ###-------------------------------------------------------------------------- ### Installation. @@ -190,9 +177,10 @@ install-data-local: done; \ dots=$$(echo $$fwd | sed 's/[^ ][^ ]*/../g'); \ rel=$$(echo $$dots $$twd | tr " " "/"); \ - for i in sod.asd sod-frontend.asd; do \ + for i in sod.asd; do \ echo >&2 "CREATE $$to/$$i"; \ sed -e '/#|@-auto-@|#/ { r auto.lisp' -e ' d; }' \ + -e '/#|@-del-@|#/ d' \ -e '/#|@-path-@|#/ d' \ $(srcdir)/$$i.in >$(DESTDIR)$(pkglispsrcdir)/$$i.new; \ mv $(DESTDIR)$(pkglispsrcdir)/$$i.new \ @@ -207,4 +195,18 @@ uninstall-local: rm -f $(DESTDIR)$(pkglispsrcdir)/$$i $(DESTDIR)$(lispsysdir)/$$i; \ done +###-------------------------------------------------------------------------- +### Additional random things useful during development. + +## ASDF hacking for finding the system definitions. +EXTRA_DIST += asdf-hack.lisp.in +noinst_DATA += asdf-hack.lisp +asdf-hack.lisp: asdf-hack.lisp.in Makefile + $(SUBST) $(srcdir)/asdf-hack.lisp.in >$@.new $(SUBSTITUTIONS) && \ + mv $@.new $@ +CLEANFILES += asdf-hack.lisp + +## Emacs hacking for indentation. +EXTRA_DIST += emacs-hacks.el + ###----- That's all, folks --------------------------------------------------