[Top][All Lists]

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

Re: Conditional recipe execution

From: SF Markus Elfring
Subject: Re: Conditional recipe execution
Date: Fri, 23 Jan 2015 23:17:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

> It appears that KDevelop's "makefile" editing mode doesn't properly
> handle backslash continuations.

This tool might still have got few open issues around improved handling
of the make file syntax.
But I find that its visual feedback was appropriate for parentheses pairs
at least.

>> Do you read the shown rule example eventually in the way that its recipe
>> does not end with "…_NOTIFICATION8)'))"?
> The _RULE_ does end with it, because the rule includes all the recipe
> lines that appear after the target.

Thanks for your acknowledgement.

> But variable/function invocations cannot span different lines of a recipe.
> They all must be contained within the same logical line, as I mentioned 
> before.

My knowledge was incomplete on this detail. I did not get the information from
the description (in the manual) for the used conditional function that it does
not support the inclusion of several logical lines so far.

I am sorry if did not pay enough attention on this aspect.

>> I find that a backslash would not be needed at this place if would like to
>> keep the "RM command" on a separate logical line.
> It is definitely needed.  As I've said, it is not possible for a single
> variable or function reference to span multiple logical lines.

Are there any chances to lift this restriction for make functions?

> If you want to do this you have to use define/endef to create a variable
> that contains newlines, then use the variable in the recipe;
> see example below.

I hoped somehow that another level of data indirection could be avoided.

> I'm really not at all sure why you're using $(info ...) here...

The error message looked "a bit nicer" than a complaint on a shorter "if".

> it won't actually do anything if you do that.

It prints the generated recipe at least after the addition of the backslash
you recommended, doesn't it?

It seems that I had just another inappropriate expectation for the handling
of a line continuation here.
I thank you very much for this quick clarification.


reply via email to

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