Commit 32a688f0 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Added basic VPATH support. VPATH Make depend still needs work.

parent cbd6bada
......@@ -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
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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
......
......@@ -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 \
......
......@@ -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
......
......@@ -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 \
......
......@@ -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 > $@)
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 > $@)
......@@ -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 > $@)
......@@ -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 > $@)
......@@ -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
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment