From c41a87c587da5e755c52f90743a71405beaa7d48 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 20 Jan 2003 20:48:06 +0000 Subject: [PATCH] Use version strings provided by build system for -V --- clients/tools/Makefile.in | 16 +++++++++------- clients/tools/common.c | 5 +---- clients/tools/common.h | 1 + 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/clients/tools/Makefile.in b/clients/tools/Makefile.in index 0d742ed3fe..83c83d12fd 100644 --- a/clients/tools/Makefile.in +++ b/clients/tools/Makefile.in @@ -10,6 +10,8 @@ OBJS = ldapsearch.o ldapmodify.o ldapdelete.o ldapmodrdn.o \ LDAP_INCDIR= ../../include LDAP_LIBDIR= ../../libraries +MKVOPTS = -s + XLIBS = $(LDAP_LIBLDIF_A) $(LDAP_L) XXLIBS = $(SECURITY_LIBS) $(LDIF_LIBS) $(LUTIL_LIBS) @@ -48,31 +50,31 @@ ldapadd: ldapmodify ldsversion.c: ldapsearch.o common.o $(XLIBS) @-$(RM) $@ - $(MKVERSION) ldapsearch > $@ + $(MKVERSION) $(MKVOPTS) ldapsearch > $@ ldmversion.c: ldapmodify.o common.o $(XLIBS) @-$(RM) $@ - $(MKVERSION) ldapmodify > $@ + $(MKVERSION) $(MKVOPTS) ldapmodify > $@ lddversion.c: ldapdelete.o common.o $(XLIBS) @-$(RM) $@ - $(MKVERSION) ldapdelete > $@ + $(MKVERSION) $(MKVOPTS) ldapdelete > $@ ldpversion.c: ldappasswd.o common.o $(XLIBS) @-$(RM) $@ - $(MKVERSION) ldappasswd > $@ + $(MKVERSION) $(MKVOPTS) ldappasswd > $@ ldrversion.c: ldapmodrdn.o common.o $(XLIBS) @-$(RM) $@ - $(MKVERSION) ldapmodrdn > $@ + $(MKVERSION) $(MKVOPTS) ldapmodrdn > $@ ldwversion.c: ldapwhoami.o common.o $(XLIBS) @-$(RM) $@ - $(MKVERSION) ldapwhoami > $@ + $(MKVERSION) $(MKVOPTS) ldapwhoami > $@ ldcversion.c: ldapcompare.o common.o $(XLIBS) @-$(RM) $@ - $(MKVERSION) ldapcompare > $@ + $(MKVERSION) $(MKVOPTS) ldapcompare > $@ install-local: FORCE diff --git a/clients/tools/common.c b/clients/tools/common.c index 5b5278f944..b477850942 100644 --- a/clients/tools/common.c +++ b/clients/tools/common.c @@ -55,8 +55,6 @@ int version = 0; /* Set in main() */ char *prog = NULL; -char *version_string = NULL; - void tool_common_usage( void ) @@ -458,8 +456,7 @@ tool_args( int argc, char **argv ) } if (version) { - fprintf( stderr, "%s: %s\n", prog, - version_string ? version_string : "version unknown" ); + fprintf( stderr, "%s: %s", prog, __Version ); if (version > 1) exit( EXIT_SUCCESS ); } diff --git a/clients/tools/common.h b/clients/tools/common.h index f8cb32e89c..2791dbe2fb 100644 --- a/clients/tools/common.h +++ b/clients/tools/common.h @@ -44,6 +44,7 @@ extern int version; /* Defined in common.c, set in main() */ extern char *prog; +extern const char __Version[]; /* Defined in main program */ extern const char options[]; -- 2.39.5