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
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"` \
.deps
.libs
+/.tarball-version
+/.version
*.a
*.gperf
*.la
c++defs.h
compile
config.*
+/config.rpath
configure
depcomp
+/git-version-gen
install-sh
/lib/*.alias
/lib/*.c
/tests/test-*
unused-parameter.h
warn-on-use.h
-/config.rpath
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
-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
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])
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
BUILT_SOURCES =
-EXTRA_DIST =
+SUFFIXES =
+EXTRA_DIST =
EXTRA_HEADERS =
nodist_include_HEADERS =
nobase_nodist_include_HEADERS =
-
CLEANFILES =
MOSTLYCLEANDIRS =
MOSTLYCLEANFILES =
include gnulib.mk
-
-libposix_la_LDFLAGS += -version-info 0:0:0
+libposix_la_LDFLAGS += -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE)