|
From: | Christof Warlich |
Subject: | Re: MAKECMDGOALS and spaces |
Date: | Sat, 13 Feb 2021 22:13:34 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
Kaz Kylheku wrote:
I think to make use of this, you need to define a target that has a space. It seems this is possible as follows hi\ ho: [tab]echo yes Then make "hi ho" runs the recipe and "yes" is echoed. In order to do this with a generated rule from $(MAKECMDGOALS), you would need some way to do the expansion such that the spaces are similarly escaped.
The problem is that replacing every space with an escaped space only works as long as MAKECMDGOALS consists of one goal only: If more goals are given on the command line, their separating space would be replaced as well, as the distinction between target separating spaces and in-target spaces obviously get lost in MAKECMDGOALS. Thus, I'm pretty sure that there is no generic way to do what I was asking for, but I just want to double-check in case I'm missing something.
[Prev in Thread] | Current Thread | [Next in Thread] |