This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix broken 'make install-po'. Fixes PR other/7727


On Sep 19, 2002, Josh Martin <Josh.Martin@abq.sc.philips.com> wrote:

> Now I'm thinking about returning back to the other idiom, as it
> doesn't seem to have any expansion issues.

You have to know something about the expansion of $(FOO) one way or
the other.  In the idiom you posted, you have to know that none of the
members of the list will be `..'.

> for f in .. $(FOO); do if [x$$f != x..]; then
                                        ^ missing blank
                             ^^^^ missing quotes
                             ^ missing blank

make it:

for f in .. $(FOO); do \
  [ "x$$f" != x.. ] || continue; \
  useful commands go here; \
done

I still like better the idiom standardized by automake, since in
addition to being standard, it's slightly more efficient.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]