Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I'm trying to use
$(patsubst %-%,%:%,$(MAKECMDGOALS))
to replace dashes with colons in the make target but it has no effect.
How could I achieve this?
You can only have a single wildcard in patsubst. To replace all dashes with colons, you can use subst:
patsubst
subst
$(subst -,:,$(MAKECMDGOALS))
Use the tr command:
tr
tr '-' ':' < OLD_MAKE_TARGET > NEW_MAKE_TARGET
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.