use File::Spec;
use Debian::Debhelper::Dh_Lib;
-# Cache DEB_BUILD_GNU_TYPE value. Performance hit of multiple
-# invocations is noticable when listing build systems.
-our $DEB_BUILD_GNU_TYPE = dpkg_architecture_value("DEB_BUILD_GNU_TYPE");
-
# Build system name. Defaults to the last component of the class
# name. Do not override this method unless you know what you are
# doing.
# Default build directory. Can be overriden in the derived
# class if really needed.
sub DEFAULT_BUILD_DIRECTORY {
- "obj-" . $DEB_BUILD_GNU_TYPE;
+ "obj-" . dpkg_architecture_value("DEB_HOST_GNU_TYPE");
}
# Constructs a new build system object. Named parameters:
$builddir = File::Spec->catdir($this->{cwd}, $builddir);
}
elsif ($builddir =~ /\Q$this->{cwd}\E/) {
- $builddir = File::Spec::abs2rel($builddir, $this->{cwd});
+ $builddir = File::Spec->abs2rel($builddir, $this->{cwd});
}
# If build directory ends up the same as source directory, drop it
}
# This instance method is called to check if the build system is able
-# 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.
+# to build a source package. It will be called during the build
+# system auto-selection process, inside the root directory of the debian
+# source package. The current build step is passed as an argument.
+# Return 0 if the source is not buildable, or a positive integer
+# otherwise.
#
# 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
+# be buildable or not. However, if the build system is derived from
+# another 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
my ($this, $path)=@_;
my @canon;
my $back=0;
- for my $comp (split(m%/+%, $path)) {
+ foreach my $comp (split(m%/+%, $path)) {
if ($comp eq '.') {
next;
}