1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Use Gnulib's `git-version-gen'.

* GUILE-VERSION (GUILE_VERSION): Remove.

* Makefile.am (dist-hook): Depend on `gen-tarball-version'.
  (BUILT_SOURCES): New variable.
  ($(top_srcdir)/.version, gen-tarball-version): New targets.

* cfg.mk (git-version-gen-tag-sed-script): New variable.

* configure.ac: Use `build-aux/git-version-gen' to generate the VERSION
  argument of `AC_INIT'.  Initialize Automake without `check-news'.
  Define $GUILE_VERSION as an alias for $PACKAGE_VERSION.
This commit is contained in:
Ludovic Courtès 2010-05-30 00:14:02 +02:00
parent 5ad8e59ff5
commit db10a69bf4
4 changed files with 16 additions and 10 deletions

View file

@ -1,11 +1,12 @@
# -*-shell-script-*- # -*-shell-script-*-
# Note: `GUILE_VERSION' is defined in `configure.ac' using `git-version-gen'.
GUILE_MAJOR_VERSION=1 GUILE_MAJOR_VERSION=1
GUILE_MINOR_VERSION=9 GUILE_MINOR_VERSION=9
GUILE_MICRO_VERSION=10 GUILE_MICRO_VERSION=10
GUILE_EFFECTIVE_VERSION=2.0 GUILE_EFFECTIVE_VERSION=2.0
GUILE_VERSION=${GUILE_MAJOR_VERSION}.${GUILE_MINOR_VERSION}.${GUILE_MICRO_VERSION}
# All of the shared lib versioning info. Right now, for this to work # All of the shared lib versioning info. Right now, for this to work
# properly, you'll also need to add AC_SUBST calls to the right place # properly, you'll also need to add AC_SUBST calls to the right place

View file

@ -43,7 +43,7 @@ DISTCLEANFILES = check-guile.log
DISTCHECK_CONFIGURE_FLAGS = --enable-error-on-warning DISTCHECK_CONFIGURE_FLAGS = --enable-error-on-warning
dist-hook: gen-ChangeLog dist-hook: gen-ChangeLog gen-tarball-version
clean-local: clean-local:
rm -rf cache/ rm -rf cache/
@ -60,4 +60,10 @@ gen-ChangeLog:
mv $(distdir)/cl-t $(distdir)/ChangeLog; \ mv $(distdir)/cl-t $(distdir)/ChangeLog; \
fi fi
BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
gen-tarball-version:
echo $(VERSION) > $(distdir)/.tarball-version
# Makefile.am ends here # Makefile.am ends here

2
cfg.mk
View file

@ -1 +1,3 @@
old_NEWS_hash = d41d8cd98f00b204e9800998ecf8427e old_NEWS_hash = d41d8cd98f00b204e9800998ecf8427e
git-version-gen-tag-sed-script := \
's/^release_\([0-9]\+\)-\([0-9]\+\)-\([0-9]\+\)-/v\1.\2\.\3-/g'

View file

@ -27,25 +27,22 @@ Floor, Boston, MA 02110-1301, USA.
AC_PREREQ(2.61) AC_PREREQ(2.61)
dnl `patsubst' here deletes the newline which "echo" prints. We can't use
dnl "echo -n" since -n is not portable (see autoconf manual "Limitations of
dnl Builtins"), in particular on solaris it results in a literal "-n" in
dnl the output.
dnl
AC_INIT([GNU Guile], AC_INIT([GNU Guile],
patsubst(m4_esyscmd(. ./GUILE-VERSION && echo ${GUILE_VERSION}),[ m4_esyscmd([build-aux/git-version-gen \
]), .tarball-version \
's/^release_\([0-9]\+\)-\([0-9]\+\)-\([0-9]\+\)-/v\1.\2\.\3-/g']),
[bug-guile@gnu.org]) [bug-guile@gnu.org])
AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR(GUILE-VERSION) AC_CONFIG_SRCDIR(GUILE-VERSION)
AM_INIT_AUTOMAKE([gnu no-define check-news -Wall -Wno-override]) AM_INIT_AUTOMAKE([gnu no-define -Wall -Wno-override])
AC_COPYRIGHT(GUILE_CONFIGURE_COPYRIGHT) AC_COPYRIGHT(GUILE_CONFIGURE_COPYRIGHT)
AC_CONFIG_SRCDIR([GUILE-VERSION]) AC_CONFIG_SRCDIR([GUILE-VERSION])
. $srcdir/GUILE-VERSION . $srcdir/GUILE-VERSION
GUILE_VERSION="$PACKAGE_VERSION"
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AH_TOP(/*GUILE_CONFIGURE_COPYRIGHT*/) AH_TOP(/*GUILE_CONFIGURE_COPYRIGHT*/)