[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Handling '=' in a filename together with $(eval )
From: |
Paul Smith |
Subject: |
Re: Handling '=' in a filename together with $(eval ) |
Date: |
Thu, 13 Feb 2025 10:08:36 -0500 |
User-agent: |
Evolution 3.54.3 (by Flathub.org) |
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.
Re: Handling '=' in a filename together with $(eval ), Renaud Pacalet, 2025/02/13