]> git.sur5r.net Git - openldap/commitdiff
Add mkversion script to generate version.c files. mkversion generates
authorKurt Zeilenga <kurt@openldap.org>
Wed, 28 Apr 1999 05:40:17 +0000 (05:40 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 28 Apr 1999 05:40:17 +0000 (05:40 +0000)
identification strings compatible with ident(1) and what(1).
Uses $(VERSION) generated from configure.in.  rm build/version
rm old version .c files

33 files changed:
build/top.mk
build/version [deleted file]
clients/fax500/Makefile.in
clients/fax500/Version.c [deleted file]
clients/fax500/Versionrp.c [deleted file]
clients/finger/Makefile.in
clients/finger/Version.c [deleted file]
clients/gopher/Makefile.in
clients/gopher/Version.c [deleted file]
clients/gopher/Versiongw.c [deleted file]
clients/mail500/Makefile.in
clients/mail500/Version.c [deleted file]
clients/rcpt500/Makefile.in
clients/rcpt500/Version.c [deleted file]
clients/tools/Makefile.in
clients/tools/Versionldd.c [deleted file]
clients/tools/Versionldm.c [deleted file]
clients/tools/Versionldr.c [deleted file]
clients/tools/Versionlds.c [deleted file]
clients/ud/Makefile.in
clients/ud/Version.c [deleted file]
configure.in
servers/ldapd/Makefile.in
servers/slapd/Makefile.in
servers/slapd/back-bdb2/Makefile.in
servers/slapd/back-ldbm/Makefile.in
servers/slapd/back-passwd/Makefile.in
servers/slapd/back-perl/Makefile.in
servers/slapd/back-shell/Makefile.in
servers/slapd/back-tcl/Makefile.in
servers/slapd/shell-backends/Makefile.in
servers/slapd/tools/Makefile.in
servers/slurpd/Makefile.in

index 3c40070f2cba73971cda74d96576ec21b031eb5d..d91aa6ab8dd6f4f09acb623f2b3de5296673e085 100644 (file)
@@ -44,6 +44,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
 LINT = lint
 5LINT = 5lint
 MKDEP = $(top_srcdir)/build/mkdep $(MKDEPFLAG) -d "$(srcdir)" -c "$(CC)"
+MKVERSION = $(top_srcdir)/build/mkversion -v "$(VERSION)"
 
 LIBTOOL = @LIBTOOL@
 LIBVERSION = 0:0:0
@@ -82,9 +83,6 @@ SENDMAIL = @SENDMAIL@
 MANCOMPRESS=$(CAT)
 MANCOMPRESSSUFFIX=
 
-# Version
-VERSIONFILE = $(top_srcdir)/build/version
-
 INCLUDEDIR= $(top_srcdir)/include
 LDAP_INCPATH= -I$(LDAP_INCDIR) -I$(INCLUDEDIR)
 LDAP_LIBADIR= $(top_builddir)/libraries
diff --git a/build/version b/build/version
deleted file mode 100644 (file)
index 4736714..0000000
+++ /dev/null
@@ -1 +0,0 @@
-2.0-devel
index a571ba1770b407c50a5aca0287788f80b1958c03..5dd41e34470005f969ac958adfc0e6a30f2806f3 100644 (file)
@@ -19,20 +19,12 @@ fax500 : fax5version.o
        $(LTLINK) -o $@ $(RPOBJS) fax5version.o $(LIBS)
 
 rpversion.c: ${RPOBJS} $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-           t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-           -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-           -e "s|%VERSION%|$${v}|" \
-           < $(srcdir)/Versionrp.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) rp500 > $@
 
 fax5version.c: ${FAX5OBJS} $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-           t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-           -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-           -e "s|%VERSION%|$${v}|" \
-           < $(srcdir)/Version.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) fax500 > $@
 
 xrpcomp.tmp: xrpcomp
        $(SED) -e 's%\%LIBEXECDIR\%%$(libexecdir)%' $(srcdir)/xrpcomp > xrpcomp.tmp
diff --git a/clients/fax500/Version.c b/clients/fax500/Version.c
deleted file mode 100644 (file)
index 8bc6c81..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 1993 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-char Version[] = "  fax500 v%VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
diff --git a/clients/fax500/Versionrp.c b/clients/fax500/Versionrp.c
deleted file mode 100644 (file)
index 75d8dd7..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 1993 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-char Version[] = "  rp500 v%VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
index 20a1e0334b7827ac8fb33f361c891b5ae63a0de4..a17ce4c89aa991f8ef31d47ad60ed5707b133547 100644 (file)
@@ -13,12 +13,8 @@ in.xfingerd : version.o
        $(LTLINK) -o $@ version.o $(OBJS) $(LIBS)
 
 version.c: ${OBJS} ${LDAP_LIBDEPEND}
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-           t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-           -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-           -e "s|%VERSION%|$${v}|" \
-           < $(srcdir)/Version.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) in.xfingerd > $@
 
 install-local: $(PROGRAMS) FORCE
        -$(MKDIR) $(libexecdir)
diff --git a/clients/finger/Version.c b/clients/finger/Version.c
deleted file mode 100644 (file)
index 90456ee..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 1991 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-char Version[] = "  in.xfingerd v%VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
index 588d958f207b417c867ae0ba7e09480c5841ddd6..47ee0ba161d21b4327b6433f43f0b92dcc1540e8 100644 (file)
@@ -21,20 +21,12 @@ go500gw : gwversion.o
        $(LTLINK) -o $@ $(GWOBJS) gwversion.o $(LIBS)
 
 goversion.c: ${GOOBJS} $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-           t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-           -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-           -e "s|%VERSION%|$${v}|" \
-           < $(srcdir)/Version.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) go500 > $@
 
 gwversion.c: ${GWOBJS} $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-           t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-           -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-           -e "s|%VERSION%|$${v}|" \
-           < $(srcdir)/Versiongw.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) go500gw > $@
 
 install-local: $(PROGRAMS) go500gw.help FORCE
        -$(MKDIR) $(libexecdir) $(datadir)
diff --git a/clients/gopher/Version.c b/clients/gopher/Version.c
deleted file mode 100644 (file)
index a973d7d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 1991 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-char Version[] = "  go500 v%VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
diff --git a/clients/gopher/Versiongw.c b/clients/gopher/Versiongw.c
deleted file mode 100644 (file)
index a3f8142..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 1991 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-char Version[] = "  go500gw 1.0 (%WHEN%)\n\t%WHOANDWHERE%\n";
index 0ee8742bfb32a348b032e36b067760c991916564..3f8f35a6be37a026383f0ed2e12a4fb09f352025 100644 (file)
@@ -14,12 +14,8 @@ mail500 : version.o
        $(LTLINK) -o $@ version.o $(OBJS) $(LIBS)
 
 version.c: ${OBJS} $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-           t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-           -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-           -e "s|%VERSION%|$${v}|" \
-           < $(srcdir)/Version.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) mail500 > $@
 
 install-local: $(PROGRAMS) FORCE
        -$(MKDIR) $(libexecdir)
diff --git a/clients/mail500/Version.c b/clients/mail500/Version.c
deleted file mode 100644 (file)
index 633c927..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 1991 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-char Version[] = "  mail500 v%VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
index d81d5327e3a94591125dfe681389dee6e2f833dc..f5f36a93d0e264ad7b8c1c3f87a6a5a5f56a3369 100644 (file)
@@ -14,12 +14,8 @@ rcpt500 : version.o
        $(LTLINK) -o $@ version.o $(OBJS) $(LIBS)
 
 version.c: ${OBJS} $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-           t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-           -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-           -e "s|%VERSION%|$${v}|" \
-           < $(srcdir)/Version.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) rcpt500 > $@
 
 install-local: $(PROGRAMS) rcpt500.help FORCE
        -$(MKDIR) $(libexecdir) $(datadir)
diff --git a/clients/rcpt500/Version.c b/clients/rcpt500/Version.c
deleted file mode 100644 (file)
index 62c9a6c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 1992 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-char Version[] = "  rcpt500 v%VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
index f70d89930861db5ac39c4de08a781afeee5c94e0..f41c17620e173ca23ebdad904a5e8e2e4bbe7f28 100644 (file)
@@ -26,44 +26,32 @@ ldapdelete: lddversion.o
 ldapmodrdn:    ldrversion.o
        $(LTLINK) -o $@ ldapmodrdn.o ldrversion.o $(LIBS)
 
-ldappasswd:    ldappasswd.o
-       $(LTLINK) -o $@ ldappasswd.o $(LIBS)
+ldappasswd:    ldpversion.o
+       $(LTLINK) -o $@ ldappasswd.o ldpversion.o $(LIBS)
 
 ldapadd:       ldapmodify
-       $(RM) $@
+       @-$(RM) $@
        $(LN_H) ldapmodify ldapadd
 
 ldsversion.c: ldapsearch.o $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-       t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-       -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-       -e "s|%VERSION%|$${v}|" \
-       < $(srcdir)/Versionlds.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) ldapsearch > $@
 
 ldmversion.c: ldapmodify.o $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-       t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-       -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-       -e "s|%VERSION%|$${v}|" \
-       < $(srcdir)/Versionldm.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) ldapmodify > $@
 
 lddversion.c: ldapdelete.o $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-       t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-       -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-       -e "s|%VERSION%|$${v}|" \
-       < $(srcdir)/Versionldd.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) ldapdelete > $@
+
+ldpversion.c: ldappasswd.o $(LDAP_LIBDEPEND)
+       @-$(RM) $@
+       $(MKVERSION) ldappasswd > $@
 
 ldrversion.c: ldapmodrdn.o $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-       t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-       -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-       -e "s|%VERSION%|$${v}|" \
-       < $(srcdir)/Versionldr.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) ldapmodrdn > $@
 
 install-local: FORCE
        -$(MKDIR) $(bindir)
diff --git a/clients/tools/Versionldd.c b/clients/tools/Versionldd.c
deleted file mode 100644 (file)
index dab7a09..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 1994 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-char Version[] = "  ldapdelete v%VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
diff --git a/clients/tools/Versionldm.c b/clients/tools/Versionldm.c
deleted file mode 100644 (file)
index aaec274..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 1994 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-char Version[] = "  ldapmodify v%VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
diff --git a/clients/tools/Versionldr.c b/clients/tools/Versionldr.c
deleted file mode 100644 (file)
index 95730d4..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 1994 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-char Version[] = "  ldapmodrdn v%VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
diff --git a/clients/tools/Versionlds.c b/clients/tools/Versionlds.c
deleted file mode 100644 (file)
index fd68714..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 1994 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-char Version[] = "  ldapsearch v%VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
index a6b94a0ae4005537fc445823b6599f01c3aa22e6..be1dd4aa22c4bd31e363a0d1bd8ba0663f39b186 100644 (file)
@@ -16,12 +16,8 @@ ud : version.o
        $(LTLINK) -o $@ version.o $(OBJS) $(LIBS)
 
 version.c: ${OBJS} $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-           t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-           -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-           -e "s|%VERSION%|$${v}|" \
-           < $(srcdir)/Version.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) ud > $@
 
 install-local: FORCE
        -$(MKDIR) $(bindir)
diff --git a/clients/ud/Version.c b/clients/ud/Version.c
deleted file mode 100644 (file)
index ddcc5db..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 1991, 1992 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-char Version[] = "LDAP UserDirectory %VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
index 956cec6f8cafae1f28494ba3e4cfa46f5fd250dd..3e59d8ad011c78db8e6eb0458b6f1796ed639ded 100644 (file)
@@ -14,7 +14,9 @@ define([AC_CACHE_SAVE], )dnl
 dnl Configure.in for OpenLDAP
 AC_INIT(include/ldap.h)dnl
 AC_CONFIG_AUX_DIR(build)dnl
-AM_INIT_AUTOMAKE(OpenLDAP,[2.0-devel], [no ac_define])dnl
+AM_INIT_AUTOMAKE(OpenLDAP,[2.0-devel])dnl
+AC_SUBST(PACKAGE)
+AC_SUBST(VERSION)
 
 dnl We use autoconf features new to 2.13.
 dnl    aclocal.m4 should be built using aclocal from automake 1.4
index 628df686056f0ca9a9aee32635ade476d930ab01..1db9b2aad0614d62bba14e7fb6140c2c65859a94 100644 (file)
@@ -33,11 +33,7 @@ sldapd:      version.o
 
 version.c: $(OBJS) $(LDAP_LIBLBER_DEPEND)
        $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-        t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-       -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-       -e "s|%VERSION%|$${v}|" \
-       < $(srcdir)/Version.c > $@)
+       $(MKVERSION) ldapd > $@
 
 request.o:     LDAP-types.h
 
index 2a9a0fbe17b5267da3fc6a0a57d451200714454d..a136598e1aa9be27b939629269abbfe4e6d7fa61 100644 (file)
@@ -79,13 +79,9 @@ libbackends.a: .backend
        @ls -l libbackends.a
 
 version.c: libbackends.a $(OBJS) $(SLAPD_LIBDEPEND) 
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-       t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-       -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-       -e "s|%VERSION%|$${v}|" \
-       < $(srcdir)/Version.c > $@)
-
+       @-$(RM) $@
+       $(MKVERSION) slapd > $@
+       
 depend-local-srv: FORCE
        @for i in back-* shell-backends tools; do \
                if [ -d $$i ]; then \
index 28b47b0bd52b7c5110b22d7fba81e224f4d09c0a..e11f276a4549d96caf3c981b47d630c881527f0f 100644 (file)
@@ -29,10 +29,5 @@ libback-bdb2.a:      version.o
        @touch ../.backend
 
 version.c:     $(OBJS) $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` \
-        h=`$(HOSTNAME)` t=`$(DATE)`; \
-        $(SED) -e "s|%WHEN%|$${t}|" \
-               -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-               -e "s|%VERSION%|$${v}|" \
-               < $(srcdir)/Version.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) back-bdb2 > $@
index 2aa1e6a8e038af15bd251630d1a7b08159f0accc..ef2aa3c07d13ab193ddbde55dc3a4b4700b7cdf0 100644 (file)
@@ -27,10 +27,5 @@ libback-ldbm.a:      version.o
        @touch ../.backend
 
 version.c:     $(OBJS) $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` \
-        h=`$(HOSTNAME)` t=`$(DATE)`; \
-        $(SED) -e "s|%WHEN%|$${t}|" \
-               -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-               -e "s|%VERSION%|$${v}|" \
-               < $(srcdir)/Version.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) back-ldbm > $@
index 11e66e089def4026afcba50ea85b2e058a5ddce4..2b796e59233fed2b8ebfb8d1712e62c97007ad90 100644 (file)
@@ -21,10 +21,6 @@ libback-passwd.a:    version.o
        @touch ../.backend
 
 version.c: $(OBJS) $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-        t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-       -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-       -e "s|%VERSION%|$${v}|" \
-       < $(srcdir)/Version.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) back-passwd > $@
 
index 71979534d9473ae253c8762102f3f6b3fc21e334..36618cdd476f3e86d5b1c3f69e4cc9b409d6115f 100644 (file)
@@ -35,10 +35,5 @@ libback-perl.a:      version.o
        @touch ../.backend
 
 version.c: $(OBJS) $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-       t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-       -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-       -e "s|%VERSION%|$${v}|" \
-       < $(srcdir)/Version.c > $@)
-
+       @-$(RM) $@
+       $(MKVERSION) back-perl > $@
index d17e442cb49d0311fe99db2de8f04efc90853079..525c17d01a07bca16aa10e24e97a3f1d0d90cdd2 100644 (file)
@@ -23,10 +23,6 @@ libback-shell.a:     version.o
        @touch ../.backend
 
 version.c: $(OBJS) $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-       t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-       -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-       -e "s|%VERSION%|$${v}|" \
-       < $(srcdir)/Version.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) back-shell > $@
 
index a26ca1210d132e42306567b99496c38fe76e72ed..79bf98bf93f55e4c8cbb427a48e68a692576b6e4 100644 (file)
@@ -36,10 +36,6 @@ libback-tcl.a:       version.o
        @touch ../.backend
 
 version.c: $(OBJS) $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-       t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-       -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-       -e "s|%VERSION%|$${v}|" \
-       < $(srcdir)/Version.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) back-tcl > $@
 
index 75064b34044a0347e74fc43239a59a767b952562..7865e3700ecc8487abe3a8273b7b4c94e108c045 100644 (file)
@@ -16,9 +16,5 @@ passwd-shell: pwd-version.o
        $(CC) $(LDFLAGS) -o $@ $(OBJS) pwd-version.o $(LIBS)
 
 pwd-version.c: $(OBJS) $(LDAP_LIBDEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-       t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-       -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-       -e "s|%VERSION%|$${v}|" \
-       < $(srcdir)/pwd-Version.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) passwd-shell > $@
index 52d38fb380f1151d55f20675e46260b289836bc4..b04b875837fb295f6e8fa85feb50fba0b0344c61 100644 (file)
@@ -80,12 +80,8 @@ edb2ldif:    edb2-vers.o
        $(CC) $(LDFLAGS) -o $@ $(EDB2LDIFOBJS) edb2-vers.o $(LIBS)
 
 edb2-vers.c: $(EDB2LDIFOBJS)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-       t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-       -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-       -e "s|%VERSION%|$${v}|" \
-       < Vers-edb2.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) ebd2ldif > $@
 
 build-chlog2replog: FORCE
        @if [ "$(HAVE_ISODE)" = "yes" ]; then \
index 9ca6c0044f9886b47e87528b0657a59a2b60c621..70690cdfb4afb7aed159ba920aba402da3807b00 100644 (file)
@@ -34,12 +34,8 @@ sslurpd:     version.o
        $(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS)
 
 version.c: $(OBJS) $(LDAP_LIBDEPEND) $(LDAP_LIBTHREAD_DEPEND)
-       $(RM) $@
-       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
-       t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-       -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-       -e "s|%VERSION%|$${v}|" \
-       < $(srcdir)/Version.c > $@)
+       @-$(RM) $@
+       $(MKVERSION) slurpd > $@
 
 install-local-srv: FORCE
        @-$(MKDIR) $(libexecdir)