From b1d5fc06e235a45561bf53b4bfd07856cec4ea81 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Thu, 24 Jul 2008 15:03:14 +0200 Subject: Make automake's "make" command depend on configure --- src/nbblib/bs.py | 8 ++++++-- src/nbblib/nbbcommands.py | 9 ++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'src') 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): -- cgit