]> git.ipfire.org Git - thirdparty/automake.git/commit
[ng] vars: names of iterating vars in $(foreach) loops shorter & simpler
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 24 Jul 2012 13:23:08 +0000 (15:23 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 24 Jul 2012 14:08:06 +0000 (16:08 +0200)
commit62558c73a5477adda8a377e3643e26075f0b91e3
treed326baf7135e9144d8365149764fd45ac23c6d0e
parent7f6cbbeff5a6ac623b9dacc686c04633d5691858
[ng] vars: names of iterating vars in $(foreach) loops shorter & simpler

In GNU make, after a "$(foreach x,...)" loop, the make variable $(x):

  - is restored to its original variable it had before the 'foreach'
    loop, if it was already set;

  - re-unset otherwise.

This behaviour is checked by the recent spy test 't/spy-foreach.sh'.

This means that, in most situations, there's no actual need to use
a "namespace safe" variable name for the iterating variable in a
"$(foreach ...)" loop, because that variable won't linger in the
environment after the loop anyway.

* lib/am/compile.am, lib/am/header-vars.am, lib/am/parallel-tests.am,
lib/am/serial-tests.am: Adjust to use simpler variables names in their
foreach loops; for example, simply 'v' instead of 'am__v', etc.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
lib/am/compile.am
lib/am/header-vars.am
lib/am/parallel-tests.am
lib/am/serial-tests.am