RFR: 8044733: (xs) common/autoconf/configure script doesn't properly detect missing tools
pointo1d
pointo1d at gmail.com
Wed Jun 4 18:22:06 UTC 2014
Hiya Mike ,
On 03/06/14 23:36, Mike Duigou wrote:
> Hello all;
>
> This is a small changeset to fix a problem where on some platforms (Solaris and possibly others) the configure script doesn't properly detect the absence of autoconf or mercurial because which returns a string for the failure condition.
>
> The recipe used was previously in hgforest.sh for it's detection of the mercurial executable.
>
> issue: https://bugs.openjdk.java.net/browse/JDK-8044733
> webrev: http://cr.openjdk.java.net/~mduigou/JDK-8044733/0/webrev
>
> Mike
I thought '...because which...' was a grammatical mistake, then I
realized that I should've read it as '...because which(1)...' :-)
Anyway, would there be any mileage in...
error() {
echo "ERROR: $@ - aborting..." >&2
exit 1
}
check_bin() {
case x`which autoconf 2> /dev/null | grep -v "^no $1 in"` in
x) return ;;
*) return x ;;
esac
}
run_autogen_or_fail() {
if test "`check_bin autoconf`" = x; then
error "Cannot locate autoconf, unable to correct situation.
Please install autoconf and run 'bash autogen.sh' to update the
generated files."
else
echo "Running autogen.sh to correct the situation"
bash $conf_script_dir/autogen.sh
fi
}
.
.
.
check_hg_updates() {
if test "x`check_bin hg`" != x; then
conf_updated_autoconf_files=`cd $conf_script_dir && hg status -mard 2>
/dev/null | grep autoconf`
if test "x$conf_updated_autoconf_files" != x; then
echo "Configure source code has been updated, checking time stamps"
check_autoconf_timestamps
fi
.
.
else
error "Cannot locate hg"
fi
.
.
.
}
Note that the above also corrects what appears to be the cargo cult of
multiple echo statements c/w a single cat(1) using a here document.
HTH ,
Best rgds ,
--
Dave Pointon FIAP MBCS
Now I saw, tho' too late, the folly of beginning a work before we count the cost and before we we judge rightly of our strength to go thro' with it - Robinson Crusoe
More information about the build-dev
mailing list