Fix the LDAP build, which was broken by the build reordering in
authorGreg Hudson <ghudson@mit.edu>
Fri, 7 Aug 2009 19:17:57 +0000 (19:17 +0000)
committerGreg Hudson <ghudson@mit.edu>
Fri, 7 Aug 2009 19:17:57 +0000 (19:17 +0000)
r22406.  Build kdb5_util's getdate from the kadmin/cli getdate
source, instead of borrowing the object file from the kadmin/cli
build directory.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22501 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin/cli/getdate.y
src/plugins/kdb/ldap/ldap_util/Makefile.in

index e427195befb725c03d7f39444bce532f7e44d3a5..6ea75eb08d41f98220204d2971ed55f29741f20d 100644 (file)
@@ -883,7 +883,8 @@ difftm(a, b)
 
 /* For get_date extern declaration compatibility check... yuck.  */
 #include <krb5.h>
-#include "kadmin.h"
+
+time_t get_date(char *);
 
 time_t
 get_date(p)
index b53d4ea95fd441a69f5b9fc4c8987e8a9b27ecd4..7c6317af1c4613b52b9f4233358066af8f09f62a 100644 (file)
@@ -11,16 +11,21 @@ PROG_RPATH=$(KRB5_LIBDIR)
 KDB_DEP_LIB=$(DL_LIB) -lkdb_ldap $(THREAD_LINKOPTS)
 
 PROG = kdb5_ldap_util
-OBJS = kdb5_ldap_util.o kdb5_ldap_list.o kdb5_ldap_realm.o kdb5_ldap_policy.o kdb5_ldap_services.o
+OBJS = kdb5_ldap_util.o kdb5_ldap_list.o kdb5_ldap_realm.o kdb5_ldap_policy.o kdb5_ldap_services.o getdate.o
 
-GETDATE = ../../../../kadmin/cli/getdate.o
+GETDATE = $(srcdir)/../../../../kadmin/cli/getdate.y
 
 all:: $(PROG)
 
 $(PROG): $(OBJS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIB) $(GETDATE)
-       $(CC_LINK) -o $(PROG) $(OBJS) $(GETDATE) \
+       $(CC_LINK) -o $(PROG) $(OBJS) \
                $(KADMSRV_LIBS) $(KDB_DEP_LIB) $(KRB5_BASE_LIBS)
 
+getdate.c: $(GETDATE)
+       $(RM) getdate.c y.tab.c
+       $(YACC) $(GETDATE)
+       $(MV) y.tab.c getdate.c
+
 install::
        $(INSTALL_PROGRAM) $(PROG) ${DESTDIR}$(ADMIN_BINDIR)/$(PROG)
        $(INSTALL_DATA) $(srcdir)/$(PROG).M ${DESTDIR}$(ADMIN_MANDIR)/$(PROG).8