summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/Makefile.in4
-rw-r--r--source4/build/pidl/idl.pm6
-rw-r--r--source4/build/pidl/idl.yp6
3 files changed, 12 insertions, 4 deletions
diff --git a/source4/Makefile.in b/source4/Makefile.in
index f2c68dd40e..c09e558b74 100644
--- a/source4/Makefile.in
+++ b/source4/Makefile.in
@@ -643,10 +643,10 @@ pch: basics
idl_full: build/pidl/idl.pm
- script/build_idl.sh FULL
+ CPP="@CPP@" script/build_idl.sh FULL
idl: build/pidl/idl.pm
- @script/build_idl.sh
+ @CPP="@CPP@" script/build_idl.sh
basics: idl proto_test
diff --git a/source4/build/pidl/idl.pm b/source4/build/pidl/idl.pm
index 5e285bdc7c..d5c0ae0071 100644
--- a/source4/build/pidl/idl.pm
+++ b/source4/build/pidl/idl.pm
@@ -1974,7 +1974,11 @@ sub parse_idl($$)
my $saved_delim = $/;
undef $/;
- my $data = `cpp $filename`;
+ my $cpp = $ENV{CPP};
+ if (! defined $cpp) {
+ $cpp = "cpp"
+ }
+ my $data = `$cpp -xc $filename`;
$/ = $saved_delim;
$self->YYData->{INPUT} = $data;
diff --git a/source4/build/pidl/idl.yp b/source4/build/pidl/idl.yp
index 3e9943a009..bfc4698709 100644
--- a/source4/build/pidl/idl.yp
+++ b/source4/build/pidl/idl.yp
@@ -304,7 +304,11 @@ sub parse_idl($$)
my $saved_delim = $/;
undef $/;
- my $data = `cc -E $filename`;
+ my $cpp = $ENV{CPP};
+ if (! defined $cpp) {
+ $cpp = "cpp"
+ }
+ my $data = `$cpp -xc $filename`;
$/ = $saved_delim;
$self->YYData->{INPUT} = $data;