summaryrefslogtreecommitdiffstats
path: root/meta/classes/autotools.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* autotools: fix traversal bug in aclocal copyingChristopher Larson2015-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The logic is supposed to avoid following dependencies when we depend on a target recipe which depends on a native recipe. The problem is, we were marking the dep (the native recipe) as already processed when we avoided traversal, meaning that even when that recipe would be pulled in via a different dependency, we skipped it there too, and whether it was skipped entirely depended on the non-deterministic dep processing order. If the first one to be encountered was via the indirect target dep, it wouldn't end up in configuredeps, otherwise it would. As we want to avoid traversing that particular dependency relationship, not *every* dependency on the native, we should continue, but not add it to done, so it can be traversed from other avenues. This fixes an intermittent bug in some of my non-GPLv3 builds, where one dependency upon gettext-minimal-native was skipped, but others should not have been, resulting in it being removed from configuredeps entirely, and no gettext macros being available. Cc: Richard Purdie <richard.purdie@linuxfoundation.org> (From OE-Core rev: e6d4f8198a8708f54fc17333ae643b51ed9100b6) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: mkdir ${B} -> mkdir -p ${B}Robert Yang2015-09-181-1/+1
| | | | | | | | | | | | ${B} is the default cwd of tasks, so there might be race issues such as: | mkdir: cannot create directory `${B}': File exists [snip] NOTE: recipe perf-1.0-r9: task do_configure: Failed (From OE-Core rev: 72682d72b52355c3fed947167ca3c6064340ead1) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: Allow dependency tracking option to be overriddenRoy Li2015-08-301-1/+1
| | | | | | | | | | CONFIGUREOPT_DEPTRACK can not be overridden since it is set by = (From OE-Core rev: 758abeb219520ab5556186babcdb7e6660ce6e40) Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Use die() or bbfatal_log() where the log should definitely be printedPaul Eggleton2015-07-161-2/+2
| | | | | | | | | | | | | Change calls to bbfatal() to either die() or bbfatal_log() where we know we want the full log to be printed by the UI (calling bberror or bbfatal would otherwise suppress it since the change to connect these functions through to the UI.) bbfatal() is still fine to use where there is enough context information in the message such that the log isn't needed. (From OE-Core rev: 04ed9a19e1b08003329138b8ab83691d13c11fd9) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Add explict getVar param for (non) expansionRichard Purdie2015-06-231-1/+1
| | | | | | | | | | | | | | Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` (From OE-Core rev: ab7c1d239b122c8e549e8112c88fd46c9e2b061b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: Use space with prepend to clean up variable whitespaceRichard Purdie2015-05-261-1/+1
| | | | | | | | | Correct the whitespace in this variable to make this more readable when debugging, no functional change. (From OE-Core rev: 4bb586a470a15cf3b93538e8c749a6fb8479c990) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: Fix find races on source directoryRichard Purdie2015-04-291-4/+4
| | | | | | | | | | | | | | | | | | | | In a similar way to http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=aa1438b56f30515f9c31b306decef7f562dda81f there are more find races in the autotools class. For recipes with PACKAGES_remove = "${PN}", the find which removes .la files can race against deletion of other directories in WORKDIR e.g.: find: '/home/autobuilder/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/qemux86_64-poky-linux/init-ifupdown/1.0-r7/sstate-build-populate_lic': No such file or directory | WARNING: /home/autobuilder/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/qemux86_64-poky-linux/init-ifupdown/1.0-r7/temp/run.do_configure.6558:1 exit 1 from | find /home/autobuilder/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/qemux86_64-poky-linux/init-ifupdown/1.0-r7 -name \*.la -delete Fix the remaining races in the same way. [YOCTO #7522] (From OE-Core rev: 79770ca14a0cc2f4112fb4d8dc2d8832701b6d5d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: Avoid find race for S = "${WORKDIR}"Richard Purdie2015-03-311-1/+1
| | | | | | | | | | | | | | | | | For recipes with PACKAGES_remove = "${PN}", the find which removes .la files can race against deletion of other directories in WORKDIR e.g.: find: '/home/autobuilder/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/qemux86_64-poky-linux/init-ifupdown/1.0-r7/sstate-build-populate_lic': No such file or directory | WARNING: /home/autobuilder/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/qemux86_64-poky-linux/init-ifupdown/1.0-r7/temp/run.do_configure.6558:1 exit 1 from | find /home/autobuilder/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/qemux86_64-poky-linux/init-ifupdown/1.0-r7 -name \*.la -delete The simplest fix is to add the find option which ignores these kind of races. [YOCTO #7522] (From OE-Core rev: dd8099ca3092fbd5c685e5ef1b1c5a8185a6893d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools/siteinfo: Avoid races over siteinfo filesRichard Purdie2015-02-131-1/+6
| | | | | | | | | | | | | | | | | If a siteinfo enabled tasks re-executes at the wrong moment whilst something else is in do_configure, the _config files can be removed which upsets autoconf and causes build failures. Use the same approach as we do for dealing with the aclocal files. We already parse the manifests so look out any *_config files and if so, copy them, then reference the copy from siteinfo instead. This has the advantage of also being more deterministic. [YOCTO #7101] (From OE-Core rev: c8b7aad133c3e3319345d50f85a91cbd5116f842) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: print make cleanRobert Yang2015-01-161-0/+1
| | | | | | | | | It makes us easier to see make clean failed. (From OE-Core rev: c34d9e66a1a97952965128ab84c691202a60985b) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: respect CLEANBROKENRoss Burton2014-12-051-1/+1
| | | | | | | | | | autotools.bbclass should respect CLEANBROKEN as it invokes 'make clean' on configure. (From OE-Core rev: ffbcb440c43e5e00e73ced67a2c888e9863a1d00) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: Use make clean for builds not supporting B != SRichard Purdie2014-10-301-1/+5
| | | | | | | | | | | | If the build doesn't support B != S, we can try running "make clean" instead to try and clean up previous objects if the hash for the task has changed. This tries to ensure that when variables like ${baselib} change, the changes are correctly accounted for. (From OE-Core rev: c2f761e2010857e2a2aad1dccf06ec39d15c1c86) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/autotools: avoid error if recipe is first in task dependency treePaul Eggleton2014-08-231-1/+1
| | | | | | | | | | If the recipe being built is listed first in BB_TASKDEPDATA (i.e. item 0) this is still valid and should not trigger an error. (From OE-Core rev: 945c98969bcfe5516b89ac6dfbe4552fb5d68a48) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: Exclude SDK_OS from autotools task signaturesRichard Purdie2014-08-041-1/+1
| | | | | | | | | | The change to handle SDKs of different types resulted in the signatures becoming SDK specific which wasn't intended. Exclude the variable from the hash values to avoid this. (From OE-Core rev: add7b9cb20282f837c90a785f04ca690a9bbe87e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: Fix warning for odctools-crosssdkRichard Purdie2014-08-031-1/+1
| | | | | | | | | odcctools-crosssdk doesn't use the suffixed naming the rest of crosssdk does and this results in a annoying build warning. Avoid this. (From OE-Core rev: b6b66f987168615598c980996a1692ca5753b4eb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Allow switching between linux and non-linux SDK builds within the ↵Richard Purdie2014-08-031-1/+1
| | | | | | | | | | | | | | | same tmpdir Currently if you try and switch between linux/darwin/mingw SDK builds in the same TMPDIR, things break. This is due to sstate not reflecting the SDK_OS in the manifest names. Since they are different, reflect this in the manifest naming and allow this to work. (From OE-Core rev: 7a0e1233ba196797f5f9bf862685dfae5511e751) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: Improve configure dependency code for finding m4 filesRichard Purdie2014-07-251-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have an open bug about the warnings issues in builds from an sstate cache when something like glib-2.0 gets rebuilt. The issue is that sstate is "clever" and prunes unneeded dependencies out the tree. For example is X depends on pkgconfig-native but we've already build X and installed it from sstate, it will not get installed when you build Y which depends on X. This patch changes the logic to match the sstate behaviour and prune out unnecessary dependencies from the scope of aclocal. This in turn removes the warning about missing manifest files. The issue is that this patch exposes holes in our DEPENDS in recipes, specifically that some native tools are not listed, specifically, and problematically, pkgconfig, gtk-doc and intltool-native in particular. I've sent out patches against OE-Core that address the bulk of the issues there however I'm conscious this is probably going to a bug issue in other layers and may be too annoying to consider at this point. The other alternative is simply to turn the warning into a debug statement. I appreciate the code below has commented blocks, this is simply debug I've left around for now. It will be cleaned from any final version. (From OE-Core rev: 6d2dc279faa8b28a00895dc6a620d80e2dbac685) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: Enhance sed regexp to avoid extra subshellMatthieu Crapet2014-07-251-1/+1
| | | | | | | | | | head -n1 can be done using sed. (From OE-Core rev: 38d50331acbc1e279449ae6b313ff0116b6c44e8) Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: remove autotools_set_crosscompilingRoss Burton2014-07-031-7/+0
| | | | | | | | | | | The only reference to this function is a commented-out assignment, and nothing in oe-core nor meta-oe uses autotools_set_crosscompiling directly. As it's unused, remove it. (From OE-Core rev: adaa0568390d0dfef1c4d87809601aab85299e97) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* binutils/gcc/gdb: Add TARGET_ARCH to PN for all cross recipesRichard Purdie2014-04-301-1/+1
| | | | | | | | | This allows them to co-exist together in the native sysroot, with one set of cross tools per target architecture. (From OE-Core rev: a2c5509520d5c3e082f55844e6545d0309565f8f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: Enable separate builddir by defaultRichard Purdie2014-04-241-0/+2
| | | | | | (From OE-Core rev: baf5b230af919b6b0fd14ac5fc3e734bf7c464d5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: Exclude variables from autotools_copy_aclocalsRichard Purdie2014-03-181-1/+1
| | | | | | | | | | | | The autotools aclocal copy function should not depend on various variables, these are accounted for in other parts of the system. Therefore exclude them. This was causing differences in sstate checksums between different systems and meaning the sstate cache wasn't being reused as much as it should. (From OE-Core rev: b7193fadb1a53c86ffe4982a2fa9c1179a74de46) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* alsa-tools/autotools: Ensure that aclocal files can be present with ↵Richard Purdie2014-03-051-1/+2
| | | | | | | | | | | | | AUTOTOOLS_COPYACLOCAL variable Introduce a AUTOTOOLS_COPYACLOCAL variable which forces the copy of the aclocal files even when a configure.ac/.in file isn't present. Use this new feature in alsa-tools. (From OE-Core rev: 07db5222a970e40bff51c5df793f0021b0e2aba8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: Limit aclocal files to those in dependenciesRichard Purdie2014-03-051-18/+40
| | | | | | | | | | | | | | | | We still occasionally see race issues with cp-noerror, and it copies too many files, we should limit the the m4 files to those explicitly in the DEPENDS for the recipe. This change takes advantage of the BB_TASKDEPDATA data from bitbake to only copy in those files listed in the manifest of the recipes in DEPENDS. I've had this testing locally for some time, its ready for wider review/testing. (From OE-Core rev: 79ea036de331bde65a88fb777647dc099ef05acf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: Remove .la files if rebuilding non out of tree softwareRichard Purdie2013-09-171-4/+10
| | | | | | (From OE-Core rev: bcf83bb604906361db98003127b90c422e822322) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: force copy Makefile.in.in to ${S}/po/Roy.Li2013-06-281-1/+1
| | | | | | | | | | If a Makefile.in.in has existed under ${S}/po/ and is read-only, cp will fail. (From OE-Core rev: 6e1b17f19411ed897c53ae0ef41a2d2972a9c113) Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: Factor out aclocal copying functionRichard Purdie2013-06-041-15/+22
| | | | | | | | | | | Some recipes may need to manually call the aclocal copying functionality so factor this out into a function. (From OE-Core rev: a5a08543c8cec43d993b2bba0ad6a9357c0a5e04) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: add EXTRACONFFUNCS variableConstantin Musca2013-02-011-1/+3
| | | | | | | | | | | | | - add EXTRACONFFUNCS variable in order to make it possible to inject tasks after autotools_preconfigure (From OE-Core rev: eafaeee58ab7a8f0613f54b8411f41ccefdf94c3) (From OE-Core rev: d7950a25eda96a271aa6d541e03177d47e533f3f) Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: copy also remove-potcdate.sin from ↵Martin Jansa2012-12-171-0/+3
| | | | | | | | | | | | | | | | | | ${STAGING_DATADIR_NATIVE}/gettext/po * some packages (e.g. uptime, cpu, forecasts, news from meta-efl) don't have remove-potcdate.sin in po subdirectory, but Makefile.in.in supplied by autotools.bbclass depends on it and fails without like this: | make[3]: Entering directory `/OE/shr-core/tmp-eglibc/work/x86_64-oe-linux/uptime/0.0.2+svnr80477-r0.0/E-MODULES-EXTRA/uptime/po' | make[3]: *** No rule to make target `remove-potcdate.sin', needed by `remove-potcdate.sed'. Stop. | make[3]: Leaving directory `/OE/shr-core/tmp-eglibc/work/x86_64-oe-linux/uptime/0.0.2+svnr80477-r0.0/E-MODULES-EXTRA/uptime/po' | make[2]: *** [uptime.pot] Error 2 (From OE-Core rev: 5a3116638394dc72c54cf5d4f8bd42a7be0b1768) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: set _FOR_BUILD variables hereRoss Burton2012-11-121-0/+15
| | | | | | | (From OE-Core rev: edf30561184ec42e5692a55fdf93304fac0fdb1b) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: Use STAGING_DATADIR_NATIVE for config.rpathRichard Purdie2012-10-191-2/+2
| | | | | | | | | | | For builds that don't use gettext, config.rpath may not exist in the target datadir. This change uses the native directory where it will always be present due to gettext-minimal-native (which allows us to autoreconf recipes using gettext even if we don't have gettext built). (From OE-Core rev: 0ea24447842e6b76ccfee0881f557e1a82e89ef1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: Fix gettext macro versions issuesRichard Purdie2012-10-181-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | gettext m4 macros don't use the usual versioning/serial mechanism used by aclocal. It therefore won't update them over and above any local version of the macro. Equally, we don't run gettextize due to it doing slightly crazy things to the build. When we put the aclocal directory as a -I option to aclocal, if this was found first compared to any recipe provided macros, the correct version of the gettext macro would still "win". With the switch so correctly override the system directory, older recipe provided macros may get used. This patch manually removes the problematic m4 macros in the case we're using gettext and need to use the correct m4 macros. This patch also always ensures the gettext manipulations happen, even in the -native case since missing or stale gettext files could cause build failures. (From OE-Core rev: e9645d2bbeabaa5251d49edd659ab320fd66d0ee) (From OE-Core rev: 841ea3c1c18e50e77fccbd5f44d6a79a50913b67) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: Fix race over aclocal macro directoryRichard Purdie2012-10-181-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | The previous steps taken to address races over the aclocal macro directory and the removal of files hasn't been sufficient since aclocal still looks at that directory as part of its default search path. This patch passes the aclocal-copy directory into aclocal as its system directory, removing any chance of it accessing the original aclocal directory. Hopefully this should therefore fix the race issues once and for all. In order to do this, cp-noerror needs to not error if the directory already exists. Its also been noticed that aclocal defaults to using STAGING_DATADIR_NATIVE even when building for the target. Only using the target directory would cause errors such as missing pkgconfig macros (since we only depend on pkgconfig-native, not pkgconfig). This patch processes both sets of macros maintaining existing behaviour. At a future date we could look into potentially optimsing this. [YOCTO #3216] (From OE-Core rev: ad29b331e0d61708e68ef772cdb19154956fa67e) (From OE-Core rev: f362cc419e5a480acd16c71c802636dbedc932d9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "autotools.bbclass: using relative paths for acpaths"Richard Purdie2012-09-271-2/+1
| | | | | | | | | | | This reverts commit aa66ef6598c84231577d139ec7be413e73fac2b1 since bdwgc-native fails to build after it. Anything which runs with a sub-configure will fail after this change. It therefore needs rethinking. (From OE-Core rev: f95a9e2c292a1551861220270838cf1eaaba85b9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: using relative paths for acpathsWenzong Fan2012-09-271-1/+2
| | | | | | | | | | | | | | | | | | Fix autotools.bbclass to use relative paths for acpaths instead of absolute ones. Since absolute paths may cause potential autoreconf error like: Can't exec "/bin/sh": Argument list too long ... This error occurs while building coreutils with long TMPDIR, because it has bunch of m4 files need to be expanded. [YOCTO #2766] (From OE-Core rev: aa66ef6598c84231577d139ec7be413e73fac2b1) Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: Remove special handling for autoconf* and automake*Phil Blundell2012-09-241-83/+75
| | | | | | | | | | | | | | | | | For reasons that are now shrouded in obscurity, autotools.bbclass has long contained a special heuristic to avoid attempting to run autoreconf when building autoconf or automake themselves. However, the wildcard test against PN which is used there is problematic when trying to build another package whose name happens to start with "autoconf", and in any case it is silly to do this test at runtime for every package. The individual recipes for autoconf and automake can just as easily suppress the behaviour that they don't want by providing a custom do_configure() method which just runs configure. (From OE-Core rev: a87db6f8dea71cbb7ead9285ff8af0e28cf75604) Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: Add functionality to force a clean of ${B} when ↵Richard Purdie2012-09-121-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reconfiguring (and ${S} != ${B}) Unfortunately whilst rerunning configure and make against a project will mostly work there are situations where it does not correctly do the right thing. In particular, eglibc and gcc will fail out with errors where settings do not match a previously built configuration. It could be argued they are broken but the situation is what it is. There is the possibility of more subtle errors too. This patch adds removal of the build directory (${B}) when configure is rerunning, the sstate checksum for do_configure has changed and ${S} != ${B}. We could simply use a stamp but saving out the previous configuration checksum adds some data at no real overhead. If we find there are things where we want to disable this behaviour with CONFIGURESTAMPFILE = "" in the recipe, or users could disable it globally. [YOCTO #2774] [YOCTO #2848] This is particularly helpful for eglibc and gcc which use split builds by default and are a particular source of reconfigure type problems. (From OE-Core rev: f15f61af77cc4e52a037f509f8e49e1ea530cf35) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert tab indentation in python functions into four-spaceRichard Purdie2012-07-191-19/+19
| | | | | | (From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: When configure fails, dump the config.log files the logsRichard Purdie2012-07-031-1/+8
| | | | | | | | | | | | | | | | | When configure fails, it usually says "see config.log" yet nobody ever shares the config.log file meaning the person trying to help invariably has to ask for more information. This patch dumps all the config.log files into the main bitbake log files when configure fails, meaning all the information is present to help someone debug such failures. It does make the log rather larger but this is preferable to not having enough information in most cases. [YOCTO #2463] (From OE-Core rev: 7ad08f5b73aa949a877adc5641b4bb1d007de750) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/cp-noerror: Add a special copy function to fix autotools issuesRichard Purdie2012-05-301-2/+1
| | | | | | | | | | | | | | | | | | | Currently we copy the aclocal directory to the build so that autotools doesn't see .m4 files disappear when its processing them. This can happen if for example, package X is being rebuilt at the same time as Y and it gets uninstalled from sstate (assuming there are no dependencies between X and Y). This code making the copy was added to avoid races but introduces a race of its own, namely that the files can disappear during the copy. This patch adds a cp-noerror script which silently ignores such errors and gives the behaviour we need in this case. It hence fixes issues which crop up for users and the autobuilder occasionally. [YOCTO #2485] (From OE-Core rev: 0f81fbc0df73675aeb79c724858799a3b6a02f85) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: Drop -nativesdk dependency to lib-cross.Lianhao Lu2012-03-311-0/+1
| | | | | | | | | | | -nativesdk recipes should not have dependency to lib-cross, which is never used. This unnecessary dependency would result different task hash values in sstate for different MACHINE settings. (From OE-Core rev: 313deb802c5411c6c88655057f05a7d8823d999c) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)Richard Purdie2012-03-051-3/+3
| | | | | | | | | | | | Using "1" with getVar is bad coding style and "True" is preferred. This patch is a sed over the meta directory of the form: sed \ -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \ -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \ -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: Make builds deterministicRichard Purdie2012-02-241-0/+2
| | | | | | | | | | | | | We need to ensure any aclocal-copy directory is removed before we s earch for .m4 files, else the locations .m4 files are found from can vary depending on whether its the first or second time we run configure. Clearing any existing aclocal-copy directory before we start resolves this issue and makes builds deterministic again. (From OE-Core rev: 673e2a05013cbe08efde936f663845031025689d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: Don't copy into non-existant directoryAndreas Oberritter2012-02-231-1/+1
| | | | | | | | | | | | | | | | * If configure.ac contains AM_GNU_GETTEXT and po/Makefile.in.in doesn't exist, autotools_do_configure() copies a local version of Makefile.in.in to this location. If the directory 'po' doesn't exist, the function aborts. * This patch verifies that the directory exists before copying a file to it. This fixes libcddb, which uses AM_GNU_GETTEXT, but has no 'po' directory. (From OE-Core rev: ba175bdfe85d701298d28e5190e55207420a24e8) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: Introduce CACHED_CONFIGUREVARSKhem Raj2012-01-101-1/+1
| | | | | | | | | | | | | | | | | | This variable is for holding the cached configure variables to be specified in recipes. e.g. CACHED_CONFIGUREVARS += "ac_cv_foo=yes ac_cv_bar=no" This will make sure that the variables are not detected by configure. This is useful in cross builds where some features can not be detected correctly by configure and having it as a variables gives us capability to override it (From OE-Core rev: e48fd42e047f46399828a074c5125a0ce9c3f56f) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: fix cp error for empty dirNitin A Kamble2012-01-031-1/+3
| | | | | | | | | | | | | | | | | the .../usr/share/aclocal is empty for build from scratch. so avoid cp error if the directory is empty. Fixes this error, which is thrown before pseudo is built: | cp: cannot stat `/builddisk/build/build0/tmp/sysroots/x86_64-linux/usr/share/aclocal/*': No such file or directory NOTE: package libtool-native-2.4.2-r0.0: task do_configure: Failed (From OE-Core rev: f4ffe39450c3da33b24766a5f83ad06cc8ff950c) Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: Report the missing configure pathDarren Hart2011-11-301-4/+5
| | | | | | | | | | | If the configure script isn't found, report the explicit path tried. This can help debug subtle errors where the ${S} sourcedir may not be exactly what is expected. (From OE-Core rev: 8cdee4c9b8ffcba69134258eff72eede61acd12f) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie2011-11-101-3/+3
| | | | | | | | | | | | | | | | | This is the result of running the following over the metadata: sed \ -e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \ -e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data *` (From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: fix multi-word arguments for EXTRA_OECONFChristopher Larson2011-10-141-4/+2
| | | | | | | | | | | | This is needed to better support things like the following (with a multi-word BUILD_CC): EXTRA_OECONF += '"ac_cv_prog_CC_FOR_BUILD=${BUILD_CC}"' (From OE-Core rev: 38a394e7ffedccfabda085c97add8944718943c2) Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: Enhance gettext handling to better work with SCM versions of codeRichard Purdie2011-10-141-1/+7
| | | | | | | | | | | | | | | | | If we pull SCM based code using gettext, Makefile.in.in in the po directory can be missing. We therefore need to add this if its not already present. We could use gettextize if it wasn't so broken (for example requiring user input on stdin and installing way more files that we ever care about such as the m4 files). We also have a problem if a recipe sets a different AUX dir, for now fix this by allowing recipes to specify when this is being done using the AUTOTOOLS_AUXDIR variable. Ultimately we could likely figure this out automatically. (From OE-Core rev: acaefad1aa4b45813a004e0cd1d85bc013e435f4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>