-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 > $@)
-
-install-local: FORCE
- @-$(MKDIR) -p $(libexecdir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 slurpd $(libexecdir)
+version.c: Makefile
+ @-$(RM) $@
+ $(MKVERSION) -s -n Versionstr slurpd > $@
+
+version.o: version.c $(OBJS) $(SLURPD_L)
+
+install-local-srv: FORCE
+ -$(MKDIR) $(DESTDIR)$(libexecdir)
+ @-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/openldap-slurp
+ @( \
+ for prg in $(PROGRAMS); do \
+ $(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 $$prg$(EXEEXT) \
+ $(DESTDIR)$(libexecdir); \
+ done \
+ )
+