mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-03 20:40:05 -05:00
Use version strings provided by build system for -V
This commit is contained in:
parent
6d1ca4c747
commit
c41a87c587
3 changed files with 11 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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[];
|
||||
|
|
|
|||
Loading…
Reference in a new issue