summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create_buildsys.py
Commit message (Collapse)AuthorAgeFilesLines
* recipetool: create: improve mapping for autotools program macrosPaul Eggleton2016-03-091-6/+30
| | | | | | | | | | | | | | | | | | Make the following improvements to mapping items specified in AC_CHECK_PROG, AC_PATH_PROG and AX_WITH_PROG to recipes/classes: * Produce a map of native recipe -> binary for all binaries currently in STAGING_BINDIR_NATIVE and use this when mapping items * Add some more entries to the class map * Ignore autotools binaries since they are covered by the inherit of autotools * Ignore coreutils-native since that would almost always be a bogus dependency (From OE-Core rev: 5614c5ae6a004d4367eccc34dd3cc7ee61fb7e57) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: be more tolerant of spacing in configure.acPaul Eggleton2016-03-091-8/+8
| | | | | | | | | | | | | Allow for whitespace in appropriate places, and ensure we match all whitespace chars not just the space character. (This fixes extracting dependencies from tmux's configure.ac, for example.) (From OE-Core rev: 63524ac8093b734aa4f29f4ea47bcc036f748314) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: fix support for AX_CHECK_LIBRARYPaul Eggleton2016-03-071-1/+1
| | | | | | | | | | Clearly I didn't test this part of the code - lists don't have an "add" method. Needless to say I have tested it now. (From OE-Core rev: 063ed9058a14775f77e7875d4f6ef5719fa03f18) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: improve CMake package mappingPaul Eggleton2016-02-211-11/+28
| | | | | | | | | | | | | | * Package names are actually case sensitive near as I can tell, so we shouldn't be lowercasing them everywhere. * Look for CMake packages in pkgdata and map those back to recipes, so we aren't dependent on the hardcoded mappings (though those are still preserved). * Avoid duplicates in the unmapped package list (From OE-Core rev: 2ddad52ccca07245eea43d9b844c6c7d4b667ca3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: add additional extension mechanismsPaul Eggleton2016-02-211-7/+112
| | | | | | | | | | | | | | | | | | Add a means of extending the dependency extraction for autotools and cmake. Note: in order to have this work, you need to have an __init__.py in the lib/recipetool directory within your layer along with the module implementing the handlers, and the __init__.py needs to contain: # Enable other layers to have modules in the same named directory from pkgutil import extend_path __path__ = extend_path(__path__, __name__) (From OE-Core rev: 915dea9f89cd737e5ba167c384e8d314c5c23c49) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: support cmake find_library directivePaul Eggleton2016-02-111-0/+10
| | | | | | | | | | CMake supports a find_library() directive to find named libraries, so detect dependencies from this. (From OE-Core rev: d0265bc67f797ee4b7760cf37335994133809abf) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: strip quotes from values extracted from CMakeLists.txtPaul Eggleton2016-01-241-5/+8
| | | | | | | | | | Quoting is optional in CMakeLists.txt and is occasionally used, so strip out quotes if they are present. (From OE-Core rev: 4ffe2e1ec9df05b92a2ad5746fb0ca6d218fd77e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: add basic support for extracting dependencies from cmakePaul Eggleton2016-01-191-6/+171
| | | | | | | | | | | | | | | | Add support for extracting dependencies from CMakeLists.txt. There's still a bunch of things missing that are outside the scope of OE-Core and we still lack a proper extension mechanism, but this is a good start. This also adds an oe-selftest test to exercise the new code a bit. Implements [YOCTO #7635]. (From OE-Core rev: 77e73e6930381fdbd6e78d3913d6467572e16568) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: move dependency mapping code to RecipeHandlerPaul Eggleton2016-01-191-113/+8
| | | | | | | | | | | Some refactoring to allow access to the library/header/pkg-config mappings and the DEPENDS / unmapped dependency output code from other classes than AutotoolsRecipeHandler. (From OE-Core rev: 40c10d998b90dd59c6d36c28f8ba11ec598bfa0f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: support additional autoconf macros from autoconf-archivePaul Eggleton2016-01-191-1/+94
| | | | | | | | | | Support a number of macros from autoconf-archive when reading configure.ac to extract dependencies. (From OE-Core rev: ee977a62c58ded361c2abd78654bd25637fe9ea1) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: detect flex/bison dependencyPaul Eggleton2016-01-191-0/+9
| | | | | | | | | | There are a few different macros that can be used to pick up these tools, add support for them all. (From OE-Core rev: 7dfff4b7f05653aea230294ff1a7c023730deff9) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: pick up boost macros in configure.acPaul Eggleton2016-01-191-0/+4
| | | | | | | | | | The presence of BOOST_REQUIRE or AX_BOOST.* indicates that boost is a dependency. (From OE-Core rev: 02570b1fc31c7f4e9643aea8365806089622c0e7) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: improve extraction of pkg-config / lib depsPaul Eggleton2016-01-191-4/+14
| | | | | | | | | | | | | | * The regexes for PKG_CHECK_MODULES / AC_CHECK_LIB were a bit too strict and thus we were skipping some macros. * Add support for PKG_CHECK_EXISTS * Avoid duplicates in warning on missing pkg-config dependencies * Ignore dependency on musl (since this may come up if it's the selected C library) (From OE-Core rev: c58669fb0977f7f0cb79f252484d5c5ef0dfb7e4) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: improve autotools supportPaul Eggleton2015-12-281-11/+27
| | | | | | | | | | | | * tar and binutils we can assume are there * libsocket is only relevant on BSD systems, so we can ignore it. * Detect more things implying gettext/intltool is needed * Detect glib-2.0 requirement. (From OE-Core rev: 2c4c78a6a9970533f3352f1067b2263f45098493) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: support extracting name and version from build scriptsPaul Eggleton2015-12-281-45/+237
| | | | | | | | | | | | | Some build systems (notably autotools) support declaring the name and version of the program being built; since we need those for the recipe we can attempt to extract them. It's a little fuzzy as they are often omitted or may not be appropriately formatted for our purposes, but it does work on a reasonable number of software packages to be useful. (From OE-Core rev: 3b3fd33190d89c09e62126eea0e45aa84fe5442e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: fix do_install handling for makefile-only softwarePaul Eggleton2015-12-281-1/+1
| | | | | | | | | | | | | In my testing here it appears make -qn returns an error (exit code 2) whereas make -n doesn't; I can't immediately tell why based on the documentation. We don't actually care for it to be quiet since we're capturing the output, so let's just leave -q off and have this work properly as a result. (From OE-Core rev: 30c4cd9efdac400d713dff645f23f2627277d75a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: make plugin_init optionalEd Bartosh2015-09-121-3/+0
| | | | | | | | | | | | | | | So far all devtool and recipetool plugins were expected to have plugin_init function. This function is empty in most of plugins as they don't require initialisation. Making plugin_init optional would allow not having empty plugin_init in every plugin. (From OE-Core rev: b99640c89f067866b264f4ee4030fae4c2f338c0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/recipetool: Add a recipe auto-creation scriptPaul Eggleton2014-12-231-0/+319
Add a more maintainable and flexible script for creating at least the skeleton of a recipe based on an examination of the source tree. Commands can be added and the creation process can be extended through plugins. [YOCTO #6406] (From OE-Core rev: fa07ada1cd0750f9aa6bcc31f8236205edf6b4ed) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>