[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib-tool incorrectly handles library names with dashes
From: |
Bruno Haible |
Subject: |
Re: gnulib-tool incorrectly handles library names with dashes |
Date: |
Thu, 5 Jul 2007 12:39:21 +0200 |
User-agent: |
KMail/1.5.4 |
Hi Sergey,
> When converting library names to Makefile variables, gnulib-tool
> forgets to convert dashes. The following patch fixes it.
Thanks, looks good.
> It also fixes unneeded duplication of --avoid options, notable in
> `# Reproduce by:' headers in generated Makefile.ams.
The code for doing so has a few nits:
| - avoidlist=`echo $cached_avoidlist $avoidlist`
| + avoidlist=`echo $cached_avoidlist $avoidlist | tr ' ' '\n' | sort | uniq |
tr '\n' ' '`
First, to convert a whitespace separated list to a list of lines:
tr ' ' '\n' forgets to convert tabs. Better use a 'for' loop.
Second, for sorting and unifying, use LC_ALL=C each time, so that the
result is locale independent. Also, "sort -u" does it in one step.
Third, when converting back to a space separated list, tr '\n' ' '
leaves a blank at the end. Better use 'echo' for this purpose.
So I prefer this code:
avoidlist="$cached_avoidlist $avoidlist"
avoidlist=`for m in $avoidlist; do echo $m; done | LC_ALL=C sort -u`
avoidlist=`echo $avoidlist`
Bruno