From: Mark Wooding Date: Mon, 14 Sep 2015 17:11:46 +0000 (+0100) Subject: Update automatically managed build utilities. X-Git-Url: https://git.distorted.org.uk/~mdw/sod/commitdiff_plain/03ff6477f47c949dff767b9cedf1eefedc85d27f?hp=dfdcf6ca08c0c619900fd7d81893121f80f02d9b Update automatically managed build utilities. --- diff --git a/Makefile.in b/Makefile.in index c4b6601..e71cd0a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -228,6 +228,7 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +ASDF_VERSION = @ASDF_VERSION@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -378,7 +379,8 @@ SUBSTITUTIONS = \ 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)) diff --git a/configure b/configure index d00f3a2..7b21c2f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sod 0.2.0-29-g54c0. +# Generated by GNU Autoconf 2.69 for sod 0.2.0-30-g58a9. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sod' PACKAGE_TARNAME='sod' -PACKAGE_VERSION='0.2.0-29-g54c0' -PACKAGE_STRING='sod 0.2.0-29-g54c0' +PACKAGE_VERSION='0.2.0-30-g58a9' +PACKAGE_STRING='sod 0.2.0-30-g58a9' PACKAGE_BUGREPORT='mdw@distorted.org.uk' PACKAGE_URL='' @@ -641,6 +641,7 @@ lispsrcdir fasl LISPSYS CL_LAUNCH +ASDF_VERSION LIBTOOL_VERSION_INFO CPP OTOOL64 @@ -1319,7 +1320,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sod 0.2.0-29-g54c0 to adapt to many kinds of systems. +\`configure' configures sod 0.2.0-30-g58a9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1389,7 +1390,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sod 0.2.0-29-g54c0:";; + short | recursive ) echo "Configuration of sod 0.2.0-30-g58a9:";; esac cat <<\_ACEOF @@ -1498,7 +1499,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sod configure 0.2.0-29-g54c0 +sod configure 0.2.0-30-g58a9 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1776,7 +1777,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sod $as_me 0.2.0-29-g54c0, which was +It was created by sod $as_me 0.2.0-30-g58a9, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2592,7 +2593,7 @@ fi # Define the identity of the package. PACKAGE='sod' - VERSION='0.2.0-29-g54c0' + VERSION='0.2.0-30-g58a9' cat >>confdefs.h <<_ACEOF @@ -11314,6 +11315,30 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +## This is surprisingly awful. The convention for official version numbers +## is that they look like MAJOR.MINOR.PATCH[.BPB][-N-gHEX[+]]. ASDF +## insists on simple numeric things separated by dots. If there's no Git +## thing on the end, then the main version number will do fine. If there +## is, then we insert /two/ `0's in, followed by N and the HEX converted to +## decimal. Why two? Because if there's no brown-paper-bag number, we +## want to make sure that the first BPB release is higher than any of the +## preceding Git revisions. +ver=0.2.0-30-g58a9 +case $ver in + *-*-g*) + base=${ver%%-*} tail=${ver#*-} + n=${tail%%-*} tail=${tail#*-g} + case $tail in *+) grubby=.1 tail=${tail%+} ;; *) grubby= ;; esac + rev=$(( 0x$tail )) + ASDF_VERSION=$base.0.0.$n.$rev$grubby + ;; + *) + ASDF_VERSION=$ver + ;; +esac + + + # Check whether --with-lisp-system was given. if test "${with_lisp_system+set}" = set; then : @@ -11970,7 +11995,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sod $as_me 0.2.0-29-g54c0, which was +This file was extended by sod $as_me 0.2.0-30-g58a9, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12027,7 +12052,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sod config.status 0.2.0-29-g54c0 +sod config.status 0.2.0-30-g58a9 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index cb1c5a6..c1fed50 100644 --- a/configure.ac +++ b/configure.ac @@ -39,6 +39,32 @@ AX_CFLAGS_WARN_ALL mdw_LIBTOOL_VERSION_INFO dnl-------------------------------------------------------------------------- +dnl Convert the version number for ASDF. + +## This is surprisingly awful. The convention for official version numbers +## is that they look like MAJOR.MINOR.PATCH[.BPB][-N-gHEX[+]]. ASDF +## insists on simple numeric things separated by dots. If there's no Git +## thing on the end, then the main version number will do fine. If there +## is, then we insert /two/ `0's in, followed by N and the HEX converted to +## decimal. Why two? Because if there's no brown-paper-bag number, we +## want to make sure that the first BPB release is higher than any of the +## preceding Git revisions. +ver=AC_PACKAGE_VERSION +case $ver in + *-*-g*) + base=${ver%%-*} tail=${ver#*-} + n=${tail%%-*} tail=${tail#*-g} + case $tail in *+) grubby=.1 tail=${tail%+} ;; *) grubby= ;; esac + rev=$(( 0x$tail )) + ASDF_VERSION=$base.0.0.$n.$rev$grubby + ;; + *) + ASDF_VERSION=$ver + ;; +esac +AC_SUBST([ASDF_VERSION]) + +dnl-------------------------------------------------------------------------- dnl Common Lisp things. AC_ARG_WITH([lisp-system], diff --git a/lib/Makefile.in b/lib/Makefile.in index b6c62b8..01773e4 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -206,6 +206,7 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +ASDF_VERSION = @ASDF_VERSION@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -354,7 +355,8 @@ SUBSTITUTIONS = \ 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)) diff --git a/src/Makefile.am b/src/Makefile.am index c7779f9..7b23dd8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -27,13 +27,11 @@ include $(top_srcdir)/vars.am nobase_dist_pkglispsrc_DATA = $(LISP_SOURCES) LISP_SOURCES = +SYSDEFS = ###-------------------------------------------------------------------------- ### The source files. -## The system definition file. -LISP_SOURCES += sod.asd - ## The package definition file. LISP_SOURCES += package.lisp @@ -87,7 +85,6 @@ LISP_SOURCES += method-proto.lisp method-impl.lisp LISP_SOURCES += method-aggregate.lisp ## User interface. -LISP_SOURCES += sod-frontend.asd LISP_SOURCES += frontend.lisp optparse.lisp ## Finishing touches. @@ -98,20 +95,39 @@ LISP_SOURCES += final.lisp CLEANFILES += *.$(fasl) parser/*.$(fasl) +## Autodetected configuration. +EXTRA_DIST += auto.lisp.in +CLEANFILES += auto.lisp +auto.lisp: auto.lisp.in Makefile + $(SUBST) $(srcdir)/auto.lisp.in >$@.new $(SUBSTITUTIONS) && \ + grep '^[^;]' $@.new >$@.strip && \ + rm -f $@.new && mv $@.strip $@ + +## Building a working-tree system definition. +EXTRA_DIST += sod.asd.in +CLEANFILES += sod.asd +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: $(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/: \ +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 ###-------------------------------------------------------------------------- ### Unit testing. ## The system definition. -EXTRA_DIST += sod-test.asd +EXTRA_DIST += sod-test.asd.in ## Basic utilities. EXTRA_DIST += test-base.lisp @@ -125,15 +141,17 @@ 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: - $(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)))' @@ -148,9 +166,9 @@ check-local: ## don't have spaces in them; but that's generally a bad idea in Makefiles ## anyway. 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 \ @@ -163,8 +181,21 @@ install-data-local: 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 -------------------------------------------------- diff --git a/src/Makefile.in b/src/Makefile.in index 00da4c6..5d70368 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -193,6 +193,7 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +ASDF_VERSION = @ASDF_VERSION@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -316,13 +317,15 @@ pkglispsrcdir = $(lispsrcdir)/$(PACKAGE) ###-------------------------------------------------------------------------- ### 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 @@ -345,7 +348,8 @@ SUBSTITUTIONS = \ 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)) @@ -374,7 +378,7 @@ nobase_dist_pkglispsrc_DATA = $(LISP_SOURCES) ###-------------------------------------------------------------------------- ### 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 \ @@ -393,8 +397,8 @@ LISP_SOURCES = sod.asd package.lisp utilities.lisp parser/package.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 @@ -693,7 +697,7 @@ ps: ps-am ps-am: -uninstall-am: uninstall-binPROGRAMS \ +uninstall-am: uninstall-binPROGRAMS uninstall-local \ uninstall-nobase_dist_pkglispsrcDATA \ uninstall-pkgincludeHEADERS @@ -712,7 +716,7 @@ uninstall-am: uninstall-binPROGRAMS \ 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 @@ -720,20 +724,26 @@ uninstall-am: uninstall-binPROGRAMS \ .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)))' @@ -742,9 +752,9 @@ check-local: ### 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 \ @@ -757,9 +767,22 @@ install-data-local: 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 -------------------------------------------------- diff --git a/src/auto.lisp.in b/src/auto.lisp.in new file mode 100644 index 0000000..758ef23 --- /dev/null +++ b/src/auto.lisp.in @@ -0,0 +1,7 @@ +;;; -*-lisp-*- + +(defparameter *version* "@VERSION@" + "The official Sod revision number.") + +(defparameter *sysdef-version* "@ASDF_VERSION@" + "The Sod revision number, forced into ASDF's limited format.") diff --git a/src/package.lisp b/src/package.lisp index a6b9785..d6e47f4 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -31,7 +31,7 @@ (cl:in-package #:sod) (export '*sod-version*) -(defvar *sod-version* (asdf:component-version (asdf:find-system "sod")) +(defparameter *sod-version* sod-sysdef:*version* "The version of the SOD translator system, as a string.") ;;;----- That's all, folks -------------------------------------------------- diff --git a/src/sod-frontend.asd b/src/sod-frontend.asd.in similarity index 95% rename from src/sod-frontend.asd rename to src/sod-frontend.asd.in index 6ba17cd..b81fd2d 100644 --- a/src/sod-frontend.asd +++ b/src/sod-frontend.asd.in @@ -28,15 +28,18 @@ (cl:in-package #:sod-sysdef) +#|@-auto-@|# (load "auto.lisp") + ;;;-------------------------------------------------------------------------- ;;; Definition. (defsystem sod-frontend ;; Boring copyright stuff. - :version "1.0.0" + :version #.*sysdef-version* :author "Mark Wooding" :license "GNU General Public License, version 2 or later" + #|@-path-@|# :pathname "@srcdir@" ;; Documentation. :description "A Sensible Object Design for C, command-line frontend." diff --git a/src/sod-test.asd b/src/sod-test.asd.in similarity index 93% rename from src/sod-test.asd rename to src/sod-test.asd.in index b3024dc..6b2a83b 100644 --- a/src/sod-test.asd +++ b/src/sod-test.asd.in @@ -23,10 +23,12 @@ ;;; along with SOD; if not, write to the Free Software Foundation, ;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -(cl:defpackage #:sod-test-sysdef +(cl:defpackage #:sod-sysdef (:use #:common-lisp #:asdf)) -(cl:in-package #:sod-test-sysdef) +(cl:in-package #:sod-sysdef) + +#|@-auto-@|# (load "auto.lisp") ;;;-------------------------------------------------------------------------- ;;; Definition. @@ -34,9 +36,10 @@ (defsystem sod-test ;; Boring copyright stuff. - :version "1.0.0" + :version #:*sysdef-version* :author "Mark Wooding" :license "GNU General Public License, version 2 or later" + #|@-path-@|# :pathname "@srcdir@" ;; Documentation. :description "Tests for the Sensible Object Design translator." diff --git a/src/sod.asd b/src/sod.asd.in similarity index 97% rename from src/sod.asd rename to src/sod.asd.in index f207df0..d710fb1 100644 --- a/src/sod.asd +++ b/src/sod.asd.in @@ -24,19 +24,23 @@ ;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. (cl:defpackage #:sod-sysdef - (:use #:common-lisp #:asdf)) + (:use #:common-lisp #:asdf) + (:export #:*version*)) (cl:in-package #:sod-sysdef) +#|@-auto-@|# (load "auto.lisp") + ;;;-------------------------------------------------------------------------- ;;; Definition. (defsystem sod ;; Boring copyright stuff. - :version "0.2.0" + :version #.*sysdef-version* :author "Mark Wooding" :license "GNU General Public License, version 2 or later" + #|@-path-@|# :pathname "@srcdir@" ;; Documentation. :description "A Sensible Object Design for C." diff --git a/src/test-base.lisp b/src/test-base.lisp index f7210ab..203f918 100644 --- a/src/test-base.lisp +++ b/src/test-base.lisp @@ -55,17 +55,6 @@ (defclass base-test (test-case) ()) (add-test *sod-test-suite* (get-suite base-test)) -(export '*build-version*) -(defvar *build-version* nil) - -(def-test-method check-version ((test base-test) :run nil) - (unless (or (null *build-version*) - (and (>= (length *build-version*) (length *sod-version*)) - (string= *build-version* *sod-version* - :end1 (length *sod-version*)))) - (failure "Build version ~A doesn't match package version ~A." - *build-version* *sod-version*))) - (defun run-tests (&optional which) (textui-test-run (acond ((null which) *sod-test-suite*) diff --git a/test/Makefile.in b/test/Makefile.in index a4fe227..523b610 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -195,6 +195,7 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +ASDF_VERSION = @ASDF_VERSION@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -339,7 +340,8 @@ SUBSTITUTIONS = \ 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)) diff --git a/vars.am b/vars.am index 1b360ee..7e7406c 100644 --- a/vars.am +++ b/vars.am @@ -66,7 +66,8 @@ SUBSTITUTIONS = \ 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))