diff options
-rw-r--r-- | Debian/Debhelper/Dh_Buildsystem_Basic.pm | 17 | ||||
-rw-r--r-- | Debian/Debhelper/Dh_Buildsystems.pm | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Debian/Debhelper/Dh_Buildsystem_Basic.pm b/Debian/Debhelper/Dh_Buildsystem_Basic.pm index 76163bc..58d073b 100644 --- a/Debian/Debhelper/Dh_Buildsystem_Basic.pm +++ b/Debian/Debhelper/Dh_Buildsystem_Basic.pm @@ -46,6 +46,23 @@ sub DEFAULT_BUILD_DIRECTORY { # Constructor SHOULD NOT be used to initialize build environment because # constructed class may not be eventually used to build the package (if e.g. # is_auto_buildable() returns 0). +# +# XXX JEH the above comment begs the question: Why not test +# is_auto_buildable in the constructor, and only have the constructor +# succeed if it can handle the source? That would also eliminate the +# delayed warning mess in enforce_in_source_building. +# AFAICS, there is only one reason you need an instance of the object +# if it can't build -- to list build systems. But that only needs +# DESCRIPTION and NAME, which could be considered to be class methods, +# rather than object methods -- no need to construct an instance of the +# class before calling those. +# I see that if --buildsystem is manually specified to override, +# the is_auto_buildable test is completely skipped. So if this change were +# made, you'd not be able to skip the test, and some --buildsystem choices +# might cause an error. OTOH, those seem to be cases where it would later +# fail anyway. The real use cases for --buildsystem, such as forcing use of +# cmake when there are both a CMakeLists.txt and a Makefile, would still +# work. sub new { my ($cls, %opts)=@_; diff --git a/Debian/Debhelper/Dh_Buildsystems.pm b/Debian/Debhelper/Dh_Buildsystems.pm index 34108ca..6774511 100644 --- a/Debian/Debhelper/Dh_Buildsystems.pm +++ b/Debian/Debhelper/Dh_Buildsystems.pm @@ -107,6 +107,7 @@ sub buildsystems_init { "builddirectory:s" => $set_builddir, "m=s" => \$dh{BUILDSYS}, + # XXX JEH Let's only keep one spelling of this. "build-system=s" => \$dh{BUILDSYS}, "buildsystem=s" => \$dh{BUILDSYS}, |