[ostree] compile-one: Fix build of modules that don't support srcdir != builddir
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] compile-one: Fix build of modules that don't support srcdir != builddir
- Date: Tue, 10 Jan 2012 00:58:12 +0000 (UTC)
commit 46d09b1501201ac9fcecf5d405c3a45d50b6e577
Author: Colin Walters <walters verbum org>
Date: Mon Jan 9 19:56:03 2012 -0500
compile-one: Fix build of modules that don't support srcdir != builddir
We need to run configure and make/make install in the _build
directory.
src/ostbuild/pyostbuild/builtin_compile_one.py | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/ostbuild/pyostbuild/builtin_compile_one.py b/src/ostbuild/pyostbuild/builtin_compile_one.py
index e2f3ca0..5b05e9a 100755
--- a/src/ostbuild/pyostbuild/builtin_compile_one.py
+++ b/src/ostbuild/pyostbuild/builtin_compile_one.py
@@ -136,7 +136,9 @@ class OstbuildCompileOne(builtins.Builtin):
run_sync(['./' + autogen_script], env=env)
else:
log("Using existing 'configure' script")
-
+
+ builddir = '_build'
+
use_builddir = True
doesnot_support_builddir = self._has_buildapi_configure_variable('no-builddir')
if doesnot_support_builddir:
@@ -146,10 +148,8 @@ class OstbuildCompileOne(builtins.Builtin):
shutil.copytree('.', '_build', symlinks=True,
ignore=shutil.ignore_patterns('_build'))
use_builddir = False
- builddir = '.'
if use_builddir:
- builddir = '_build'
log("Using build directory %r" % (builddir, ))
if not os.path.isdir(builddir):
os.mkdir(builddir)
@@ -159,10 +159,7 @@ class OstbuildCompileOne(builtins.Builtin):
else:
args = ['./configure']
args.extend(self.configargs)
- if use_builddir:
- run_sync(args, cwd=builddir)
- else:
- run_sync(args)
+ run_sync(args, cwd=builddir)
makefile_path = os.path.join(builddir, 'Makefile')
if not os.path.exists(makefile_path):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]