GNUMakeBuilder: "make" command controllable via environment

Some systems (notably BSDs) install GNU make as "gmake" - just
invoking "make" and hoping it understands GNU arguments will not
work there. Traditionally, an alternative "make" command can be
selected with the MAKE environment variable.
This changes GNUMakeBuilder (and by extension, AutoconfBuilder)
to invoke the command given in $MAKE and fall back to "make" if
MAKE has not been set.
This commit is contained in:
Christoph Moench-Tegeder
2019-12-15 21:58:52 +01:00
parent 2244f954bb
commit e539f81cd9

View File

@@ -150,7 +150,9 @@ class Builder:
# Concrete subclasses of abstract Builder interface
class GNUMakeBuilder(Builder):
def __init__(self, commandName="make", formatName="GNUMake"):
def __init__(self, commandName=None, formatName="GNUMake"):
if commandName is None:
commandName = os.environ.get("MAKE", "make")
Builder.__init__(self, commandName=commandName, formatName=formatName)