Re: Handling '=' in a filename together with $(eval )

Alejandro Colomar <[email protected]> Thu, 13 Feb 2025 17:13:52 +0100
Newsgroups gmane.comp.gnu.make.general
Message-ID <rsbmyuy4gsttdmmzi7o3r64sly5ktd4y6spxnwyqdn4k6gdzqu@zbtu4kputths>
On Thu, Feb 13, 2025 at 10:35:32AM -0500, Paul Smith wrote:
> On Thu, 2025-02-13 at 10:33 -0500, Paul Smith wrote:
> > On Thu, 2025-02-13 at 16:24 +0100, Alejandro Colomar wrote:
> > > I'm aware of that trick.  However, I think it won't work for me,
> > > since I don't hardcode the filenames in the Makefile, but get them
> > > with
> > > 
> > >  $(shell find ...)
> > > 
> > > instead.
> > 
> > You can always use subst to handle this, like:
> > 
> >   $(subst =,$$(EQ),....)
> 
> This might require an extra eval, I'm not sure I didn't test it. 
> Basically, my opinion is still:
> 
> > Note I don't really recommend any of this.  With the current
> > limitations of make, as defined by POSIX, it's just very difficult to
> > use filenames that contain special characters.  I recommend a "just
> > don't do it" approach :).

Hi Paul,

I agree with your general opinion.  I'm going to try a few tricks with
the variable, and trying to get the number of expansions right, but if
not, I'll surrender.  I was trying to build a PDF book of the Unix V10
manual pages, which contain a weirdly named manual page: '=.1' (for the
command '=').  You can guess that's not nice with make(1).  :)

At least, that's only one manual page, and I could manually rename it to
'eq.1'.  That's going to result in a bit of weirdness, but let's blame
the authors of the page.  Long live the portable filename character set!
:-)


Cheers,
Alex

-- 
<https://www.alejandro-colomar.es/>
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE6jqH8KTroDDkXfJAnowa+77/2zIFAmeuGkAACgkQnowa+77/
2zI9BxAAorV7YfY7XfgQn5XZdrUHpl8YyOb48xzPCzhUhjXzvIDwN+gLpgXlBFb0
QXq936UpG2WHwgCx8xSuQ6KFt8c2Kn7Plc4jKrh68i9N54APKaxWkKPGL0eVf2tX
WdHcrDHqyRxY0yjsKD8z7iSQ+qKORLdHjOhG5b9jPN7OpnoVnlvUSW1wWqmoFWpG
KY/6769B4LKgCrH+u/2t7AExWxRJYu3/GPzp2bj6cWDdhSa4Cdv8U02kqON7KOWc
wVaPrRk/sjAHvTBTcgbl58aW2anAkhhOJ1yNpD+e0Axe4T2RodCivVhmOnBqE3Xe
Xhvn+4nlt+T2ius0EYnVHWnmCCNILMF+IImGlm8aUMa9w+jO2YRGuCpb58TLUOAO
KSNPbE8ZdAGnKfgtZziZSS+taVyytdzFZd4XGX4Af+0J2AP/jRQ0SshCpWlSWIzt
tQyinaOSiUVmiBw6htO24UcmodOl0w99YnjViQmqqV/q7lXs9BXC0HxkHP0OtfJW
kUT86/tM5ndRYTsZbwKQwMGhoQAUHJ/mOIph0RJPqYZBlCInbP2xGajevQGKJbeV
1s8cmk1A71aOXaTVI5I3uMxpsH7jpUbDa2nIXj/bZqsi9UlCLHF/QvW2zbm0rECs
W0P27Ba+RVlLPVIcF7TNZvF+iK2N7gHQQDRngtwki4QYIk6AE88=
=bNbI
-----END PGP SIGNATURE-----