From: Kurt Zeilenga Date: Sun, 20 Sep 1998 18:54:36 +0000 (+0000) Subject: Added basic VPATH support. VPATH Make depend still needs work. X-Git-Tag: PHP3_TOOL_0_0~18^2~92 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=32a688f0dffe39b9ebbd5e691d37092051f3fd35;p=openldap Added basic VPATH support. VPATH Make depend still needs work. --- diff --git a/build/lib.mk b/build/lib.mk index 8ae91785ad..4526fcf552 100644 --- a/build/lib.mk +++ b/build/lib.mk @@ -11,13 +11,13 @@ $(LIBRARY): version.o $(RM) ../$@; \ (d=`$(PWD)` ; $(LN_S) `$(BASENAME) $$d`/$@ ../$@) -version.c: $(OBJS) +version.c: $(OBJS) $(srcdir)/Version.c $(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}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) install-common: all-common install-local diff --git a/build/top.mk b/build/top.mk index 819a7b70be..f1b1763de4 100644 --- a/build/top.mk +++ b/build/top.mk @@ -59,11 +59,10 @@ SENDMAIL = @SENDMAIL@ # Version VERSIONFILE = $(top_srcdir)/build/version -INCLUDEDIR = -I$(top_srcdir)/include $(XINCLUDEDIR) +INCLUDEDIR = -I$(top_srcdir)/include -LDAP_LIBDIR = $(top_srcdir)/libraries LDAP_LIBS = -lldif -lldap -llber -LDAP_LIBDEPEND = $(LDAP_LIBDIR)/libldap.a +LDAP_LIBDEPEND = $(VLIBDIR)/libldif.a $(VLIBDIR)/libldap.a $(VLIBDIR)/liblber.a # AutoConfig generated AC_CC = @CC@ @@ -76,8 +75,8 @@ LIBTERMCAP = @LIBTERMCAP@ # Our Defaults CC = $(AC_CC) -DEFS = $(AC_DEFS) $(INCLUDEDIR) $(LDAP_DEFS) $(XDEFS) -LIBS = -L$(LDAP_LIBDIR) $(LDAP_LIBS) $(XLIBS) $(AC_LIBS) +DEFS = $(LDAP_DEFS) $(VINCLUDEDIR) $(INCLUDEDIR) $(XDEFS) $(AC_DEFS) +LIBS = $(VLIBS) $(LDAP_LIBS) $(XLIBS) $(AC_LIBS) CFLAGS = $(AC_CFLAGS) $(DEFS) $(DEFINES) LDFLAGS = $(AC_LDFLAGS) diff --git a/clients/fax500/Makefile.in b/clients/fax500/Makefile.in index 08d85bee73..85da96cde5 100644 --- a/clients/fax500/Makefile.in +++ b/clients/fax500/Makefile.in @@ -3,6 +3,9 @@ XSRCS=fax5version.c rpversion.c FAX5OBJS = main.o faxtotpc.o RPOBJS = rp500.o faxtotpc.o PROGRAMS= rp500 fax500 +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) rp500 : rpversion.o @@ -17,7 +20,7 @@ rpversion.c: ${RPOBJS} $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Versionrp.c > $@) + < $(srcdir)/Versionrp.c > $@) fax5version.c: ${FAX5OBJS} $(LDAP_LIBDEPEND) $(RM) $@ @@ -25,7 +28,7 @@ fax5version.c: ${FAX5OBJS} $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) install: $(PROGRAMS) xrpcomp FORCE -$(MKDIR) -p $(libexecdir) diff --git a/clients/finger/Makefile.in b/clients/finger/Makefile.in index 628fe2afcb..10f2c34e99 100644 --- a/clients/finger/Makefile.in +++ b/clients/finger/Makefile.in @@ -2,17 +2,20 @@ SRCS= main.c XSRCS= version.c OBJS= main.o PROGRAMS= in.xfingerd +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) in.xfingerd : version.o $(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS) -version.c: ${OBJS} $(LDAP_LIBDEPEND) +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}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) install: $(PROGRAMS) FORCE -$(MKDIR) -p $(libexecdir) diff --git a/clients/gopher/Makefile.in b/clients/gopher/Makefile.in index 45ac3eb36f..728229170c 100644 --- a/clients/gopher/Makefile.in +++ b/clients/gopher/Makefile.in @@ -8,6 +8,10 @@ XSRCS= gwversion.o goversion.o GOOBJS = go500.o detach.o setproctitle.o GWOBJS = go500gw.o detach.o setproctitle.o +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) + go500 : goversion.o $(CC) $(LDFLAGS) -o $@ $(GOOBJS) goversion.o $(LIBS) @@ -20,7 +24,7 @@ goversion.c: ${GOOBJS} $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) gwversion.c: ${GWOBJS} $(LDAP_LIBDEPEND) $(RM) $@ @@ -28,7 +32,7 @@ gwversion.c: ${GWOBJS} $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Versiongw.c > $@) + < $(srcdir)/Versiongw.c > $@) install: $(PROGRAMS) go500gw.help FORCE -$(MKDIR) -p $(libexecdir) $(sysconfdir) diff --git a/clients/mail500/Makefile.in b/clients/mail500/Makefile.in index f96f5731d6..ae040c10ef 100644 --- a/clients/mail500/Makefile.in +++ b/clients/mail500/Makefile.in @@ -4,6 +4,10 @@ SRCS= main.c XSRCS= version.c OBJS= main.o +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) + mail500 : version.o $(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS) @@ -13,7 +17,7 @@ version.c: ${OBJS} $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) install: $(PROGRAMS) FORCE -$(MKDIR) -p $(libexecdir) diff --git a/clients/rcpt500/Makefile.in b/clients/rcpt500/Makefile.in index 4582b24aec..76c2e088d8 100644 --- a/clients/rcpt500/Makefile.in +++ b/clients/rcpt500/Makefile.in @@ -4,6 +4,10 @@ XSRCS= version.c OBJS= main.o cmds.o help.o query.o HDRS= rcpt500.h +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) + rcpt500 : version.o $(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS) @@ -13,7 +17,7 @@ version.c: ${OBJS} $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) install: $(PROGRAMS) rcpt500.help FORCE -$(MKDIR) -p $(libexecdir) $(sysconfdir) diff --git a/clients/tools/Makefile.in b/clients/tools/Makefile.in index a65ae1df05..e95894e29e 100644 --- a/clients/tools/Makefile.in +++ b/clients/tools/Makefile.in @@ -5,6 +5,10 @@ SRCS = ldapsearch.c ldapmodify.c ldapdelete.c ldapmodrdn.c OBJS = ldapsearch.o ldapmodify.o ldapdelete.o ldapmodrdn.o XLIBS = -llber -lldap +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) + XSRCS = ldsversion.c ldmversion.c lddversion.c ldrversion.c PROGRAMS = ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd @@ -31,7 +35,7 @@ ldsversion.c: ldapsearch.o $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Versionlds.c > $@) + < $(srcdir)/Versionlds.c > $@) ldmversion.c: ldapmodify.o $(LDAP_LIBDEPEND) $(RM) $@ @@ -39,7 +43,7 @@ ldmversion.c: ldapmodify.o $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Versionldm.c > $@) + < $(srcdir)/Versionldm.c > $@) lddversion.c: ldapdelete.o $(LDAP_LIBDEPEND) $(RM) $@ @@ -47,7 +51,7 @@ lddversion.c: ldapdelete.o $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Versionldd.c > $@) + < $(srcdir)/Versionldd.c > $@) ldrversion.c: ldapmodrdn.o $(LDAP_LIBDEPEND) $(RM) $@ @@ -55,7 +59,7 @@ ldrversion.c: ldapmodrdn.o $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Versionldr.c > $@) + < $(srcdir)/Versionldr.c > $@) installlocal: ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd FORCE -$(MKDIR) -p $(bindir) diff --git a/clients/ud/Makefile.in b/clients/ud/Makefile.in index faf2ab6c6e..e62e301e0a 100644 --- a/clients/ud/Makefile.in +++ b/clients/ud/Makefile.in @@ -6,6 +6,10 @@ OBJS= main.o find.o mod.o print.o auth.o util.o help.o \ HDRS= ud.h PROGRAMS= ud +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) + XLIBS = $(LIBTERMCAP) ud : version.o @@ -17,7 +21,7 @@ version.c: ${OBJS} $(LDAP_LIBDEPEND) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) install: $(PROGRAMS) FORCE -$(MKDIR) -p $(bindir) diff --git a/include/Makefile.in b/include/Makefile.in index e9c029af63..a36d6c3bdd 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -18,10 +18,11 @@ clean-local: FORCE $(RM) ldapconfig.h veryclean-local: clean-local FORCE + $(RM) portable.h depend-local: ldapconfig.h FORCE -ldapconfig.h: ldapconfig.h.edit Makefile +ldapconfig.h: $(srcdir)/ldapconfig.h.edit Makefile @$(RM) $@ @echo "Making ldapconfig.h" @echo "/*" > $@; \ @@ -39,7 +40,7 @@ ldapconfig.h: ldapconfig.h.edit Makefile -e 's;%EDITOR%;$(EDITOR);' \ -e 's;%FINGER%;$(FINGER);' \ -e 's;%SENDMAIL%;$(SENDMAIL);' \ - ldapconfig.h.edit >> $@; \ + $(srcdir)/ldapconfig.h.edit >> $@; \ $(CHMOD) 444 $@ all-common: all-local diff --git a/libraries/libldap/Makefile.in b/libraries/libldap/Makefile.in index fce02b633d..e4a5f35444 100644 --- a/libraries/libldap/Makefile.in +++ b/libraries/libldap/Makefile.in @@ -3,6 +3,9 @@ ## LIBRARY = libldap.a PROGRAMS = ltest ttest +VINCLUDEDIR = -I../../include +VLIBDIR= ../../libraries +VLIBS= -L(VLIBDIR) SRCS = bind.c open.c result.c error.c compare.c search.c \ modify.c add.c modrdn.c delete.c abandon.c ufn.c cache.c \ diff --git a/servers/ldapd/Makefile.in b/servers/ldapd/Makefile.in index 8a7d913485..b8c2f7d37b 100644 --- a/servers/ldapd/Makefile.in +++ b/servers/ldapd/Makefile.in @@ -11,6 +11,10 @@ OBJS = main.o detach.o setproctitle.o request.o bind.o result.o error.o \ abandon.o syntax.o association.o kerberos.o LDAP_tables.o \ certificate.o +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) + BUILD_OPT = "--enable-ldapd" BUILD_SRV = @BUILD_LDAPD@ @@ -31,7 +35,7 @@ version.c: $(OBJS) $(LDIR)/liblber/liblber.a t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) request.o: LDAP-types.h diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index b915eb6fba..6055a1ca69 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -18,6 +18,10 @@ OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \ detach.o strdup.o tempnam.o repl.o lock.o \ schema.o schemaparse.o monitor.o configinfo.o +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) + BUILD_OPT = "--enable-slapd" BUILD_SRV = @BUILD_SLAPD@ @@ -77,7 +81,7 @@ version.c: libbackends.a $(OBJS) \ t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) clean-local: FORCE @for i in back-* tools; do \ diff --git a/servers/slapd/back-ldbm/Makefile.in b/servers/slapd/back-ldbm/Makefile.in index 51414776df..825bb02540 100644 --- a/servers/slapd/back-ldbm/Makefile.in +++ b/servers/slapd/back-ldbm/Makefile.in @@ -7,6 +7,8 @@ OBJS = idl.o add.o search.o cache.o dbcache.o dn2id.o id2entry.o \ modify.o modrdn.o delete.o init.o config.o bind.o attr.o \ filterindex.o unbind.o kerberos.o close.o +VINCLUDEDIR= -I../../../include -I$(srcdir)/.. + BUILD_OPT = "--enable-ldbm" BUILD_SRV = @BUILD_LDBM@ @@ -30,5 +32,5 @@ version.c: $(OBJS) $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) diff --git a/servers/slapd/back-passwd/Makefile.in b/servers/slapd/back-passwd/Makefile.in index 012780d32f..183ede5186 100644 --- a/servers/slapd/back-passwd/Makefile.in +++ b/servers/slapd/back-passwd/Makefile.in @@ -1,6 +1,8 @@ SRCS = search.c config.c OBJS = search.o config.o +VINCLUDEDIR= -I../../../include + BUILD_OPT = "--enable-passwd" BUILD_SRV = @BUILD_PASSWD@ @@ -22,4 +24,4 @@ version.c: $(OBJS) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) diff --git a/servers/slapd/back-shell/Makefile.in b/servers/slapd/back-shell/Makefile.in index 87b3892e87..b63e7143a3 100644 --- a/servers/slapd/back-shell/Makefile.in +++ b/servers/slapd/back-shell/Makefile.in @@ -3,6 +3,8 @@ SRCS = init.c config.c fork.c search.c bind.c unbind.c add.c delete.c \ OBJS = init.o config.o fork.o search.o bind.o unbind.o add.o delete.o \ modify.o modrdn.o compare.o abandon.o result.o +VINCLUDEDIR= -I../../../include + BUILD_OPT = "--enable-shell" BUILD_SRV = @BUILD_SHELL@ @@ -24,4 +26,4 @@ version.c: $(OBJS) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) diff --git a/servers/slapd/shell-backends/Makefile.in b/servers/slapd/shell-backends/Makefile.in index eb45c9c63f..76b4e0374a 100644 --- a/servers/slapd/shell-backends/Makefile.in +++ b/servers/slapd/shell-backends/Makefile.in @@ -4,6 +4,8 @@ SRCS = passwd-shell.c shellutil.c XSRCS = pwd-version.c OBJS = passwd-shell.o shellutil.o +VINCLUDEDIR= -I../../../include + passwd-shell: pwd-version.o $(CC) $(LDFLAGS) -o $@ $(OBJS) pwd-version.o $(LIBS) @@ -13,4 +15,4 @@ pwd-version.c: $(OBJS) t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < pwd-Version.c > $@) + < $(srcdir)/pwd-Version.c > $@) diff --git a/servers/slapd/tools/Makefile.in b/servers/slapd/tools/Makefile.in index 5c3127eeb2..a8e0d302b6 100644 --- a/servers/slapd/tools/Makefile.in +++ b/servers/slapd/tools/Makefile.in @@ -15,6 +15,10 @@ HAVE_ISODE = @HAVE_ISODE@ BUILD_LDBM = @BUILD_LDBM@ +VINCLUDEDIR= -I../../../include +VLIBDIR= ../../../libraries +VLIBS = -L$(VLIBDIR) + PROGRAMS=ldif2index ldif2ldbm ldbmcat ldif2id2entry \ ldif2id2children centipede ldbmtest ldif diff --git a/servers/slurpd/Makefile.in b/servers/slurpd/Makefile.in index 4c1c4233f4..483cf90678 100644 --- a/servers/slurpd/Makefile.in +++ b/servers/slurpd/Makefile.in @@ -12,6 +12,10 @@ OBJS = admin.o args.o ch_malloc.o config.o detach.o \ reject.o replica.o replog.o ri.o rq.o sanity.o st.o \ tsleep.o +VINCLUDEDIR= -I../../include +VLIBDIR= ../../libraries +VLIBS= -L$(VLIBDIR) + BUILD_OPT = "--enable-slurpd" BUILD_SRV = @BUILD_SLURPD@ @@ -29,7 +33,7 @@ version.c: $(OBJS) $(LDAP_LIBDIR)/liblber.a $(LDAP_LIBDIR)/libldap.a t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \ -e "s|%VERSION%|$${v}|" \ - < Version.c > $@) + < $(srcdir)/Version.c > $@) install-local: FORCE @-$(MKDIR) -p $(libexecdir)