mirror of
https://github.com/samba-team/samba.git
synced 2025-11-26 04:23:49 +03:00
Generate different #include lines in pidl depending on whether we're building inside or outside of the Samba tree (useful for 3rd-party projects).
33 lines
607 B
Perl
33 lines
607 B
Perl
###################################################
|
|
# Common Samba4 functions
|
|
# Copyright jelmer@samba.org 2006
|
|
# released under the GNU GPL
|
|
|
|
package Parse::Pidl::Samba4;
|
|
|
|
require Exporter;
|
|
@ISA = qw(Exporter);
|
|
@EXPORT = qw(is_intree choose_header);
|
|
|
|
use Parse::Pidl::Util qw(has_property);
|
|
use strict;
|
|
|
|
use vars qw($VERSION);
|
|
$VERSION = '0.01';
|
|
|
|
sub is_intree()
|
|
{
|
|
return -f "include/smb.h";
|
|
}
|
|
|
|
# Return an #include line depending on whether this build is an in-tree
|
|
# build or not.
|
|
sub choose_header($$)
|
|
{
|
|
my ($in,$out) = @_;
|
|
return "#include \"$in\"" if (is_intree());
|
|
return "#include <$out>";
|
|
}
|
|
|
|
1;
|