From 0644542565edb050553a035ea27fa9b4e28501eb Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Wed, 21 Nov 2007 00:59:05 -0500 Subject: [PATCH] Added a last-revision file and modified scheme/Makefile.am accordingly. --- scheme/Makefile.am | 18 ++++++------------ scheme/Makefile.in | 17 ++++++----------- scheme/ikarus.main.ss | 2 +- scheme/last-revision | 1 + 4 files changed, 14 insertions(+), 24 deletions(-) create mode 100644 scheme/last-revision diff --git a/scheme/Makefile.am b/scheme/Makefile.am index 4415fcf..9a8ecc4 100644 --- a/scheme/Makefile.am +++ b/scheme/Makefile.am @@ -4,23 +4,17 @@ EXTRA_DIST=ikarus.boot.orig ikarus.enumerations.ss ikarus.exceptions.ss ikarus.a all: $(nodist_pkglib_DATA) -revnofile = "../.bzr/branch/last-revision" -revnodeps = $(shell ls $(revnofile)) -revno = "$(shell sed 's/ .*//' $(revnofile))" +revno = "$(shell sed 's/ .*//' ../.bzr/branch/last-revision)" +last-revision: $(shell ls ../.bzr/branch/last-revision) + echo $(revno) >$@ - - -ikarus.config.ss: Makefile $(revnodeps) +ikarus.config.ss: Makefile last-revision echo '(define ikarus-version "$(PACKAGE_VERSION)")' >$@ - echo '(define ikarus-revision $(revno))' >>$@ + echo '(define ikarus-revision "$(shell cat last-revision)")' >>$@ echo '(define ikarus-lib-dir "$(pkglibdir)")' >>$@ -CLEANFILES=$(nodist_pkglib_DATA) ikarus.config.ss +CLEANFILES=$(nodist_pkglib_DATA) ikarus.config.ss last-revision 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 c3d46a2..79aa284 100644 --- a/scheme/Makefile.in +++ b/scheme/Makefile.in @@ -183,10 +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" -revnodeps = $(shell ls $(revnofile)) -revno = "$(shell sed 's/ .*//' $(revnofile))" -CLEANFILES = $(nodist_pkglib_DATA) ikarus.config.ss +revno = "$(shell sed 's/ .*//' ../.bzr/branch/last-revision)" +CLEANFILES = $(nodist_pkglib_DATA) ikarus.config.ss last-revision all: all-am .SUFFIXES: @@ -371,19 +369,16 @@ uninstall-am: uninstall-nodist_pkglibDATA all: $(nodist_pkglib_DATA) +last-revision: $(shell ls ../.bzr/branch/last-revision) + echo $(revno) >$@ -ikarus.config.ss: Makefile $(revnodeps) +ikarus.config.ss: Makefile last-revision echo '(define ikarus-version "$(PACKAGE_VERSION)")' >$@ - echo '(define ikarus-revision $(revno))' >>$@ + echo '(define ikarus-revision "$(shell cat last-revision)")' >>$@ 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 3d43e77..e1d0436 100644 --- a/scheme/ikarus.main.ss +++ b/scheme/ikarus.main.ss @@ -29,7 +29,7 @@ ikarus-version (format "~a+ (revision ~a, build ~a)" ikarus-version - ikarus-revision + (+ 1 (string->number ikarus-revision)) (let-syntax ([ds (lambda (x) (date-string))]) ds)))) (display "Copyright (c) 2006-2007 Abdulaziz Ghuloum\n\n")) diff --git a/scheme/last-revision b/scheme/last-revision new file mode 100644 index 0000000..ba851d8 --- /dev/null +++ b/scheme/last-revision @@ -0,0 +1 @@ +1096