+2010-12-08 Gary V. Vaughan <gary@gnu.org>
+
+ libposix: generate compile and runtime versions with configure
+ * libposix/lib/version.c, libposix/lib/version.h.in: Templates
+ for code to allow runtime and compile time checking of libposix
+ version numbers.
+ * libposix/configure.ac (AC_CONFIG_FILES): Use the already
+ calculated libposix version number to generate libposix/
+ lib/version.h.
+ * libposix/mk-tarball (func_mkver): Removed. Adjust all callers.
+ Don't generate files required by the build in an optionally
+ used script, and incidentally avoid recalculating the version
+ number that configure already knows.
+
2010-12-07 Gary V. Vaughan <gary@gnu.org>
libposix: version filter script was adding a newline
/lib/arpa
/lib/pt_chown
/lib/sys
+!lib/version.c
+!lib/version.h.in
libtool
ltmain.sh
/m4
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([Makefile lib/Makefile tests/Makefile])
+AC_CONFIG_FILES([lib/version.h])
AM_INIT_AUTOMAKE([foreign])
LT_INIT
--- /dev/null
+/* A C macro and symbol for compile- and run-time libposix version checking.
+ Copyright (C) 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include "version.h"
+
+char const libposix_version_string[] = LIBPOSIX_VERSION;
--- /dev/null
+/* A C macro and symbol for compile- and run-time libposix version checking.
+ Copyright (C) 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef LIBPOSIX_VERSION
+#define LIBPOSIX_VERSION "@PACKAGE_VERSION@"
+extern char const libposix_version_string[];
+#endif
esac
}
-func_mkver()
-{
- {
- echo '/*'
- sed '1,/^$/d;s/^#/ */;/http:\/\/www\.gnu\.org/q' ${prognam}
- echo ' */'
-
- gv=`../build-aux/git-version-gen .tarball-version`
- sedcmd='/^2[01][0-9][0-9]-[0-1][0-9]-[0-3][0-9] /{
- s/ .*//
- s/-/./gp
- q
- }'
- dv=`sed -n "${sedcmd}" ${glibdir}/ChangeLog`
- cat <<-_EOF_
- #ifndef LIBPOSIX_GIT_VERSION
- #define LIBPOSIX_GIT_VERSION "$gv"
- #define LIBPOSIX_VERSION "$dv"
-
- extern char const libposix_git_version[];
- extern char const libposix_version[];
- #endif /* LIBPOSIX_GIT_VERSION */
- _EOF_
- } > lib/version.h
-
- {
- sed -n '1,/^ \*\/$/p' lib/version.h
-
- cat <<-_EOF_
- #include "version.h"
-
- char const libposix_git_version[] = LIBPOSIX_GIT_VERSION;
- char const libposix_version[] = LIBPOSIX_VERSION;
- _EOF_
-
- } > lib/version.c
-}
-
func_bootstrap()
{
/bin/sh ./bootstrap \
}
func_init ${1+"$@"}
-func_mkver
func_bootstrap
func_mkdistro