Commit ac5ecaf8 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Centralize versioning in build/version.sh

parent 45cf7e1d
...@@ -37,11 +37,13 @@ if test ! -d $RELNAME ; then ...@@ -37,11 +37,13 @@ if test ! -d $RELNAME ; then
exit 1 exit 1
fi fi
if test ! -e $RELNAME/build/version ; then if test ! -e $RELNAME/build/version.sh ; then
echo "No build version" echo "No build version"
exit 1 exit 1
fi fi
$RELNAME/build/version.sh
tar cf $RELNAME.tar $RELNAME tar cf $RELNAME.tar $RELNAME
gzip -9 -c $RELNAME.tar > $RELNAME.tgz gzip -9 -c $RELNAME.tar > $RELNAME.tgz
md5 $RELNAME.tgz > $RELNAME.md5 md5 $RELNAME.tgz > $RELNAME.md5
......
...@@ -54,7 +54,7 @@ MKDEP_CFLAGS = @OL_MKDEP_FLAGS@ ...@@ -54,7 +54,7 @@ MKDEP_CFLAGS = @OL_MKDEP_FLAGS@
MKVERSION = $(top_srcdir)/build/mkversion -v "$(VERSION)" MKVERSION = $(top_srcdir)/build/mkversion -v "$(VERSION)"
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LIBVERSION = 0:0:0 LIBVERSION = @OPENLDAP_LIBVERSION@
LTVERSION = -version-info $(LIBVERSION) LTVERSION = -version-info $(LIBVERSION)
LTLINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) LTLINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS)
LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL) LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
......
...@@ -8,7 +8,7 @@ ol_package=OpenLDAP ...@@ -8,7 +8,7 @@ ol_package=OpenLDAP
ol_major=2 ol_major=2
ol_minor=X ol_minor=X
ol_patch=X ol_patch=X
ol_api_inc=200000 ol_api_inc=000000
ol_api_lib=0:0:0 ol_api_lib=0:0:0
if test $ol_patch != X ; then if test $ol_patch != X ; then
......
This diff is collapsed.
...@@ -55,12 +55,20 @@ dnl Determine host platform ...@@ -55,12 +55,20 @@ dnl Determine host platform
dnl we try not to use this for much dnl we try not to use this for much
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(OpenLDAP,[$OL_VERSION], [no defines])dnl AM_INIT_AUTOMAKE([$OL_PACKAGE],[$OL_VERSION], [no defines])dnl
AC_SUBST(PACKAGE) AC_SUBST(PACKAGE)
AC_SUBST(VERSION) AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(OPENLDAP_PACKAGE,"$PACKAGE",Package) AC_DEFINE_UNQUOTED(OPENLDAP_PACKAGE,"$PACKAGE",Package)
AC_DEFINE_UNQUOTED(OPENLDAP_VERSION,"$VERSION",Version) AC_DEFINE_UNQUOTED(OPENLDAP_VERSION,"$VERSION",Version)
AC_DEFINE_UNQUOTED(LDAP_VENDOR_VERSION,$OL_API_INC,Version)
AC_DEFINE_UNQUOTED(LDAP_VENDOR_VERSION_MAJOR,$OL_MAJOR,Major)
AC_DEFINE_UNQUOTED(LDAP_VENDOR_VERSION_MINOR,$OL_MINOR,Minor)
AC_DEFINE_UNQUOTED(LDAP_VENDOR_VERSION_PATCH,$OL_PATCH,Patch)
OPENLDAP_LIBVERSION=$OL_API_LIB
AC_SUBST(OPENLDAP_LIBVERSION)
dnl We use autoconf features new to 2.13. dnl We use autoconf features new to 2.13.
dnl aclocal.m4 should be built using aclocal from automake 1.4 dnl aclocal.m4 should be built using aclocal from automake 1.4
dnl libtool 1.3.3 should be installed. dnl libtool 1.3.3 should be installed.
......
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
/* pull in lber */ /* pull in lber */
#include <lber.h> #include <lber.h>
/* include version and API feature defines */
#include <ldap_features.h>
LDAP_BEGIN_DECL LDAP_BEGIN_DECL
#define LDAP_VERSION1 1 #define LDAP_VERSION1 1
...@@ -44,14 +47,10 @@ LDAP_BEGIN_DECL ...@@ -44,14 +47,10 @@ LDAP_BEGIN_DECL
#define LDAP_API_VERSION 2004 #define LDAP_API_VERSION 2004
#define LDAP_VENDOR_NAME "OpenLDAP" #define LDAP_VENDOR_NAME "OpenLDAP"
/* We'll eventually release as 20000 */ /* We'll eventually release as 20000 */
#define LDAP_VENDOR_VERSION 19910
/* OpenLDAP API Features */ /* OpenLDAP API Features */
#define LDAP_API_FEATURE_X_OPENLDAP LDAP_VENDOR_VERSION #define LDAP_API_FEATURE_X_OPENLDAP LDAP_VENDOR_VERSION
/* include LDAP_API_FEATURE defines */
#include <ldap_features.h>
#if defined( LDAP_API_FEATURE_X_OPENLDAP_REENTRANT ) || \ #if defined( LDAP_API_FEATURE_X_OPENLDAP_REENTRANT ) || \
( defined( LDAP_THREAD_SAFE ) && \ ( defined( LDAP_THREAD_SAFE ) && \
defined( LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE ) ) defined( LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE ) )
......
...@@ -14,6 +14,12 @@ ...@@ -14,6 +14,12 @@
#ifndef _LDAP_FEATURES_H #ifndef _LDAP_FEATURES_H
#define _LDAP_FEATURES_H 1 #define _LDAP_FEATURES_H 1
/* OpenLDAP API version macros */
#undef LDAP_VENDOR_VERSION
#undef LDAP_VENDOR_VERSION_MAJOR
#undef LDAP_VENDOR_VERSION_MINOR
#undef LDAP_VENDOR_VERSION_PATCH
/* /*
** OpenLDAP reentrancy/thread-safeness should be dynamically ** OpenLDAP reentrancy/thread-safeness should be dynamically
** checked using ldap_get_option(). ** checked using ldap_get_option().
......
...@@ -594,6 +594,18 @@ ...@@ -594,6 +594,18 @@
/* Version */ /* Version */
#undef OPENLDAP_VERSION #undef OPENLDAP_VERSION
/* Version */
#undef LDAP_VENDOR_VERSION
/* Major */
#undef LDAP_VENDOR_VERSION_MAJOR
/* Minor */
#undef LDAP_VENDOR_VERSION_MINOR
/* Patch */
#undef LDAP_VENDOR_VERSION_PATCH
/* define this if you have mkversion */ /* define this if you have mkversion */
#undef HAVE_MKVERSION #undef HAVE_MKVERSION
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment