]> Savannah Git Hosting - gnulib.git/commitdiff
libposix: use git-version-gen for version numbering
authorGary V. Vaughan <gary@gnu.org>
Mon, 11 Oct 2010 14:13:28 +0000 (21:13 +0700)
committerGary V. Vaughan <gary@gnu.org>
Tue, 12 Oct 2010 12:10:27 +0000 (19:10 +0700)
* build-aux/git-version-gen: In order to work inside the
libposix subdirectory, also check the parent directory for .git
before assuming git describe will not work.
* libposix/bootstrap: Add git-version-gen to gnulib-tool
invocation.
* libposix/configure.ac (AC_INIT): Use it to get a unique
version number, and a configure time banner.

ChangeLog
build-aux/git-version-gen
libposix/.gitignore
libposix/bootstrap
libposix/configure.ac
libposix/lib/Makefile.am

index 05515b2769435d89c2b3b3cc2761c6f1f18f9f6f..7dce876935985733400d2cf5bc425135a12f4b01 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2010-10-12  Gary V. Vaughan  <gary@gnu.org>
 
+       libposix: use git-version-gen for version numbering
+       * build-aux/git-version-gen: In order to work inside the
+       libposix subdirectory, also check the parent directory for .git
+       before assuming git describe will not work.
+       * libposix/bootstrap: Add git-version-gen to gnulib-tool
+       invocation.
+       * libposix/configure.ac (AC_INIT): Use it to get a unique
+       version number, and a configure time banner.
+
        libposix: raw files to import an installable libposix project
        * libposix/bootstrap: New script to import gnulib posix modules
        and bootstrap configury so that the result is an installable
index 5617eb8d4ea774664e9d73db31a0975cd4d42f99..76182c9c416af380a7c873665b215bb31f9f4e5d 100755 (executable)
@@ -98,7 +98,7 @@ fi
 if test -n "$v"
 then
     : # use $v
-elif test -d .git \
+elif test -d .git || test -d ../.git \
     && v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
          || git describe --abbrev=4 HEAD 2>/dev/null` \
     && v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \
index d54d869e3b47ec07ea14c24cb817059ef197c186..b078d37a6b2e6848f29aac9f6d13f0018bf9f100 100644 (file)
@@ -1,5 +1,7 @@
 .deps
 .libs
+/.tarball-version
+/.version
 *.a
 *.gperf
 *.la
@@ -18,8 +20,10 @@ arg-nonnull.h
 c++defs.h
 compile
 config.*
+/config.rpath
 configure
 depcomp
+/git-version-gen
 install-sh
 /lib/*.alias
 /lib/*.c
@@ -42,4 +46,3 @@ stamp-h1
 /tests/test-*
 unused-parameter.h
 warn-on-use.h
-/config.rpath
index 59d06d0562928ecdd5c0bbf236356bbdfe395b99..c87f6adc1dd9c01697872158b772320921daf5ec 100755 (executable)
@@ -5,7 +5,7 @@ PATH=..:$PATH
 gnulib-tool --import --lib=libposix --makefile-name=gnulib.mk \
   --macro-prefix=LIBPOSIX --libtool --no-changelog --symlink \
   --with-tests --with-c++-tests --with-longrunning-tests \
-  libposix
+  git-version-gen libposix
 
 mv tests/gnulib.mk tests/Makefile.am
 
index a3aedc3694c8714bc771aed4863747572f5f680a..c68fa48d920df716a0ad798adbb86c92ee82419a 100644 (file)
@@ -1,4 +1,8 @@
-AC_INIT([GNU libposix], [20101011], [bug-gnulib@gnu.org])
+AC_INIT([GNU libposix],
+        m4_esyscmd([./git-version-gen .tarball-version]),
+        [bug-gnulib@gnu.org])
+
+AS_BOX([Configuring AC_PACKAGE_TARNAME AC_PACKAGE_VERSION])
 
 dnl this should be AC_REQUIRED by gnulib modules that need it,
 dnl but either a couple of modules have forgotten it, or else
@@ -10,6 +14,7 @@ dnl for finding install-sh in the generated configure script
 dnl consider this directory to be a subproject of gnulib proper,
 dnl and will only look for install-sh in . and .. :(
 dnl AC_CONFIG_AUX_DIR([build-aux])
+
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADER([config.h])
 AC_CONFIG_FILES([Makefile lib/Makefile tests/Makefile])
@@ -17,6 +22,11 @@ AC_CONFIG_FILES([Makefile lib/Makefile tests/Makefile])
 AM_INIT_AUTOMAKE([foreign])
 LT_INIT
 
+# libtool interface versioning for libposix.la
+AC_SUBST([LTV_CURRENT], 0)
+AC_SUBST([LTV_REVISION], 0)
+AC_SUBST([LTV_AGE], 0)
+
 AC_PROG_CC
 LIBPOSIX_EARLY
 AM_PROG_CC_C_O
index eb212c45e59f0de878bcb122eeb66250380b9645..9be48fce60b4e9ffa7fe70cacf0a0a529908c5e2 100644 (file)
@@ -1,11 +1,11 @@
 BUILT_SOURCES =
-EXTRA_DIST =
+SUFFIXES =
 
+EXTRA_DIST =
 EXTRA_HEADERS =
 nodist_include_HEADERS =
 nobase_nodist_include_HEADERS =
 
-
 CLEANFILES =
 MOSTLYCLEANDIRS =
 MOSTLYCLEANFILES =
@@ -13,5 +13,4 @@ MAINTAINERCLEANFILES =
 
 include gnulib.mk
 
-
-libposix_la_LDFLAGS += -version-info 0:0:0
+libposix_la_LDFLAGS += -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE)