aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/autotools.bbclass
AgeCommit message (Collapse)Author
2014-10-30autotools: Use make clean for builds not supporting B != SRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23classes/autotools: avoid error if recipe is first in task dependency treePaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-04autotools: Exclude SDK_OS from autotools task signaturesRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-03autotools: Fix warning for odctools-crosssdkRichard Purdie
odcctools-crosssdk doesn't use the suffixed naming the rest of crosssdk does and this results in a annoying build warning. Avoid this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-03sstate: Allow switching between linux and non-linux SDK builds within the ↵Richard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25autotools: Improve configure dependency code for finding m4 filesRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25autotools.bbclass: Enhance sed regexp to avoid extra subshellMatthieu Crapet
head -n1 can be done using sed. 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>
2014-07-03autotools.bbclass: remove autotools_set_crosscompilingRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-30binutils/gcc/gdb: Add TARGET_ARCH to PN for all cross recipesRichard Purdie
This allows them to co-exist together in the native sysroot, with one set of cross tools per target architecture. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-23autotools: Enable separate builddir by defaultRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-18autotools: Exclude variables from autotools_copy_aclocalsRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05alsa-tools/autotools: Ensure that aclocal files can be present with ↵Richard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05autotools: Limit aclocal files to those in dependenciesRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17autotools: Remove .la files if rebuilding non out of tree softwareRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-27autotools.bbclass: force copy Makefile.in.in to ${S}/po/Roy.Li
If a Makefile.in.in has existed under ${S}/po/ and is read-only, cp will fail. Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-04autotools.bbclass: Factor out aclocal copying functionRichard Purdie
Some recipes may need to manually call the aclocal copying functionality so factor this out into a function. 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>
2013-02-01autotools.bbclass: add EXTRACONFFUNCS variableConstantin Musca
- add EXTRACONFFUNCS variable in order to make it possible to inject tasks after autotools_preconfigure (From OE-Core rev: eafaeee58ab7a8f0613f54b8411f41ccefdf94c3) 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>
2012-12-14autotools: copy also remove-potcdate.sin from ↵Martin Jansa
${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 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-11-12autotools: set _FOR_BUILD variables hereRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-19autotools: Use STAGING_DATADIR_NATIVE for config.rpathRichard Purdie
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). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-18autotools.bbclass: Fix gettext macro versions issuesRichard Purdie
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) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-18autotools: Fix race over aclocal macro directoryRichard Purdie
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) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27Revert "autotools.bbclass: using relative paths for acpaths"Richard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27autotools.bbclass: using relative paths for acpathsWenzong Fan
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] Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24autotools: Remove special handling for autoconf* and automake*Phil Blundell
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. Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-12autotools.bbclass: Add functionality to force a clean of ${B} when ↵Richard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-19Convert tab indentation in python functions into four-spaceRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-03autotools.bbclass: When configure fails, dump the config.log files the logsRichard Purdie
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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30scripts/cp-noerror: Add a special copy function to fix autotools issuesRichard Purdie
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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-31autotools.bbclass: Drop -nativesdk dependency to lib-cross.Lianhao Lu
-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. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)Richard Purdie
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>
2012-02-24autotools.bbclass: Make builds deterministicRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-23autotools.bbclass: Don't copy into non-existant directoryAndreas Oberritter
* 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. Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
2012-01-09autotools.bbclass: Introduce CACHED_CONFIGUREVARSKhem Raj
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 Signed-off-by: Khem Raj <raj.khem@gmail.com>
2012-01-03autotools.bbclass: fix cp error for empty dirNitin A Kamble
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 Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2011-11-30autotools.bbclass: Report the missing configure pathDarren Hart
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. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie
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 *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-14autotools: fix multi-word arguments for EXTRA_OECONFChristopher Larson
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}"' Signed-off-by: Christopher Larson <kergoth@gmail.com>
2011-10-14autotools: Enhance gettext handling to better work with SCM versions of codeRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-05autotools.bbclass: Allow dependency tracking option to be easily overriddenRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-30autotools: Disable dependency trackingRichard Purdie
There is no point in us spending time generating a ton of dependency information in source directories when we don't actually use it for our one off builds. We might as well disable the option and take the speed up. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-30Remove help2man dependencyRichard Purdie
The help2man script is pretty useless to us. It requires to run the target binary to extract help information which is not possible for any of our cross compiled target binaries. We're not interested in man pages for -cross/-native tools. It therefore makes no sense to have this as a core build dependency. This patch removes the dependeny and replaces it with a script returning false. This will trigger autotool's missing utility to use the copy of the man page included with the sources which is what would already happen when we tried to run cross compiled binaries anyway. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-26autotools.bbclass: Set the dynamic linker search path for libtool correctlyRichard Purdie
libtool obtains the search path from /etc/ld.so.conf and hardcodes /usr/lib and /lib. This results in host contamination and variable sets of RPATH values ending up in binaries. By exporting the correct values for all autotools recipes we avoid this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-03autotools.bbclass: Fix m4 file raceRichard Purdie
If something removes .m4 files from the aclocal directory whilst aclocal is running it gets upset. To avoid this we need to take a copy of the aclocal directory and build against this instead. [YOCTO #861] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27multilib: Add support for compiling recipes against multiple ABIsRichard Purdie
This patch adds the core multilib class which can be used along with a parameter specifying the mutlilib to use in BBCLASSEXTEND. The MLPREFIX variable is added and can be used in cases where its too difficult to dynmaically work out where a mutltilib prefix is needed to be added to a variable. This includes: * SHLIBSDIR and PACKAGE_ARCH fixes from Lianhao Lu. * PACKAGE_DYNAMIC mapping from Yu Ke * PACKAGE_INSTALL mapping from Yu Ke * RPROVIDES mapping from Yu Ke * TARGET_VENDOR fix from Mark Hatle * Ignorning *-native-runtime dependnecies as well as *-native from Yu Ke * Map PKG and ALLOW_EMPTY from Dongxiao Xu * Ensure RCONFLICTS and PKG field dependencies are remapped (from Dongxiao Xu) * Ensure PN and MLPREFIX are set at the same time to ensure consistent BPN values (Yu Ke) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com> Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-20autotools.bbclass: Add help2man-native to the main DEPENDS treeTom Rini
With help2man no longer being required by sanity.bbclass we need to make sure that if we are going to build autotools stuff that help2man will be there as it's a frequent implicit dependency. Signed-off-by: Tom Rini <tom_rini@mentor.com>
2011-06-09native/nativesdk: Clean up the depends ordering after bitbake override ↵Richard Purdie
handling updates This massively cleans up the dependency handling in the two classes when interacting with BBCLASSEXTEND. This change has a dependency on the bitbake override handling change and also the existence of the RecipePreFinalise event. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-04logging: update existing oe* logging users to the bb* interfaceDarren Hart
The new bash logging class provides bbnote, bbwarn, bbfatal, and bbdebug replacements (as well as bbplain and bberror) for the oe* equivalents. Use the new bb* API in preparation to delete the oe* logging API. This patch was automatically generated by a sed script. The result has been visually inspected and used to build core-image-sato for qemux86. Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2011-04-28autotools.bbclass: Copy gettext files only if --disable-nls is not setKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2011-04-12autotools: Pass --disable-silent-rules to configureColin Walters
Non-verbose logs are really annoying when trying to debug a build failure. A lot of projects are copying in the flag to use AM_SILENT_RULES which automake gained recently. We need to undo this. We'll get a warning from configure if it's not recognized, but that's fine. Signed-off-by: Saul Wold <sgw@linux.intel.com>