Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escaped percent char is mishandled in patsubst arguments #234

Open
asmundak opened this issue Aug 16, 2021 · 1 comment
Open

Escaped percent char is mishandled in patsubst arguments #234

asmundak opened this issue Aug 16, 2021 · 1 comment

Comments

@asmundak
Copy link
Contributor

According to https://www.gnu.org/software/make/manual/make.html#Text-Functions,
"‘%’ characters in patsubst function invocations can be quoted with preceding backslashes (‘\’). "
Kati does not do that:

$ cat /tmp/a.mk
$(error $(patsubst %,\%/%,a b c))
$ make -f /tmp/a.mk 
/tmp/a.mk:1: *** %/a %/b %/c.  Stop.
$ ckati -f /tmp/a.mk 
/tmp/a.mk:1: *** \a/% \b/% \c/%.
@danw
Copy link
Collaborator

danw commented Aug 24, 2021

I had noticed this as well very early on in switching to Kati, though decided I had better things to do since we couldn't find a single case of a user actually using this in the Android trees. Considering how often patsubst was used I was also worried about the overhead of extra logic, though I suspect that's much less of a problem these days (as more work has been pushed out of Make).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants