autoconf
[Top][All Lists]
Advanced

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

Re: [patch] Keep executability of config.status-ed files


From: Eric Sunshine
Subject: Re: [patch] Keep executability of config.status-ed files
Date: Wed, 10 Dec 2003 11:55:04 -0500
User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624

Jan Kratochvil wrote:
On Wed, 10 Dec 2003 16:46:35 +0100, Eric Sunshine wrote:
Unfortunately, older 'test' commands do not recognize the -x option,
Just a try - this is also forbidden?: if ls -ld $f | grep -q '^...x'; then

The grep -q option is unportable. Autoconf works around this issue by redirecting output of grep to /dev/null rather than using -q or -s.

The '^' and '.' tokens in the grep expression also are not necessarily
portable since they are considered part of the "extended" regular
expression syntax which is provided by 'egrep' or 'grep -E'.  Of course,
trying to hard-code 'egrep' or 'grep -E' is also unportable.  Instead,
usage would have to be conditionalized based upon the result of AC_PROG_EGREP.

Finally, use of "ls -ld" may or may not be acceptable to the Autoconf community. Presently, there is only a single use of 'ls' in the entire Autoconf library of macros, and that is in the obscure and rarely used AC_FUNC_GETLOADAVG macro. At the very least, it would be a good idea to only use "ls -ld" after checking that such usage is valid (i.e. ensure that "ls -ld" actually works, and works as intended on the target platform).

-- ES






reply via email to

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