diff options
author | James Peach <jpeach@samba.org> | 2007-04-02 17:06:14 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:49:42 -0500 |
commit | 2882b2ba63ea65c806643f86d996513414c827d0 (patch) | |
tree | 566cae1d3cfc3e3b2b5a301f55405b72ff2bd5b8 | |
parent | dec40d3463383fa525a97f0463010c87f5375a86 (diff) | |
download | samba-2882b2ba63ea65c806643f86d996513414c827d0.tar.gz samba-2882b2ba63ea65c806643f86d996513414c827d0.tar.bz2 samba-2882b2ba63ea65c806643f86d996513414c827d0.zip |
r22029: Make sure we respect $srcdir correctly for the srcdir != builddir case.
(This used to be commit 0db4256a472975c5097135fa87315038a1350a72)
-rw-r--r-- | source4/lib/registry/config.mk | 2 | ||||
-rw-r--r-- | source4/lib/replace/samba.m4 | 8 | ||||
-rw-r--r-- | source4/main.mk | 6 | ||||
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba4.pm | 6 |
4 files changed, 18 insertions, 4 deletions
diff --git a/source4/lib/registry/config.mk b/source4/lib/registry/config.mk index fd38d3a4f9..e63141ba1b 100644 --- a/source4/lib/registry/config.mk +++ b/source4/lib/registry/config.mk @@ -20,7 +20,7 @@ lib/registry/reg_backend_nt4.c: lib/registry/tdr_regf.c $(srcdir)/lib/registry/reg_backend_nt4.c: lib/registry/tdr_regf.c lib/registry/tdr_regf.h: lib/registry/tdr_regf.c lib/registry/tdr_regf.c: $(srcdir)/lib/registry/regf.idl - @CPP="$(CPP)" $(PERL) $(srcdir)/pidl/pidl $(PIDL_ARGS) \ + @CPP="$(CPP)" srcdir="$(srcdir)" $(PERL) $(srcdir)/pidl/pidl $(PIDL_ARGS) \ --header --outputdir=lib/registry \ --tdr-parser -- $(srcdir)/lib/registry/regf.idl diff --git a/source4/lib/replace/samba.m4 b/source4/lib/replace/samba.m4 index 3769c7f50e..a2e04f53b1 100644 --- a/source4/lib/replace/samba.m4 +++ b/source4/lib/replace/samba.m4 @@ -3,8 +3,16 @@ AC_LIBREPLACE_BROKEN_CHECKS SMB_EXT_LIB(LIBREPLACE_EXT, [${LIBDL}]) SMB_ENABLE(LIBREPLACE_EXT) +# remove leading ./ LIBREPLACE_DIR=`echo ${libreplacedir} |sed -e 's/^\.\///g'` +# remove leading srcdir .. we are looking for the relative +# path within the samba source tree or wherever libreplace is. +# We need to make sure the object is not forced to end up in +# the source directory because we might be using a separate +# build directory. +LIBREPLACE_DIR=`echo ${LIBREPLACE_DIR} | sed -e "s|^$srcdir/||g"` + LIBREPLACE_OBJS="" for obj in ${LIBREPLACEOBJ}; do LIBREPLACE_OBJS="${LIBREPLACE_OBJS} ${LIBREPLACE_DIR}/${obj}" diff --git a/source4/main.mk b/source4/main.mk index 0518882109..1d6e4ea858 100644 --- a/source4/main.mk +++ b/source4/main.mk @@ -283,7 +283,11 @@ realdistclean: distclean removebackup check:: test -SELFTEST = $(srcdir)/script/tests/selftest.pl --prefix=${selftest_prefix} --builddir=$(builddir) --srcdir=$(srcdir) --expected-failures=samba4-knownfail --skip=samba4-skip $(TEST_OPTIONS) +SELFTEST = $(srcdir)/script/tests/selftest.pl --prefix=${selftest_prefix} \ + --builddir=$(builddir) --srcdir=$(srcdir) \ + --expected-failures=$(srcdir)/samba4-knownfail \ + --skip=$(srcdir)/samba4-skip \ + $(TEST_OPTIONS) test: all libraries $(SELFTEST) $(DEFAULT_TEST_OPTIONS) $(TESTS) --immediate diff --git a/source4/pidl/lib/Parse/Pidl/Samba4.pm b/source4/pidl/lib/Parse/Pidl/Samba4.pm index f0c6ae38e8..f6c0ee38f7 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4.pm @@ -18,8 +18,10 @@ $VERSION = '0.01'; sub is_intree() { - return 4 if (-f "kdc/kdc.c"); - return 3 if (-f "include/smb.h"); + my $srcdir = $ENV{srcdir}; + $srcdir = $srcdir ? "$srcdir/" : ""; + return 4 if (-f "${srcdir}kdc/kdc.c"); + return 3 if (-f "${srcdir}include/smb.h"); return 0; } |