Given the following make target

.PHONY: my_target
    @python scripts/ $(arg)

one can the argument with an argument in the following manner

make my_target arg=my_arg

I used this approach to run a python script to create the file for this post

make til p=make/pass-arg-to-target

for the following make target

.PHONY: til
	@python scripts/ $(p)

It’s also possible to prepend the variable

p=make/pass-arg-to-target make til