diff options
| author | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2008-07-24 15:03:14 +0200 |
|---|---|---|
| committer | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2008-07-24 15:03:14 +0200 |
| commit | b1d5fc06e235a45561bf53b4bfd07856cec4ea81 (patch) | |
| tree | 161381475725e8186aeef110ef19642c986760b1 /src | |
| parent | 958e81655ad143dfd54b099637db60db42f77fb0 (diff) | |
| download | nbb-b1d5fc06e235a45561bf53b4bfd07856cec4ea81.tar.gz nbb-b1d5fc06e235a45561bf53b4bfd07856cec4ea81.tar.xz nbb-b1d5fc06e235a45561bf53b4bfd07856cec4ea81.zip | |
Make automake's "make" command depend on configure
Diffstat (limited to 'src')
| -rw-r--r-- | src/nbblib/bs.py | 8 | ||||
| -rw-r--r-- | src/nbblib/nbbcommands.py | 9 |
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): |
