summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Buildsystem/makefile.pm
diff options
context:
space:
mode:
authorModestas Vainius <modestas@vainius.eu>2009-04-15 17:39:06 +0300
committerJoey Hess <joey@gnu.kitenet.net>2009-04-15 14:10:08 -0400
commit14d936391e07454c7936a28c512e8b42b26cd05e (patch)
tree3cf37c8050adf723f751663260e19afd26a899b6 /Debian/Debhelper/Buildsystem/makefile.pm
parentacd3bec058d14c227f1f45c42122caa6d7a09e89 (diff)
debhelper modular buildsystems (try 3).
* New feature - when listing buildsystems, list their status too (auto/specified). * Dh_Buildsystem_Basic.pm renamed to Dh_Buildsystem.pm * Addressed a few issues expressed in the comments, answered a few comments. * Cache DEB_BUILD_GNU_TYPE value. Performance hit is noticable when listing build systems. * is_auto_buildable() renamed to check_auto_buildable() (again). Since there is is_buildable() now, I didn't want to use is_ for that method. Signed-off-by: Modestas Vainius <modestas@vainius.eu>
Diffstat (limited to 'Debian/Debhelper/Buildsystem/makefile.pm')
-rw-r--r--Debian/Debhelper/Buildsystem/makefile.pm14
1 files changed, 4 insertions, 10 deletions
diff --git a/Debian/Debhelper/Buildsystem/makefile.pm b/Debian/Debhelper/Buildsystem/makefile.pm
index 286f0f65..0595b0fa 100644
--- a/Debian/Debhelper/Buildsystem/makefile.pm
+++ b/Debian/Debhelper/Buildsystem/makefile.pm
@@ -8,7 +8,7 @@ package Debian::Debhelper::Buildsystem::makefile;
use strict;
use Debian::Debhelper::Dh_Lib;
-use base 'Debian::Debhelper::Dh_Buildsystem_Basic';
+use base 'Debian::Debhelper::Dh_Buildsystem';
sub get_makecmd_C {
my $self=shift;
@@ -18,14 +18,6 @@ sub get_makecmd_C {
return $self->{makecmd};
}
-# XXX JEH I *like* this. Yay for factoring out ugly ugly stuff!
-# XXX MDX TODO: this could use dh debian/rules parser.
-# XXX JEH That one checks for explicit only targets, while we want
-# implicit targets here too. I think the current code is ok;
-# it's a bonus that it checks if the target it empty.
-# Hmm, one problem is that if a target exists but will run no
-# commands since it's already built, the approach below will return
-# nothing and assume it doesn't exist.
sub exists_make_target {
my ($self, $target) = @_;
my $makecmd=$self->get_makecmd_C();
@@ -61,12 +53,14 @@ sub new {
return $self;
}
-sub is_auto_buildable {
+sub check_auto_buildable {
my $self=shift;
my ($action) = @_;
# Handles build, test, install, clean; configure - next class
# XXX JEH shouldn't it also handle configure, just as a no-op?
+ # XXX MDX No, then cmake.mk would have no chance of hitting for
+ # no good reason.
if (grep /^\Q$action\E$/, qw{build test install clean}) {
# This is always called in the source directory, but generally
# Makefiles are created (or live) in the the build directory.