AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
+ASDF_VERSION = @ASDF_VERSION@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
###--------------------------------------------------------------------------
### Unit testing.
-EXTRA_DIST = sod-test.asd test-base.lisp parser/parser-test.lisp \
+EXTRA_DIST = auto.lisp.in sod.asd.in sod-frontend.asd.in \
+ sod-test.asd.in test-base.lisp parser/parser-test.lisp \
parser/scanner-charbuf-test.lisp c-types-test.lisp \
- codegen-test.lisp lexer-test.lisp
+ codegen-test.lisp lexer-test.lisp sod-test.asd.in
###--------------------------------------------------------------------------
### Constructing an output image.
-CLEANFILES = $(BUILT_SOURCES) *.$(fasl) parser/*.$(fasl)
+CLEANFILES = $(BUILT_SOURCES) *.$(fasl) parser/*.$(fasl) auto.lisp \
+ sod.asd sod-frontend.asd sod-test.asd
DISTCLEANFILES =
MAINTAINERCLEANFILES =
SUFFIXES = .c .h .sod
prefix=$(prefix) exec_prefix=$(exec_prefix) \
libdir=$(libdir) includedir=$(includedir) \
bindir=$(bindir) sbindir=$(sbindir) \
- PACKAGE=$(PACKAGE) VERSION=$(VERSION)
+ srcdir=$(srcdir) \
+ PACKAGE=$(PACKAGE) VERSION=$(VERSION) ASDF_VERSION=$(ASDF_VERSION)
V_SUBST = $(V_SUBST_$(V))
V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
###--------------------------------------------------------------------------
### The source files.
-LISP_SOURCES = sod.asd package.lisp utilities.lisp parser/package.lisp \
+LISP_SOURCES = package.lisp utilities.lisp parser/package.lisp \
parser/floc-proto.lisp parser/floc-impl.lisp \
parser/streams-proto.lisp parser/streams-impl.lisp \
parser/scanner-proto.lisp parser/scanner-impl.lisp \
class-layout-proto.lisp class-layout-impl.lisp \
class-finalize-proto.lisp class-finalize-impl.lisp \
class-output.lisp method-proto.lisp method-impl.lisp \
- method-aggregate.lisp sod-frontend.asd frontend.lisp \
- optparse.lisp final.lisp
+ method-aggregate.lisp frontend.lisp optparse.lisp final.lisp
+SYSDEFS =
sod_SOURCES =
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS \
+uninstall-am: uninstall-binPROGRAMS uninstall-local \
uninstall-nobase_dist_pkglispsrcDATA \
uninstall-pkgincludeHEADERS
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- uninstall uninstall-am uninstall-binPROGRAMS \
+ uninstall uninstall-am uninstall-binPROGRAMS uninstall-local \
uninstall-nobase_dist_pkglispsrcDATA \
uninstall-pkgincludeHEADERS
.sod.h: $(SOD); $(V_SOD_h)$(SOD) -th $<
###----- That's all, folks --------------------------------------------------
-sod: $(LISP_SOURCES)
- $(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/: \
+auto.lisp: auto.lisp.in Makefile
+ $(SUBST) $(srcdir)/auto.lisp.in >$@.new $(SUBSTITUTIONS) && \
+ grep '^[^;]' $@.new >$@.strip && \
+ rm -f $@.new && mv $@.strip $@
+sod.asd: sod.asd.in Makefile
+ $(SUBST) $(srcdir)/sod.asd.in >$@.new $(SUBSTITUTIONS) && \
+ mv $@.new $@
+sod-frontend.asd: sod-frontend.asd.in Makefile
+ $(SUBST) $(srcdir)/sod-frontend.asd.in >$@.new $(SUBSTITUTIONS) && \
+ mv $@.new $@
+sod: $(LISP_SOURCES) sod.asd sod-frontend.asd auto.lisp
+ $(V_DUMP)$(CL_LAUNCH) -o sod -d ! -l $(LISPSYS) +I \
-s sod-frontend -r sod-frontend:main
+sod-test.asd: sod-test.asd.in Makefile
+ $(SUBST) $(srcdir)/sod-test.asd.in >$@.new $(SUBSTITUTIONS) && \
+ mv $@.new $@
-check-local:
- $(V_TEST)true_srcdir=$$(cd $(srcdir); pwd); \
- ASDF_OUTPUT_TRANSLATIONS=$$true_srcdir:$(abs_builddir): \
- $(CL_LAUNCH) -l $(LISPSYS) -s sod-test +I -S $$true_srcdir/: \
- -i '(handler-case ;\
- (progn ;\
- (setf sod-test:*build-version* "$(VERSION)") ;\
- (asdf:test-system "sod")) ;\
+check-local: sod sod-test.asd
+ $(V_TEST)$(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)))'
### Installation.
install-data-local:
- $(MKDIR_P) $(DESTDIR)$(lispsysdir)
+ $(MKDIR_P) $(DESTDIR)$(lispsysdir) $(DESTDIR)$(pkglispsrcdir)
@set -e; \
- from=$(lispsysdir) to=$(pkglispsrcdir)/sod.asd; \
+ from=$(lispsysdir) to=$(pkglispsrcdir); \
set -- $$(echo $$from | tr "/" " "); fwd=$$*; \
set -- $$(echo $$to | tr "/" " "); twd=$$*; \
while :; do \
done; \
dots=$$(echo $$fwd | sed 's/[^ ][^ ]*/../g'); \
rel=$$(echo $$dots $$twd | tr " " "/"); \
- echo >&2 "ln -s $$rel $$to"; \
- ln -s $$rel $(DESTDIR)$$from/sod.asd.new; \
- mv $(DESTDIR)$$from/sod.asd.new $(DESTDIR)$$from/sod.asd
+ for i in sod.asd sod-frontend.asd; do \
+ echo >&2 "CREATE $$to/$$i"; \
+ sed -e '/#|@-auto-@|#/ { r auto.lisp' -e ' d; }' \
+ -e '/#|@-path-@|#/ d' \
+ $(srcdir)/$$i.in >$(DESTDIR)$(pkglispsrcdir)/$$i.new; \
+ mv $(DESTDIR)$(pkglispsrcdir)/$$i.new \
+ $(DESTDIR)$(pkglispsrcdir)/$$i; \
+ echo >&2 "LINK $$rel/$$i $$to/$$i"; \
+ ln -s $$rel/$$i $(DESTDIR)$$from/$$i.new; \
+ mv $(DESTDIR)$$from/$$i.new $(DESTDIR)$$from/$$i; \
+ done
+
+uninstall-local:
+ for i in sod.asd sod-frontend.asd; do \
+ rm -f $(DESTDIR)$(pkglispsrcdir)/$$i $(DESTDIR)$(lispsysdir)/$$i; \
+ done
###----- That's all, folks --------------------------------------------------