summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Buildsystem.pm
diff options
context:
space:
mode:
authorModestas Vainius <modestas@vainius.eu>2009-11-18 14:16:41 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-11-18 14:16:41 -0500
commit758ce0bb1fbb505aa05f2dd3ac85d7d084b94312 (patch)
tree58aa6852c13e83aecdaaa000a0e3f4f17d99dcf1 /Debian/Debhelper/Buildsystem.pm
parent93cab1844819ee8f761606f6ccc511ebf07d2213 (diff)
Improve build system auto-selection process
This patch alters semantics of check_auto_buildable() a bit. Now it can also indicate if the source has already been partitially built with the build system and if so, such build system may be auto-selected over a less specific its parent (in the inheritance tree) even if the latter is earlier in the @BUILDSYSTEMS array. However, this still leaves a requirement that a derivative build system must not do anything that may break packages of the parent build system. Otherwise, introduction of a new derivative build system might break packages which already had that build system implemented via overrides... Signed-off-by: Modestas Vainius <modestas@vainius.eu>
Diffstat (limited to 'Debian/Debhelper/Buildsystem.pm')
-rw-r--r--Debian/Debhelper/Buildsystem.pm27
1 files changed, 18 insertions, 9 deletions
diff --git a/Debian/Debhelper/Buildsystem.pm b/Debian/Debhelper/Buildsystem.pm
index 7354963d..7f7465a4 100644
--- a/Debian/Debhelper/Buildsystem.pm
+++ b/Debian/Debhelper/Buildsystem.pm
@@ -109,18 +109,27 @@ sub _set_builddir {
}
# This instance method is called to check if the build system is able
-# to auto build a source package. Additional argument $step describes
-# which operation the caller is going to perform (either configure,
-# build, test, install or clean). You must override this method for the
-# build system module to be ever picked up automatically. This method is
-# used in conjuction with @Dh_Buildsystems::BUILDSYSTEMS.
+# to build a source package. It will be called during build
+# system auto-selection process inside the root directory of the debian
+# source package. Current build step will be passed as an additional
+# argument. The value returned must be 0 if the source is not buildable
+# or a positive integer otherwise.
#
-# This method is supposed to be called inside the source root directory.
-# Use $this->get_buildpath($path) method to get full path to the files
-# in the build directory.
+# Generally, it is enough to look for invariant unique build system
+# files shipped with clean source to determine if the source might
+# be buildable or not. However, if the build system enhances (i.e.
+# derives) from the other auto-buildable build system, this method
+# may also check if the source has already been built with this build
+# system partitially by looking for temporary files or other common
+# results the build system produces during the build process. The
+# latter checks must be unique to the current build system and must
+# be very unlikely to be true for either its parent or other build
+# systems. If it is determined that the source has already built
+# partitially with this build system, the value returned must be
+# greater than the one of the SUPER call.
sub check_auto_buildable {
my $this=shift;
- my ($step) = @_;
+ my ($step)=@_;
return 0;
}