Re: Handling '=' in a filename together with $(eval )
Paul Smith <[email protected]> Thu, 13 Feb 2025 10:08:36 -0500
| Newsgroups | gmane.comp.gnu.make.general |
|---|---|
| Organization | GNU's Not UNIX! |
| Message-ID | <[email protected]> |
On Thu, 2025-02-13 at 15:46 +0100, Alejandro Colomar wrote: > I'm trying to find a way to correctly handle files with a '=' in > their name with make(1). I know I'm doing something in the edge of > what's possible, so the answer may very well be "you can't", but if > it's possible, I'd like to learn how. The reason is that the file > exists in another project, and I'd like to use it with my Makefile; I > can't fix the filename. The correct way to handle most special characters in makefile syntax is to hide them behind a make variable. This works: EQ = = all: foo$(EQ)bar foo$(EQ)bar: ; @echo $@ gives: foo=bar This works because make will chop up a line into sections before it expands variables.