Mercurial > gub
changeset 3753:c57896ff9227
Add map_locate also to context, remove some self.expands in invocations.
Fixes local compile of freetype.
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Fri, 21 Sep 2007 22:54:50 +0200 |
parents | c3388eb46447 |
children | f831ba97e1f0 |
files | gub/context.py gub/gubb.py gub/oslog.py gub/targetpackage.py gub/toolpackage.py |
diffstat | 5 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/gub/context.py Fri Sep 21 22:26:04 2007 +0200 +++ b/gub/context.py Fri Sep 21 22:54:50 2007 +0200 @@ -211,6 +211,10 @@ return self.os_interface.locate_files (self.expand (directory), pattern, include_dirs, include_files) + def map_locate (self, func, directory, pattern): + return self.os_interface.map_locate (func, self.expand (directory), + pattern) + # # Tests. #
--- a/gub/gubb.py Fri Sep 21 22:26:04 2007 +0200 +++ b/gub/gubb.py Fri Sep 21 22:54:50 2007 +0200 @@ -351,7 +351,7 @@ self.system ('cp %(new)s %(file)s', locals ()) self.kill_libtool_installation_test (file) self.system ('chmod 755 %(file)s', locals ()) - self.os_interface.map_locate (update, self.expand ('%(builddir)s'), 'libtool') + self.map_locate (update, '%(builddir)s', 'libtool') def install (self): self.system ('''
--- a/gub/oslog.py Fri Sep 21 22:26:04 2007 +0200 +++ b/gub/oslog.py Fri Sep 21 22:54:50 2007 +0200 @@ -113,9 +113,9 @@ def execute (self, os_commands): str, name = self.args - mode = self.kwargs.get('mode', 'w') - assert type(mode) == type('') - + mode = self.kwargs.get ('mode', 'w') + assert type (mode) == type ('') + dir = os.path.split (name)[0] if not os.path.exists (dir): os.makedirs (dir)
--- a/gub/targetpackage.py Fri Sep 21 22:26:04 2007 +0200 +++ b/gub/targetpackage.py Fri Sep 21 22:54:50 2007 +0200 @@ -50,7 +50,7 @@ ("libdir='/usr/lib'", "libdir='%(dir)s%(suffix)s'"), ], file, env=locals ()) - self.os_interface.map_locate (fixup, self.expand ('%(builddir)s'), '*.la') + self.map_locate (fixup, '%(builddir)s', '*.la') ## UGH. only for cross! def config_cache_overrides (self, str):
--- a/gub/toolpackage.py Fri Sep 21 22:26:04 2007 +0200 +++ b/gub/toolpackage.py Fri Sep 21 22:54:50 2007 +0200 @@ -23,14 +23,14 @@ def wrap (file): dir = os.path.dirname (file) base = os.path.basename (file) - self.system ('mv %(e)s %(dir)s/.%(base)s', locals ()) + self.system ('mv %(file)s %(dir)s/.%(base)s', locals ()) self.dump ('''#!/bin/sh LD_LIBRARY_PATH=%(system_root)s/usr/lib %(system_root)s/usr/bin/.%(base)s "$@" ''', file, env=locals ()) os.chmod (file, 0755) - self.os_interface.map_locate (wrap, '%(install_root)s/usr/bin', '*') - self.os_interface.map_locate (wrap, '%(install_root)s/%(local_prefix)s/bin', '*') + self.map_locate (wrap, '%(install_root)s/usr/bin', '*') + self.map_locate (wrap, '%(install_root)s/%(local_prefix)s/bin', '*') def compile_command (self): return self.native_compile_command ()