Fixes bug 163690: ikarus should display version number instead of

build date in the banner.

The version in bzr now displays:

Ikarus Scheme version 0.0.1+ (revision 1090, build 2007-11-19)
Copyright (c) 2006-2007 Abdulaziz Ghuloum

The shipped versions should display 

Ikarus Scheme version 0.0.2
Copyright (c) 2006-2007 Abdulaziz Ghuloum
This commit is contained in:
Abdulaziz Ghuloum 2007-11-19 15:37:42 -05:00
parent 9349c3a5cb
commit 728daddfc0
3 changed files with 31 additions and 3 deletions

View File

@ -4,8 +4,16 @@ EXTRA_DIST=ikarus.boot.orig ikarus.enumerations.ss ikarus.exceptions.ss ikarus.a
all: $(nodist_pkglib_DATA)
ikarus.config.ss: Makefile
revnofile = "../.bzr/branch/last-revision"
revno = "$(shell sed 's/ .*//' $(revnofile))"
if [-f $(revnofile)] ; then \
revnodeps = $(revnofile) \
fi
ikarus.config.ss: Makefile $(revnodeps)
echo '(define ikarus-version "$(PACKAGE_VERSION)")' >$@
echo '(define ikarus-revision $(revno))' >>$@
echo '(define ikarus-lib-dir "$(pkglibdir)")' >>$@
CLEANFILES=$(nodist_pkglib_DATA) ikarus.config.ss
@ -14,3 +22,6 @@ ikarus.boot: $(EXTRA_DIST) ikarus.config.ss
../src/ikarus -b ./ikarus.boot.orig --r6rs-script makefile.ss
# pkglibdir
# if [-f "../.bzr/branch/last-revision"] \
# echo '(define ikarus-reversion "$(PACKAGE_VERSION)")' >>$@ \
# fi

View File

@ -183,6 +183,8 @@ EXTRA_DIST = ikarus.boot.orig ikarus.enumerations.ss \
ikarus/code-objects.ss ikarus/compiler.ss \
ikarus/intel-assembler.ss ikarus/fasl/write.ss \
unicode/unicode-char-cases.ss unicode/unicode-charinfo.ss
revnofile = "../.bzr/branch/last-revision"
revno = "$(shell sed 's/ .*//' $(revnofile))"
CLEANFILES = $(nodist_pkglib_DATA) ikarus.config.ss
all: all-am
@ -369,14 +371,22 @@ uninstall-am: uninstall-nodist_pkglibDATA
all: $(nodist_pkglib_DATA)
ikarus.config.ss: Makefile
if [-f $(revnofile)] ; then \
revnodeps = $(revnofile) \
fi
ikarus.config.ss: Makefile $(revnodeps)
echo '(define ikarus-version "$(PACKAGE_VERSION)")' >$@
echo '(define ikarus-revision $(revno))' >>$@
echo '(define ikarus-lib-dir "$(pkglibdir)")' >>$@
ikarus.boot: $(EXTRA_DIST) ikarus.config.ss
../src/ikarus -b ./ikarus.boot.orig --r6rs-script makefile.ss
# pkglibdir
# if [-f "../.bzr/branch/last-revision"] \
# echo '(define ikarus-reversion "$(PACKAGE_VERSION)")' >>$@ \
# fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -24,7 +24,14 @@
(include "ikarus.config.ss")
(define (print-greeting)
(printf "Ikarus Scheme version ~a\n" ikarus-version)
(printf "Ikarus Scheme version ~a\n"
(if (zero? (string-length ikarus-revision))
ikarus-version
(format "~a+ (revision ~a, build ~a)"
ikarus-version
ikarus-revision
(let-syntax ([ds (lambda (x) (date-string))])
ds))))
(display "Copyright (c) 2006-2007 Abdulaziz Ghuloum\n\n"))
(define (init-library-path)