Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | def autotools_dep_prepend(d): |
| 2 | if d.getVar('INHIBIT_AUTOTOOLS_DEPS', True): |
| 3 | return '' |
| 4 | |
| 5 | pn = d.getVar('PN', True) |
| 6 | deps = '' |
| 7 | |
| 8 | if pn in ['autoconf-native', 'automake-native', 'help2man-native']: |
| 9 | return deps |
| 10 | deps += 'autoconf-native automake-native ' |
| 11 | |
| 12 | if not pn in ['libtool', 'libtool-native'] and not pn.endswith("libtool-cross"): |
| 13 | deps += 'libtool-native ' |
| 14 | if not bb.data.inherits_class('native', d) \ |
| 15 | and not bb.data.inherits_class('nativesdk', d) \ |
| 16 | and not bb.data.inherits_class('cross', d) \ |
| 17 | and not d.getVar('INHIBIT_DEFAULT_DEPS', True): |
| 18 | deps += 'libtool-cross ' |
| 19 | |
| 20 | return deps + 'gnu-config-native ' |
| 21 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 22 | DEPENDS_prepend = "${@autotools_dep_prepend(d)} " |
| 23 | |
| 24 | inherit siteinfo |
| 25 | |
| 26 | # Space separated list of shell scripts with variables defined to supply test |
| 27 | # results for autoconf tests we cannot run at build time. |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 28 | export CONFIG_SITE = "${@siteinfo_get_files(d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 29 | |
| 30 | acpaths = "default" |
| 31 | EXTRA_AUTORECONF = "--exclude=autopoint" |
| 32 | |
| 33 | export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} ${base_libdir}" |
| 34 | |
| 35 | # When building tools for use at build-time it's recommended for the build |
| 36 | # system to use these variables when cross-compiling. |
| 37 | # (http://sources.redhat.com/autobook/autobook/autobook_270.html) |
| 38 | export CPP_FOR_BUILD = "${BUILD_CPP}" |
| 39 | export CPPFLAGS_FOR_BUILD = "${BUILD_CPPFLAGS}" |
| 40 | |
| 41 | export CC_FOR_BUILD = "${BUILD_CC}" |
| 42 | export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}" |
| 43 | |
| 44 | export CXX_FOR_BUILD = "${BUILD_CXX}" |
| 45 | export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}" |
| 46 | |
| 47 | export LD_FOR_BUILD = "${BUILD_LD}" |
| 48 | export LDFLAGS_FOR_BUILD = "${BUILD_LDFLAGS}" |
| 49 | |
| 50 | def append_libtool_sysroot(d): |
| 51 | # Only supply libtool sysroot option for non-native packages |
| 52 | if not bb.data.inherits_class('native', d): |
| 53 | return '--with-libtool-sysroot=${STAGING_DIR_HOST}' |
| 54 | return "" |
| 55 | |
| 56 | CONFIGUREOPTS = " --build=${BUILD_SYS} \ |
| 57 | --host=${HOST_SYS} \ |
| 58 | --target=${TARGET_SYS} \ |
| 59 | --prefix=${prefix} \ |
| 60 | --exec_prefix=${exec_prefix} \ |
| 61 | --bindir=${bindir} \ |
| 62 | --sbindir=${sbindir} \ |
| 63 | --libexecdir=${libexecdir} \ |
| 64 | --datadir=${datadir} \ |
| 65 | --sysconfdir=${sysconfdir} \ |
| 66 | --sharedstatedir=${sharedstatedir} \ |
| 67 | --localstatedir=${localstatedir} \ |
| 68 | --libdir=${libdir} \ |
| 69 | --includedir=${includedir} \ |
| 70 | --oldincludedir=${oldincludedir} \ |
| 71 | --infodir=${infodir} \ |
| 72 | --mandir=${mandir} \ |
| 73 | --disable-silent-rules \ |
| 74 | ${CONFIGUREOPT_DEPTRACK} \ |
| 75 | ${@append_libtool_sysroot(d)}" |
| 76 | CONFIGUREOPT_DEPTRACK ?= "--disable-dependency-tracking" |
| 77 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 78 | CACHED_CONFIGUREVARS ?= "" |
| 79 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 80 | AUTOTOOLS_SCRIPT_PATH ?= "${S}" |
| 81 | CONFIGURE_SCRIPT ?= "${AUTOTOOLS_SCRIPT_PATH}/configure" |
| 82 | |
| 83 | AUTOTOOLS_AUXDIR ?= "${AUTOTOOLS_SCRIPT_PATH}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 84 | |
| 85 | oe_runconf () { |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 86 | # Use relative path to avoid buildpaths in files |
| 87 | cfgscript_name="`basename ${CONFIGURE_SCRIPT}`" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 88 | cfgscript=`python3 -c "import os; print(os.path.relpath(os.path.dirname('${CONFIGURE_SCRIPT}'), '.'))"`/$cfgscript_name |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 89 | if [ -x "$cfgscript" ] ; then |
| 90 | bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 91 | if ! ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"; then |
| 92 | bbnote "The following config.log files may provide further information." |
| 93 | bbnote `find ${B} -ignore_readdir_race -type f -name config.log` |
| 94 | bbfatal_log "configure failed" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 95 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 96 | else |
| 97 | bbfatal "no configure script found at $cfgscript" |
| 98 | fi |
| 99 | } |
| 100 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 101 | CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate" |
| 102 | |
| 103 | autotools_preconfigure() { |
| 104 | if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then |
| 105 | if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" ]; then |
| 106 | if [ "${S}" != "${B}" ]; then |
| 107 | echo "Previously configured separate build directory detected, cleaning ${B}" |
| 108 | rm -rf ${B} |
Patrick Williams | d7e9631 | 2015-09-22 08:09:05 -0500 | [diff] [blame] | 109 | mkdir -p ${B} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 110 | else |
| 111 | # At least remove the .la files since automake won't automatically |
| 112 | # regenerate them even if CFLAGS/LDFLAGS are different |
| 113 | cd ${S} |
| 114 | if [ "${CLEANBROKEN}" != "1" -a \( -e Makefile -o -e makefile -o -e GNUmakefile \) ]; then |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 115 | oe_runmake clean |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 116 | fi |
| 117 | find ${S} -ignore_readdir_race -name \*.la -delete |
| 118 | fi |
| 119 | fi |
| 120 | fi |
| 121 | } |
| 122 | |
| 123 | autotools_postconfigure(){ |
| 124 | if [ -n "${CONFIGURESTAMPFILE}" ]; then |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 125 | mkdir -p `dirname ${CONFIGURESTAMPFILE}` |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 126 | echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE} |
| 127 | fi |
| 128 | } |
| 129 | |
| 130 | EXTRACONFFUNCS ??= "" |
| 131 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 132 | EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}" |
| 133 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 134 | do_configure[prefuncs] += "autotools_preconfigure autotools_copy_aclocals ${EXTRACONFFUNCS}" |
| 135 | do_configure[postfuncs] += "autotools_postconfigure" |
| 136 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 137 | ACLOCALDIR = "${WORKDIR}/aclocal-copy" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 138 | |
| 139 | python autotools_copy_aclocals () { |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 140 | import copy |
| 141 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 142 | s = d.getVar("AUTOTOOLS_SCRIPT_PATH", True) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 143 | if not os.path.exists(s + "/configure.in") and not os.path.exists(s + "/configure.ac"): |
| 144 | if not d.getVar("AUTOTOOLS_COPYACLOCAL", False): |
| 145 | return |
| 146 | |
| 147 | taskdepdata = d.getVar("BB_TASKDEPDATA", False) |
| 148 | #bb.warn(str(taskdepdata)) |
| 149 | pn = d.getVar("PN", True) |
| 150 | aclocaldir = d.getVar("ACLOCALDIR", True) |
| 151 | oe.path.remove(aclocaldir) |
| 152 | bb.utils.mkdirhier(aclocaldir) |
| 153 | start = None |
| 154 | configuredeps = [] |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 155 | # Detect bitbake -b usage |
| 156 | # Everything but quilt-native would have dependencies |
| 157 | nodeps = (pn != "quilt-native") |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 158 | |
| 159 | for dep in taskdepdata: |
| 160 | data = taskdepdata[dep] |
| 161 | if data[1] == "do_configure" and data[0] == pn: |
| 162 | start = dep |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 163 | if not nodeps and start: |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 164 | break |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 165 | if nodeps and data[0] != pn: |
| 166 | nodeps = False |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 167 | if start is None: |
| 168 | bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?") |
| 169 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 170 | # We need to figure out which m4 files we need to expose to this do_configure task. |
| 171 | # This needs to match what would get restored from sstate, which is controlled |
| 172 | # ultimately by calls from bitbake to setscene_depvalid(). |
| 173 | # That function expects a setscene dependency tree. We build a dependency tree |
| 174 | # condensed to do_populate_sysroot -> do_populate_sysroot dependencies, similar to |
| 175 | # that used by setscene tasks. We can then call into setscene_depvalid() and decide |
| 176 | # which dependencies we can "see" and should expose the m4 files for. |
| 177 | setscenedeps = copy.deepcopy(taskdepdata) |
| 178 | |
| 179 | start = set([start]) |
| 180 | |
| 181 | # Create collapsed do_populate_sysroot -> do_populate_sysroot tree |
| 182 | for dep in taskdepdata: |
| 183 | data = setscenedeps[dep] |
| 184 | if data[1] != "do_populate_sysroot": |
| 185 | for dep2 in setscenedeps: |
| 186 | data2 = setscenedeps[dep2] |
| 187 | if dep in data2[3]: |
| 188 | data2[3].update(setscenedeps[dep][3]) |
| 189 | data2[3].remove(dep) |
| 190 | if dep in start: |
| 191 | start.update(setscenedeps[dep][3]) |
| 192 | start.remove(dep) |
| 193 | del setscenedeps[dep] |
| 194 | |
| 195 | # Remove circular references |
| 196 | for dep in setscenedeps: |
| 197 | if dep in setscenedeps[dep][3]: |
| 198 | setscenedeps[dep][3].remove(dep) |
| 199 | |
| 200 | # Direct dependencies should be present and can be depended upon |
| 201 | for dep in start: |
| 202 | configuredeps.append(setscenedeps[dep][0]) |
| 203 | |
| 204 | # Call into setscene_depvalid for each sub-dependency and only copy m4 files |
| 205 | # for ones that would be restored from sstate. |
| 206 | done = list(start) |
| 207 | next = list(start) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 208 | while next: |
| 209 | new = [] |
| 210 | for dep in next: |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 211 | data = setscenedeps[dep] |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 212 | for datadep in data[3]: |
| 213 | if datadep in done: |
| 214 | continue |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 215 | taskdeps = {} |
| 216 | taskdeps[dep] = setscenedeps[dep][:2] |
| 217 | taskdeps[datadep] = setscenedeps[datadep][:2] |
| 218 | retval = setscene_depvalid(datadep, taskdeps, [], d) |
| 219 | if retval: |
| 220 | bb.note("Skipping setscene dependency %s for m4 macro copying" % datadep) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 221 | continue |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 222 | done.append(datadep) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 223 | new.append(datadep) |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 224 | configuredeps.append(setscenedeps[datadep][0]) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 225 | next = new |
| 226 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 227 | cp = [] |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 228 | if nodeps: |
| 229 | bb.warn("autotools: Unable to find task dependencies, -b being used? Pulling in all m4 files") |
| 230 | for l in [d.expand("${STAGING_DATADIR_NATIVE}/aclocal/"), d.expand("${STAGING_DATADIR}/aclocal/")]: |
| 231 | cp.extend(os.path.join(l, f) for f in os.listdir(l)) |
| 232 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 233 | for c in configuredeps: |
| 234 | if c.endswith("-native"): |
| 235 | manifest = d.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}-%s.populate_sysroot" % c) |
| 236 | elif c.startswith("nativesdk-"): |
| 237 | manifest = d.expand("${SSTATE_MANIFESTS}/manifest-${SDK_ARCH}_${SDK_OS}-%s.populate_sysroot" % c) |
| 238 | elif "-cross-" in c or "-crosssdk" in c: |
| 239 | continue |
| 240 | else: |
| 241 | manifest = d.expand("${SSTATE_MANIFESTS}/manifest-${MACHINE}-%s.populate_sysroot" % c) |
| 242 | try: |
| 243 | f = open(manifest, "r") |
| 244 | for l in f: |
| 245 | if "/aclocal/" in l and l.strip().endswith(".m4"): |
| 246 | cp.append(l.strip()) |
| 247 | elif "config_site.d/" in l: |
| 248 | cp.append(l.strip()) |
| 249 | except: |
| 250 | bb.warn("%s not found" % manifest) |
| 251 | |
| 252 | for c in cp: |
| 253 | t = os.path.join(aclocaldir, os.path.basename(c)) |
| 254 | if not os.path.exists(t): |
| 255 | os.symlink(c, t) |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 256 | |
| 257 | # Refresh variable with cache files |
| 258 | d.setVar("CONFIG_SITE", siteinfo_get_files(d, aclocalcache=True)) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 259 | } |
| 260 | autotools_copy_aclocals[vardepsexclude] += "MACHINE SDK_ARCH BUILD_ARCH SDK_OS BB_TASKDEPDATA" |
| 261 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 262 | CONFIGURE_FILES = "${S}/configure.in ${S}/configure.ac ${S}/config.h.in ${S}/acinclude.m4 Makefile.am" |
| 263 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 264 | autotools_do_configure() { |
| 265 | # WARNING: gross hack follows: |
| 266 | # An autotools built package generally needs these scripts, however only |
| 267 | # automake or libtoolize actually install the current versions of them. |
| 268 | # This is a problem in builds that do not use libtool or automake, in the case |
| 269 | # where we -need- the latest version of these scripts. e.g. running a build |
| 270 | # for a package whose autotools are old, on an x86_64 machine, which the old |
| 271 | # config.sub does not support. Work around this by installing them manually |
| 272 | # regardless. |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 273 | |
| 274 | PRUNE_M4="" |
| 275 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 276 | for ac in `find ${S} -ignore_readdir_race -name configure.in -o -name configure.ac`; do |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 277 | rm -f `dirname $ac`/configure |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 278 | done |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 279 | if [ -e ${AUTOTOOLS_SCRIPT_PATH}/configure.in -o -e ${AUTOTOOLS_SCRIPT_PATH}/configure.ac ]; then |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 280 | olddir=`pwd` |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 281 | cd ${AUTOTOOLS_SCRIPT_PATH} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 282 | ACLOCAL="aclocal --system-acdir=${ACLOCALDIR}/" |
| 283 | if [ x"${acpaths}" = xdefault ]; then |
| 284 | acpaths= |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 285 | for i in `find ${AUTOTOOLS_SCRIPT_PATH} -ignore_readdir_race -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 286 | grep -v 'acinclude.m4' | sed -e 's,\(.*/\).*$,\1,'|sort -u`; do |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 287 | acpaths="$acpaths -I $i" |
| 288 | done |
| 289 | else |
| 290 | acpaths="${acpaths}" |
| 291 | fi |
| 292 | AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]\+$//};q'` |
| 293 | automake --version |
| 294 | echo "AUTOV is $AUTOV" |
| 295 | if [ -d ${STAGING_DATADIR_NATIVE}/aclocal-$AUTOV ]; then |
| 296 | ACLOCAL="$ACLOCAL --automake-acdir=${STAGING_DATADIR_NATIVE}/aclocal-$AUTOV" |
| 297 | fi |
| 298 | # autoreconf is too shy to overwrite aclocal.m4 if it doesn't look |
| 299 | # like it was auto-generated. Work around this by blowing it away |
| 300 | # by hand, unless the package specifically asked not to run aclocal. |
| 301 | if ! echo ${EXTRA_AUTORECONF} | grep -q "aclocal"; then |
| 302 | rm -f aclocal.m4 |
| 303 | fi |
| 304 | if [ -e configure.in ]; then |
| 305 | CONFIGURE_AC=configure.in |
| 306 | else |
| 307 | CONFIGURE_AC=configure.ac |
| 308 | fi |
| 309 | if grep "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then |
| 310 | if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then |
| 311 | : do nothing -- we still have an old unmodified configure.ac |
| 312 | else |
| 313 | bbnote Executing glib-gettextize --force --copy |
| 314 | echo "no" | glib-gettextize --force --copy |
| 315 | fi |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 316 | elif grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 317 | # We'd call gettextize here if it wasn't so broken... |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 318 | cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/ |
| 319 | if [ -d ${S}/po/ ]; then |
| 320 | cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/ |
| 321 | if [ ! -e ${S}/po/remove-potcdate.sin ]; then |
| 322 | cp ${STAGING_DATADIR_NATIVE}/gettext/po/remove-potcdate.sin ${S}/po/ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 323 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 324 | fi |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 325 | PRUNE_M4="$PRUNE_M4 gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 326 | fi |
| 327 | mkdir -p m4 |
| 328 | if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 329 | if ! echo "${DEPENDS}" | grep -q intltool-native; then |
| 330 | bbwarn "Missing DEPENDS on intltool-native" |
| 331 | fi |
| 332 | PRUNE_M4="$PRUNE_M4 intltool.m4" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 333 | bbnote Executing intltoolize --copy --force --automake |
| 334 | intltoolize --copy --force --automake |
| 335 | fi |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 336 | |
| 337 | for i in $PRUNE_M4; do |
| 338 | find ${S} -ignore_readdir_race -name $i -delete |
| 339 | done |
| 340 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 341 | bbnote Executing ACLOCAL=\"$ACLOCAL\" autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths |
| 342 | ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed." |
| 343 | cd $olddir |
| 344 | fi |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 345 | if [ -e ${CONFIGURE_SCRIPT} ]; then |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 346 | oe_runconf |
| 347 | else |
| 348 | bbnote "nothing to configure" |
| 349 | fi |
| 350 | } |
| 351 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 352 | autotools_do_compile() { |
| 353 | oe_runmake |
| 354 | } |
| 355 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 356 | autotools_do_install() { |
| 357 | oe_runmake 'DESTDIR=${D}' install |
| 358 | # Info dir listing isn't interesting at this point so remove it if it exists. |
| 359 | if [ -e "${D}${infodir}/dir" ]; then |
| 360 | rm -f ${D}${infodir}/dir |
| 361 | fi |
| 362 | } |
| 363 | |
| 364 | inherit siteconfig |
| 365 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 366 | EXPORT_FUNCTIONS do_configure do_compile do_install |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 367 | |
| 368 | B = "${WORKDIR}/build" |