###----- Licensing notice ---------------------------------------------------
###
-### This file is part of the Sensble Object Design, an object system for C.
+### This file is part of the Sensible Object Design, an object system for C.
###
### SOD is free software; you can redistribute it and/or modify
### it under the terms of the GNU General Public License as published by
SYSDEFS =
ASDF_ENV = \
+ CL_SOURCE_REGISTRY=$$(pwd): \
ASDF_OUTPUT_TRANSLATIONS=$$(cd $(srcdir); pwd):$(abs_builddir):
###--------------------------------------------------------------------------
## Building the executable image.
bin_PROGRAMS += sod
sod_SOURCES =
-sod: $(LISP_SOURCES) sod.asd sod-frontend.asd auto.lisp
- $(V_DUMP)$(ASDF_ENV) $(CL_LAUNCH) -o sod -d ! -l $(LISPSYS) +I \
+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
+## The executable is needed if we're just distributing.
+dist-hook: sod$(EXEEXT)
+
###--------------------------------------------------------------------------
### Unit testing.
## 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") ;\
+ $(V_TEST)$(ASDF_ENV) $(CL_LAUNCH) -l $(LISPSYS) \
+ -s sod-frontend +I \
+ -i '(handler-case ;\
+ (progn ;\
+ (asdf:load-system "sod-test") ;\
+ (asdf:test-system "sod")) ;\
(error (cond) ;\
(format *error-output* "ERR: ~A~%" cond) ;\
- (cl-launch:quit 1)))'
+ (optparse:exit 1)))'
+
+###--------------------------------------------------------------------------
+### Manual pages.
+
+man_MANS += sod.1 sod-module.5
+CLEANFILES += sod.1 sod-module.5
+EXTRA_DIST += sod.1.in sod-module.5.in
###--------------------------------------------------------------------------
### Installation.
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 --------------------------------------------------