summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/makefile.pm
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/smb_build/makefile.pm')
-rw-r--r--source4/build/smb_build/makefile.pm31
1 files changed, 27 insertions, 4 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 8b5856648f..308c7f2aa6 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -6,21 +6,21 @@
# Released under the GNU GPL
package smb_build::makefile;
-use smb_build::env;
use smb_build::output;
use File::Basename;
use strict;
-use base 'smb_build::env';
use Cwd 'abs_path';
sub new($$$)
{
my ($myname, $config, $mkfile) = @_;
- my $self = new smb_build::env($config);
-
+ my $self = {};
+
bless($self, $myname);
+ $self->_set_config($config);
+
$self->{output} = "";
$self->{mkfile} = $mkfile;
@@ -33,6 +33,29 @@ sub new($$$)
return $self;
}
+sub _set_config($$)
+{
+ my ($self, $config) = @_;
+
+ $self->{config} = $config;
+
+ if (not defined($self->{config}->{srcdir})) {
+ $self->{config}->{srcdir} = '.';
+ }
+
+ if (not defined($self->{config}->{builddir})) {
+ $self->{config}->{builddir} = '.';
+ }
+
+ if ($self->{config}->{prefix} eq "NONE") {
+ $self->{config}->{prefix} = $self->{config}->{ac_default_prefix};
+ }
+
+ if ($self->{config}->{exec_prefix} eq "NONE") {
+ $self->{config}->{exec_prefix} = $self->{config}->{prefix};
+ }
+}
+
sub output($$)
{
my ($self, $text) = @_;