diff options
author | Max Kellermann <max@duempel.org> | 2015-06-03 07:35:25 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-06-03 07:36:06 +0200 |
commit | 6837a6723460c68c3ef5e99adaa25114a6bbe681 (patch) | |
tree | 8160fadd934459c77cc8bf8041d8391ec80dffe9 | |
parent | d6eb74262a1bd25e3f1a62292d2cd4da4e2ffb52 (diff) | |
download | mpd-6837a6723460c68c3ef5e99adaa25114a6bbe681.tar.gz mpd-6837a6723460c68c3ef5e99adaa25114a6bbe681.tar.xz mpd-6837a6723460c68c3ef5e99adaa25114a6bbe681.zip |
win32/build.py: build zlib in-tree
zlib cannot be built out-of-tree, and previously, we were building in
the "src" directory, not in the "build" directory. The
make_build_path() return value was unused.
Diffstat (limited to '')
-rwxr-xr-x | win32/build.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/win32/build.py b/win32/build.py index ffc6d6137..be48fc62c 100755 --- a/win32/build.py +++ b/win32/build.py @@ -121,16 +121,20 @@ class Project: except FileNotFoundError: return False - def unpack(self): - global src_path + def unpack(self, out_of_tree=True): + global src_path, build_path tarball = self.download() - path = os.path.join(src_path, self.base) + if out_of_tree: + parent_path = src_path + else: + parent_path = build_path + path = os.path.join(parent_path, self.base) try: shutil.rmtree(path) except FileNotFoundError: pass - os.makedirs(src_path, exist_ok=True) - subprocess.check_call(['/bin/tar', 'xfC', tarball, src_path]) + os.makedirs(parent_path, exist_ok=True) + subprocess.check_call(['/bin/tar', 'xfC', tarball, parent_path]) return path def make_build_path(self): @@ -189,9 +193,7 @@ class ZlibProject(Project): Project.__init__(self, url, md5, installed, **kwargs) def build(self): - src = self.unpack() - - build = self.make_build_path() + src = self.unpack(out_of_tree=False) select_toolchain() subprocess.check_call(['/usr/bin/make', '--quiet', |