From acd3bec058d14c227f1f45c42122caa6d7a09e89 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 14 Apr 2009 15:24:57 -0400 Subject: more comments --- Debian/Debhelper/Buildsystem/autotools.pm | 10 ++++++++++ Debian/Debhelper/Buildsystem/makefile.pm | 1 + Debian/Debhelper/Buildsystem/perl_build.pm | 6 ++++++ Debian/Debhelper/Buildsystem/python_distutils.pm | 2 ++ 4 files changed, 19 insertions(+) (limited to 'Debian/Debhelper/Buildsystem') diff --git a/Debian/Debhelper/Buildsystem/autotools.pm b/Debian/Debhelper/Buildsystem/autotools.pm index 08851677..b94d8e17 100644 --- a/Debian/Debhelper/Buildsystem/autotools.pm +++ b/Debian/Debhelper/Buildsystem/autotools.pm @@ -20,6 +20,16 @@ sub is_auto_buildable { my $action=shift; # Handle configure; the rest - next class + # XXX JEH + # Currently, if there is a configure script, and dh_auto_build + # is run w/o dh_auto_configure having been run, there's no + # Makefile, so the next class's detection routine also fails, and + # presumably all do, resulting in dh_auto_build doing nothing + # and silently "succeeding". + # So, why not always test for configure? Then, for ! configure + # actions, it would use the methods inherited from its parent + # class. In the above example, that will try to run "make" w/o a + # Makefile, which prints a useful error. if ($action eq "configure") { return -x "configure"; } diff --git a/Debian/Debhelper/Buildsystem/makefile.pm b/Debian/Debhelper/Buildsystem/makefile.pm index 36081ecc..286f0f65 100644 --- a/Debian/Debhelper/Buildsystem/makefile.pm +++ b/Debian/Debhelper/Buildsystem/makefile.pm @@ -66,6 +66,7 @@ sub is_auto_buildable { my ($action) = @_; # Handles build, test, install, clean; configure - next class + # XXX JEH shouldn't it also handle configure, just as a no-op? 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. diff --git a/Debian/Debhelper/Buildsystem/perl_build.pm b/Debian/Debhelper/Buildsystem/perl_build.pm index 9be71a27..550f2a5b 100644 --- a/Debian/Debhelper/Buildsystem/perl_build.pm +++ b/Debian/Debhelper/Buildsystem/perl_build.pm @@ -19,6 +19,12 @@ sub is_auto_buildable { # Handles everything my $ret = -e "Build.PL"; + # XXX JEH what happens here if they run dh_auto_build, + # forgetting dh_auto_configure? I think it will just + # think it's not auto buildable and, assuming no other buildsystems + # succeed, silently do nothing. Perhaps it would be better, then, + # to omit the test below. Then, it would try to run ./Build + # which doesn't exist, which should result in a semi-useful error. if ($action ne "configure") { $ret &&= -e "Build"; } diff --git a/Debian/Debhelper/Buildsystem/python_distutils.pm b/Debian/Debhelper/Buildsystem/python_distutils.pm index a69b36f4..0b8367ec 100644 --- a/Debian/Debhelper/Buildsystem/python_distutils.pm +++ b/Debian/Debhelper/Buildsystem/python_distutils.pm @@ -20,6 +20,8 @@ sub is_auto_buildable { my $action=shift; # Handle build install clean; the rest - next class + # XXX JEH shouldn't it also handle configure? It would be handled + # by doing nothing, but that's what's appropriate for python. if (grep(/^\Q$action\E$/, qw{build install clean})) { return -e "setup.py"; } -- cgit v1.2.3