bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch to check for required programs when building from source check


From: Jim Meyering
Subject: Re: Patch to check for required programs when building from source checkout
Date: Sun, 05 Oct 2008 18:42:14 +0200

Ed Avis <address@hidden> wrote:
> A few tools are required to build coreutils from a git checkout, but
> not checked in a friendly way.  This patch adds checks to bootstrap
> and configure.
>
> Oh, and updates automake to 1.10.1, which appears to work.

Hi Ed,

Thanks for working on this.

Appearances can be deceiving ;-)
The newer automake-1.10a is actually required.
Here's the relevant change set:

  http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=d9903062

> diff --git a/bootstrap b/bootstrap
> index 438a145..0232ae9 100755
> --- a/bootstrap
> +++ b/bootstrap
> @@ -22,6 +22,16 @@
>  nl='
>  '
>
> +# These programs are needed by this script.
> +if ! autopoint --help >/dev/null; then echo You must install autopoint from 
> gettext; exit 1; fi
> +if ! aclocal --help >/dev/null; then echo You must install aclocal from 
> automake; exit 1; fi
> +
> +# This isn't needed by this script, but it is necessary for building
> +# from a source checkout, and is not checked by configure because
> +# normal building from a distributed tarball doesn't require it.
> +#
> +if ! makeinfo --help >/dev/null; then echo You must install makeinfo from 
> Texinfo; exit 1; fi

I like the idea of automating these checks, but can't use those changes
as-is, since bootstrap is actually used more generally (it's home is in
gnulib/build-aux/) and some projects lack texinfo documentation and/or
don't use gettext, so those tools aren't run.  It'd be a shame to make
bootstrap fail in those cases.

Besides, this is the purpose of the README-hacking file.

>  # Ensure file names are sorted consistently across platforms.
>  LC_ALL=C
>  export LC_ALL
> @@ -558,9 +568,11 @@ echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
>  $gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
>  slurp $bt || exit
>
> -for file in $gnulib_files; do
> -  symlink_to_dir "$GNULIB_SRCDIR" $file || exit
> -done
> +if test "x$gnulib_files" != x; then
> +  for file in $gnulib_files; do
> +    symlink_to_dir "$GNULIB_SRCDIR" $file || exit
> +  done
> +fi

What's the above for?
When would $gnulib_files be empty?

>  # Import from gettext.
> diff --git a/configure.ac b/configure.ac
> index 549c7ee..61b708c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -32,7 +32,7 @@ AC_CONFIG_SRCDIR(src/ls.c)
>  AC_CONFIG_AUX_DIR(build-aux)
>  AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
>
> -AM_INIT_AUTOMAKE([1.10a dist-lzma])
> +AM_INIT_AUTOMAKE([1.10.1 dist-lzma])
>
>  AC_PROG_CC_STDC
>  AM_PROG_CC_C_O
> @@ -291,6 +291,12 @@ case $t in
>                  1) ;;
>  esac
>
> +AC_CHECK_PROG([GPERF], [gperf], [1])
> +if test "x$GPERF" = x; then
> +  AC_MSG_ERROR([You need to install gperf])
> +  exit 1
> +fi

gperf should not be required when building from a tarball,
so its absence shouldn't make configure fail.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]