summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nbblib/bs.py8
-rw-r--r--src/nbblib/nbbcommands.py9
2 files changed, 12 insertions, 5 deletions
diff --git a/src/nbblib/bs.py b/src/nbblib/bs.py
index 94f81af..44e901a 100644
--- a/src/nbblib/bs.py
+++ b/src/nbblib/bs.py
@@ -124,13 +124,17 @@ class AutomakeSourceTree(BSSourceTree):
"--enable-maintainer-mode",
], self.context)
- def build(self):
+ def make(self, *make_args):
"""'make'"""
builddir = self.config.builddir
if not os.path.exists(os.path.join(builddir, 'config.status')):
self.configure()
os.chdir(builddir)
- progutils.prog_run(["make", ], self.context)
+ progutils.prog_run(["make"] + list(make_args), self.context)
+
+ def build(self):
+ """'make'"""
+ self.make()
def install(self):
"""'make install'"""
diff --git a/src/nbblib/nbbcommands.py b/src/nbblib/nbbcommands.py
index 4bb6ef9..79025de 100644
--- a/src/nbblib/nbbcommands.py
+++ b/src/nbblib/nbbcommands.py
@@ -210,9 +210,12 @@ class MakeCommand(SourceClassCommand):
summary = 'run make in builddir'
validate_args = Command.validate_args_any
def run(self):
- os.chdir(self.bs_sourcetree.config.builddir)
- progutils.prog_run(["make"] + list(self.args),
- self.context)
+ if hasattr(self.bs_sourcetree, 'make'):
+ self.bs_sourcetree.make(*self.args)
+ else:
+ os.chdir(self.bs_sourcetree.config.builddir)
+ progutils.prog_run(["make"] + list(self.args),
+ self.context)
class GeneralRunCommand(SourceClassCommand):