diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-02-03 13:05:18 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-02-07 13:22:00 +1100 |
commit | 431b25e8953794079ff52155929f0263a833da69 (patch) | |
tree | 8c7acf67690475b9fc5deab85fc25af1cd2678d4 /pidl | |
parent | 3f3696ce07957456e366507b43ff562277803b98 (diff) | |
download | samba-431b25e8953794079ff52155929f0263a833da69.tar.gz samba-431b25e8953794079ff52155929f0263a833da69.tar.bz2 samba-431b25e8953794079ff52155929f0263a833da69.zip |
pidl: support using pidl from top level directory
pidl needs to know if it is being used within the samba tree or not,
to get the names of some include files right. This adds support for
using pidl in the top level directory of a Samba build
This change also makes it clear that is_intree() is a boolean
function. Previously it returned different values for Samba3 and
Samba4, but there is nothing that depends on that
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'pidl')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4.pm b/pidl/lib/Parse/Pidl/Samba4.pm index 1deb708689..b720ab9015 100644 --- a/pidl/lib/Parse/Pidl/Samba4.pm +++ b/pidl/lib/Parse/Pidl/Samba4.pm @@ -18,12 +18,17 @@ use strict; use vars qw($VERSION); $VERSION = '0.01'; + +# return true if we are using pidl within the samba source tree. This changes +# the names of include files, as some include files (such as ntstatus.h) have +# different paths when installed to the patch in the source tree sub is_intree() { my $srcdir = $ENV{srcdir}; $srcdir = $srcdir ? "$srcdir/" : ""; - return 4 if (-f "${srcdir}kdc/kdc.c"); - return 3 if (-f "${srcdir}include/smb.h"); + return 1 if (-f "${srcdir}kdc/kdc.c"); + return 1 if (-d "${srcdir}source4"); + return 1 if (-f "${srcdir}include/smb.h"); return 0; } |