mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
version.h has SCM_EFFECTIVE_VERSION; effective-version uses that
* libguile/version.c (scm_effective_version): Use SCM_EFFECTIVE_VERSION. * libguile/version.h.in (SCM_EFFECTIVE_VERSION): Define from GUILE_EFFECTIVE_VERSION. * libguile/Makefile.am (version.h): Subst in GUILE_EFFECTIVE_VERSION. * test-suite/tests/version.test ("version reporting works"): The effective version is not necessarily MAJOR.MINOR. Remove check.
This commit is contained in:
parent
462bcfd038
commit
89607fab50
4 changed files with 8 additions and 16 deletions
|
@ -604,7 +604,8 @@ version.h: version.h.in $(top_builddir)/config.status
|
||||||
sed < $(srcdir)/version.h.in > $@.tmp \
|
sed < $(srcdir)/version.h.in > $@.tmp \
|
||||||
-e s:@-GUILE_MAJOR_VERSION-@:${GUILE_MAJOR_VERSION}: \
|
-e s:@-GUILE_MAJOR_VERSION-@:${GUILE_MAJOR_VERSION}: \
|
||||||
-e s:@-GUILE_MINOR_VERSION-@:${GUILE_MINOR_VERSION}: \
|
-e s:@-GUILE_MINOR_VERSION-@:${GUILE_MINOR_VERSION}: \
|
||||||
-e s:@-GUILE_MICRO_VERSION-@:${GUILE_MICRO_VERSION}:
|
-e s:@-GUILE_MICRO_VERSION-@:${GUILE_MICRO_VERSION}: \
|
||||||
|
-e s:@-GUILE_EFFECTIVE_VERSION-@:${GUILE_EFFECTIVE_VERSION}:
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
|
|
||||||
## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds.
|
## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1995,1996, 1999, 2000, 2001, 2006, 2008 Free Software Foundation, Inc.
|
/* Copyright (C) 1995,1996, 1999, 2000, 2001, 2006, 2008, 2010 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public License
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
@ -105,14 +105,7 @@ SCM_DEFINE (scm_effective_version, "effective-version", 0, 0, 0,
|
||||||
"@end lisp")
|
"@end lisp")
|
||||||
#define FUNC_NAME s_scm_effective_version
|
#define FUNC_NAME s_scm_effective_version
|
||||||
{
|
{
|
||||||
|
return scm_from_locale_string (SCM_EFFECTIVE_VERSION);
|
||||||
char version_str[2 * 4 + 3];
|
|
||||||
|
|
||||||
#if (SCM_MAJOR_VERSION > 9999 || SCM_MINOR_VERSION > 9999)
|
|
||||||
# error version string may overflow buffer
|
|
||||||
#endif
|
|
||||||
sprintf (version_str, "%d.%d", SCM_MAJOR_VERSION, SCM_MINOR_VERSION);
|
|
||||||
return scm_from_locale_string (version_str);
|
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#ifndef SCM_VERSION_H
|
#ifndef SCM_VERSION_H
|
||||||
#define SCM_VERSION_H
|
#define SCM_VERSION_H
|
||||||
|
|
||||||
/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008 Free Software Foundation, Inc.
|
/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008, 2010 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public License
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
@ -30,6 +30,7 @@
|
||||||
#define SCM_MAJOR_VERSION @-GUILE_MAJOR_VERSION-@
|
#define SCM_MAJOR_VERSION @-GUILE_MAJOR_VERSION-@
|
||||||
#define SCM_MINOR_VERSION @-GUILE_MINOR_VERSION-@
|
#define SCM_MINOR_VERSION @-GUILE_MINOR_VERSION-@
|
||||||
#define SCM_MICRO_VERSION @-GUILE_MICRO_VERSION-@
|
#define SCM_MICRO_VERSION @-GUILE_MICRO_VERSION-@
|
||||||
|
#define SCM_EFFECTIVE_VERSION "@-GUILE_EFFECTIVE_VERSION-@"
|
||||||
|
|
||||||
SCM_API SCM scm_major_version (void);
|
SCM_API SCM scm_major_version (void);
|
||||||
SCM_API SCM scm_minor_version (void);
|
SCM_API SCM scm_minor_version (void);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
;;;; versions.test --- test suite for Guile's version functions -*- scheme -*-
|
;;;; versions.test --- test suite for Guile's version functions -*- scheme -*-
|
||||||
;;;; Greg J. Badros <gjb@cs.washington.edu>
|
;;;; Greg J. Badros <gjb@cs.washington.edu>
|
||||||
;;;;
|
;;;;
|
||||||
;;;; Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
|
;;;; Copyright (C) 2000, 2001, 2006, 2010 Free Software Foundation, Inc.
|
||||||
;;;;
|
;;;;
|
||||||
;;;; This library is free software; you can redistribute it and/or
|
;;;; This library is free software; you can redistribute it and/or
|
||||||
;;;; modify it under the terms of the GNU Lesser General Public
|
;;;; modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -26,7 +26,4 @@
|
||||||
(string=? (version)
|
(string=? (version)
|
||||||
(string-append (major-version) "."
|
(string-append (major-version) "."
|
||||||
(minor-version) "."
|
(minor-version) "."
|
||||||
(micro-version)))
|
(micro-version)))))
|
||||||
(string=? (effective-version)
|
|
||||||
(string-append (major-version) "."
|
|
||||||
(minor-version)))))
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue