]> git.sur5r.net Git - openldap/commitdiff
Added basic VPATH support. VPATH Make depend still needs work.
authorKurt Zeilenga <kurt@openldap.org>
Sun, 20 Sep 1998 18:54:36 +0000 (18:54 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 20 Sep 1998 18:54:36 +0000 (18:54 +0000)
19 files changed:
build/lib.mk
build/top.mk
clients/fax500/Makefile.in
clients/finger/Makefile.in
clients/gopher/Makefile.in
clients/mail500/Makefile.in
clients/rcpt500/Makefile.in
clients/tools/Makefile.in
clients/ud/Makefile.in
include/Makefile.in
libraries/libldap/Makefile.in
servers/ldapd/Makefile.in
servers/slapd/Makefile.in
servers/slapd/back-ldbm/Makefile.in
servers/slapd/back-passwd/Makefile.in
servers/slapd/back-shell/Makefile.in
servers/slapd/shell-backends/Makefile.in
servers/slapd/tools/Makefile.in
servers/slurpd/Makefile.in

index 8ae91785ad33a89e635e42b77b9a446fe283d70d..4526fcf552866494b12473dfc17a8e636c436c2d 100644 (file)
@@ -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
 
index 819a7b70be4c9e02e50a72993f51cd59f1a5293c..f1b1763de40621c9ac56acd1e4e6dff284da42c9 100644 (file)
@@ -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)
index 08d85bee73506912f35d439303c8636a9363987c..85da96cde5581198260051031ac65d6ead7a37c4 100644 (file)
@@ -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)
index 628fe2afcb764fa5b2a7f36d18d4b661d12bdcb4..10f2c34e9950d722c1eea805dc6e67f6b405836f 100644 (file)
@@ -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)
index 45ac3eb36fae97f2afc763df961a10fe44b1a7d2..728229170cd9da7343a4e82d134e36a159226f16 100644 (file)
@@ -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)
index f96f5731d6742951e8a57ccab11ebcfe66f2fe80..ae040c10ef1248e4f49786ff5e6ce339c7ce7e46 100644 (file)
@@ -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)
index 4582b24aec175cc51a382f8c1bd692e2976d52a9..76c2e088d8637744c39d06acd471cbde87de4943 100644 (file)
@@ -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)
index a65ae1df054f5f04dfd61d3106f189ebea0c3f48..e95894e29edadd5c071c02d1318a8a33eb8e8c62 100644 (file)
@@ -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)
index faf2ab6c6eaeb435e86b1ac45a68f0d1c234842f..e62e301e0a8b464c05da45454f338a74af362a43 100644 (file)
@@ -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)
index e9c029af63360b016efc7bcc9bec4f91d32162d1..a36d6c3bdd0d06ae720ac6874e6d50375100e64b 100644 (file)
@@ -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
index fce02b633d2a8de0278d6a45c10e6eaf88fb39fb..e4a5f354449f97db660805f532f29a1c0519c126 100644 (file)
@@ -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 \
index 8a7d913485346d4368287521e16259506d8117ec..b8c2f7d37b0e8d9fdabef92249a79a51f38234eb 100644 (file)
@@ -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
 
index b915eb6fbab412e7df37f0edeeca34f32ece56c4..6055a1ca6942deac79e90739ea27f8857032e136 100644 (file)
@@ -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 \
index 51414776dffda0f76ad4828535858952f99642a0..825bb02540c7eacff5c5770c83fea04b7d89bbca 100644 (file)
@@ -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 > $@)
 
index 012780d32f538a34bc78114b8d1f9213c6802aef..183ede5186f0ad9c4ee8aa9d01cc152c41f67695 100644 (file)
@@ -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 > $@)
index 87b3892e870f8931b90a1305e78d93eaf72596fe..b63e7143a3f55c960db31d3fa84891955b9a7230 100644 (file)
@@ -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 > $@)
index eb45c9c63f8c398f27c7632b01f004ec6140509b..76b4e0374a358087b9b489615d1940778a68e7b9 100644 (file)
@@ -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 > $@)
index 5c3127eeb21c2199b9a574c8f8f3f318f53efc26..a8e0d302b69c44af78caa544b20dd799509c06c8 100644 (file)
 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
 
index 4c1c4233f407b67058fcd30e0f3c1ba8af8f1236..483cf9067825e88d95376ca9e8aa20fe88b38326 100644 (file)
@@ -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)