autotools.eclass: ensure correct mtime for aclocal check Gentoo bug: 420631 Same fix as Branko, but don't delay the build if there's no need, which is the usual case. FS access is negligible since it's being used heavily at this point in any case, and warranted for a more robust build. This means we can use the original, easier to follow check. There's no need to check for existence of trace_file: if it doesn't exist then bash gives the logical answer that aclocal.m4 is newer. While we're there, tighten up quoting of trace_file in standard style, to ease future maintenance. --- eclass/autotools.eclass 2013-01-05 02:31:15.000000000 +0000 +++ eclass/autotools.eclass 2013-01-19 21:12:53.000000000 +0000 @@ -502,10 +502,11 @@ # We can run in multiple dirs, so we have to cache the trace # data in $PWD rather than an env var. local trace_file=".__autoconf_trace_data" - if [[ ! -e ${trace_file} ]] || [[ ! aclocal.m4 -ot ${trace_file} ]] ; then + if [[ aclocal.m4 -nt ${trace_file} ]]; then WANT_AUTOCONF="2.5" autoconf \ $(autotools_m4dir_include) \ - ${ALL_AUTOTOOLS_MACROS[@]/#/--trace=} > ${trace_file} 2>/dev/null + ${ALL_AUTOTOOLS_MACROS[@]/#/--trace=} > "${trace_file}" 2>/dev/null + [[ aclocal.m4 -ot ${trace_file} ]] || { sleep 1; touch "${trace_file}"; } fi local macro args=() @@ -513,7 +514,7 @@ has ${macro} ${ALL_AUTOTOOLS_MACROS[@]} || die "internal error: add ${macro} to ALL_AUTOTOOLS_MACROS" args+=( -e ":${macro}:" ) done - grep "${args[@]}" ${trace_file} + grep "${args[@]}" "${trace_file}" } # @FUNCTION: autotools_check_macro_val