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-29 14:05:11 +0100
commit255a351f2490ffdb691efb07e8ea38446fa080ef (patch)
treea1e56fdf9602ccfdfa0ef970ea25eb98eaee2505 /source4/build
parentbc282d843d9326233c25f7715c8006b890f89d52 (diff)
downloadsamba-255a351f2490ffdb691efb07e8ea38446fa080ef.tar.gz
samba-255a351f2490ffdb691efb07e8ea38446fa080ef.tar.bz2
samba-255a351f2490ffdb691efb07e8ea38446fa080ef.zip
Merge env.pm into makefile.pm.
(This used to be commit 28bbd546195461d4b8747bc6cefd6320f8efe17d)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/smb_build/env.pm57
-rw-r--r--source4/build/smb_build/main.pl1
-rw-r--r--source4/build/smb_build/makefile.pm31
3 files changed, 27 insertions, 62 deletions
diff --git a/source4/build/smb_build/env.pm b/source4/build/smb_build/env.pm
deleted file mode 100644
index 76cd8d1a26..0000000000
--- a/source4/build/smb_build/env.pm
+++ /dev/null
@@ -1,57 +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->{gnu_make} = ($self->{config}->{GNU_MAKE} 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 27ba2d36e1..6d4a7321a4 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -10,7 +10,6 @@ use smb_build::header;
use smb_build::input;
use smb_build::config_mk;
use smb_build::output;
-use smb_build::env;
use smb_build::cflags;
use smb_build::summary;
use smb_build::config;
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 9fedfe9df2..8e6df89d1c 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;
@@ -38,6 +38,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) = @_;