summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-25 19:11:04 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-25 19:11:04 +0100
commitf5be3c3184119ed8370aedc3de2cb4aed21e38cc (patch)
tree911a685951519f3ed423487a20e752fa420b0fb1 /source4/build
parent3f6a915f2bf18e20d22a75cd1320f6cd4358d709 (diff)
downloadsamba-f5be3c3184119ed8370aedc3de2cb4aed21e38cc.tar.gz
samba-f5be3c3184119ed8370aedc3de2cb4aed21e38cc.tar.bz2
samba-f5be3c3184119ed8370aedc3de2cb4aed21e38cc.zip
Merge env.pm into makefile.pm.
(This used to be commit 01a0d3e74404d382c3cb74dbe385a4e9115b9b74)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/smb_build/env.pm56
-rw-r--r--source4/build/smb_build/main.pl1
-rw-r--r--source4/build/smb_build/makefile.pm31
3 files changed, 27 insertions, 61 deletions
diff --git a/source4/build/smb_build/env.pm b/source4/build/smb_build/env.pm
deleted file mode 100644
index 01e05d57e3..0000000000
--- a/source4/build/smb_build/env.pm
+++ /dev/null
@@ -1,56 +0,0 @@
-# Environment class
-#
-# Samba Build Environment
-#
-# (C) 2005 Jelmer Vernooij <jelmer@samba.org>
-#
-# Published under the GNU GPL
-
-package smb_build::env;
-use smb_build::input;
-use File::Path;
-use File::Basename;
-
-use strict;
-
-sub new($$)
-{
- my ($name, $config) = @_;
- my $self = { };
- bless $self, $name;
-
- $self->{items} = {};
- $self->{info} = {};
-
- $self->_set_config($config);
-
- 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};
- }
-
- $self->{developer} = ($self->{config}->{developer} eq "yes");
- $self->{automatic_deps} = ($self->{config}->{automatic_dependencies} eq "yes");
-}
-
-1;
diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index 741de22b2f..47e48c3da7 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -9,7 +9,6 @@ use smb_build::makefile;
use smb_build::input;
use smb_build::config_mk;
use smb_build::output;
-use smb_build::env;
use smb_build::summary;
use smb_build::config;
use strict;
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) = @_;