From 728daddfc080f02f9d40f84b0aaf115d9396432b Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Mon, 19 Nov 2007 15:37:42 -0500 Subject: [PATCH] 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 --- scheme/Makefile.am | 13 ++++++++++++- scheme/Makefile.in | 12 +++++++++++- scheme/ikarus.main.ss | 9 ++++++++- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/scheme/Makefile.am b/scheme/Makefile.am index 8ec314f..c75f9e2 100644 --- a/scheme/Makefile.am +++ b/scheme/Makefile.am @@ -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 diff --git a/scheme/Makefile.in b/scheme/Makefile.in index bf72687..cfbedaf 100644 --- a/scheme/Makefile.in +++ b/scheme/Makefile.in @@ -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: diff --git a/scheme/ikarus.main.ss b/scheme/ikarus.main.ss index d98146a..3d43e77 100644 --- a/scheme/ikarus.main.ss +++ b/scheme/ikarus.main.ss @@ -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)