help-make
[Top][All Lists]
Advanced

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

Re: MAKECMDGOALS and spaces


From: Paul Smith
Subject: Re: MAKECMDGOALS and spaces
Date: Sun, 14 Feb 2021 09:43:31 -0500
User-agent: Evolution 3.36.4-0ubuntu1

On Sat, 2021-02-13 at 19:35 +0100, Christof Warlich wrote:
> Obviously, make knows that it is supposed to build a target with a
> space, but this information got lost within the variable
> MAKECMDGOALS.
> 
> Can I fix my simple example to handle this case in a generic way?  As
> much as I could figure so far, it seems to be impossible, right?

It's basically impossible for make to handle target names with
whitespace in them.  This has been true ever since make was invented
back in the 1970's and is still true today (for all modern versions of
POSIX-based make, including GNU make).

Issues with MAKECMDGOALS are just the tip of the iceberg.

There have been various proposals made to try to resolve this; there
was one I made in a really long thread a number of years ago that
relied on (a) makefiles being UTF8 and (b) making some UTF8 characters
illegal in makefiles (for example some of the low control characters).
 But providing a syntax that works is not easy.




reply via email to

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