Exit with an error when autotools is missing.

If we check out from a VCS repo and configure is missing, we need to
run autoreconf to generate it. But check if autoreconf is actually
installed and exit with a useful error if it isn't.
This commit is contained in:
Simon Howard 2016-07-08 18:57:27 -04:00
parent 85d3254b64
commit 8f4d801452
1 changed files with 6 additions and 1 deletions

View File

@ -26,6 +26,11 @@ do_build() {
# If we're checking out from a version control repository, we may need
# to run the autotools commands first to generate the configure script.
if need_autoreconf; then
if ! have_tool autoreconf; then
error_exit "autotools not installed; please run:" \
" chocpkg install native:autotools"
fi
autoreconf -fi
fi
@ -43,7 +48,7 @@ do_build() {
# most autotools-based packages, but can be overridden by packages.
do_install() {
make install || (
error_exit "Failed to install package $PACKAGE_NAME."
error_exit "Failed to install package $PACKAGE_NAME."
)
}