Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi,

On Mon, Sep 10, 2012 at 08:30:46PM +0200, zolniatamas@caesar.elte.hu wrote:
Idézet (Matúš Kukan <matus.kukan@gmail.com>):

Hi Matus,

Hi,

On 10 September 2012 14:31,  <zolniatamas@caesar.elte.hu> wrote:
define gb_ConcatPo
echo "" > $(2)
$(foreach lang,$(filter-out en-US,$(gb_WITH_LANG)), $(shell cat
$(gb_POLOCATION)/$(lang)/$(1) >> $(2) && printf "\n" >> $(2)))
endef

then the function will return with an empty file, as if foreach had no
effect.

You probably don't want to use $(shell ..).
The command in there is executed first, when make is expanding
gb_ConcatPo I guess.
If you remove the shell it could +- work.
Better to send more next time, like, how do you use it,.. if it
does not work.

You were right, this was the problem. I use `` instead of $(shell
..) and it works. Many thanks for the help.

You do not need backticks either. Just use plain cat command, e.g.,

define gb_ConcatPo
rm -f $(2) \
$(foreach lang,$(filter-out en-US,$(gb_WITH_LANG)),\
    && cat $(gb_POLOCATION)/$(lang)/$(1) >> $(2) \
    && printf "\n" >> $(2))
endef

D.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.