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: Ed Avis
Subject: Re: Patch to check for required programs when building from source checkout
Date: Tue, 14 Oct 2008 13:06:07 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Jim Meyering <jim <at> meyering.net> writes:

[funky automake version numbers]

>When in doubt, use sort -V from the latest coreutils:
>
>    $ printf 'automake-1.10%s\n' .1 a|sort -V
>    automake-1.10.1
>    automake-1.10a

That's not the result I get:

% printf 'automake-1.10%s\n' .1 a|sort -V
automake-1.10a
automake-1.10.1
% sort --version | head -n 1
sort (GNU coreutils) 7.0.11-5996-dirty

The code was pulled from git just now.

>I don't want to maintain yet another package-specific file/script,
>so I've been toying with the idea of adding generic code to
>bootstrap that would automatically determine more prerequisites
>like this.  E.g., if it sees that gperf will be used by this
>package, then it'd ensure it's usable.

Wouldn't it be simpler to include a file bootstrap.required_progs containing a 
list one per line and then have something like

if test -e bootstrap.required_progs; then
    for p in `cat bootstrap.required_progs`; do
        if ! $p --help >/dev/null; then
            echo You must install $p
            exit 1
        fi
    done
done

Autodetecting them seems a bit baroque, but I guess you could grep -r or 
something...

-- 
Ed Avis <address@hidden>





reply via email to

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