summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create_buildsys.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/recipetool/create_buildsys.py')
-rw-r--r--scripts/lib/recipetool/create_buildsys.py36
1 files changed, 30 insertions, 6 deletions
diff --git a/scripts/lib/recipetool/create_buildsys.py b/scripts/lib/recipetool/create_buildsys.py
index 909743b384..f84ec3dc6c 100644
--- a/scripts/lib/recipetool/create_buildsys.py
+++ b/scripts/lib/recipetool/create_buildsys.py
@@ -1,6 +1,6 @@
1# Recipe creation tool - create command build system handlers 1# Recipe creation tool - create command build system handlers
2# 2#
3# Copyright (C) 2014 Intel Corporation 3# Copyright (C) 2014-2016 Intel Corporation
4# 4#
5# This program is free software; you can redistribute it and/or modify 5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License version 2 as 6# it under the terms of the GNU General Public License version 2 as
@@ -404,14 +404,34 @@ class AutotoolsRecipeHandler(RecipeHandler):
404 values = {} 404 values = {}
405 inherits = [] 405 inherits = []
406 406
407 # FIXME this mapping is very thin 407 # Hardcoded map, we also use a dynamic one based on what's in the sysroot
408 progmap = {'flex': 'flex-native', 408 progmap = {'flex': 'flex-native',
409 'bison': 'bison-native', 409 'bison': 'bison-native',
410 'm4': 'm4-native', 410 'm4': 'm4-native',
411 'tar': 'tar-native', 411 'tar': 'tar-native',
412 'ar': 'binutils-native'} 412 'ar': 'binutils-native',
413 'ranlib': 'binutils-native',
414 'ld': 'binutils-native',
415 'strip': 'binutils-native',
416 'libtool': '',
417 'autoconf': '',
418 'autoheader': '',
419 'automake': '',
420 'uname': '',
421 'rm': '',
422 'cp': '',
423 'mv': '',
424 'find': '',
425 'awk': '',
426 'sed': '',
427 }
413 progclassmap = {'gconftool-2': 'gconf', 428 progclassmap = {'gconftool-2': 'gconf',
414 'pkg-config': 'pkgconfig'} 429 'pkg-config': 'pkgconfig',
430 'python': 'pythonnative',
431 'python3': 'python3native',
432 'perl': 'perlnative',
433 'makeinfo': 'texinfo',
434 }
415 435
416 pkg_re = re.compile('PKG_CHECK_MODULES\(\s*\[?[a-zA-Z0-9_]*\]?,\s*\[?([^,\]]*)\]?[),].*') 436 pkg_re = re.compile('PKG_CHECK_MODULES\(\s*\[?[a-zA-Z0-9_]*\]?,\s*\[?([^,\]]*)\]?[),].*')
417 pkgce_re = re.compile('PKG_CHECK_EXISTS\(\s*\[?([^,\]]*)\]?[),].*') 437 pkgce_re = re.compile('PKG_CHECK_EXISTS\(\s*\[?([^,\]]*)\]?[),].*')
@@ -462,6 +482,8 @@ class AutotoolsRecipeHandler(RecipeHandler):
462 deps = [] 482 deps = []
463 unmapped = [] 483 unmapped = []
464 484
485 RecipeHandler.load_binmap(tinfoil.config_data)
486
465 def process_macro(keyword, value): 487 def process_macro(keyword, value):
466 for handler in handlers: 488 for handler in handlers:
467 if handler.process_macro(srctree, keyword, value, process_value, libdeps, pcdeps, deps, outlines, inherits, values): 489 if handler.process_macro(srctree, keyword, value, process_value, libdeps, pcdeps, deps, outlines, inherits, values):
@@ -498,10 +520,12 @@ class AutotoolsRecipeHandler(RecipeHandler):
498 if progclass: 520 if progclass:
499 inherits.append(progclass) 521 inherits.append(progclass)
500 else: 522 else:
501 progdep = progmap.get(prog, None) 523 progdep = RecipeHandler.recipebinmap.get(prog, None)
524 if not progdep:
525 progdep = progmap.get(prog, None)
502 if progdep: 526 if progdep:
503 deps.append(progdep) 527 deps.append(progdep)
504 else: 528 elif progdep is None:
505 if not prog.startswith('$'): 529 if not prog.startswith('$'):
506 unmapped.append(prog) 530 unmapped.append(prog)
507 elif keyword == 'AC_CHECK_LIB': 531 elif keyword == 'AC_CHECK_LIB':