Not sure what to google for this, so excuse me if the question is stupid.
I have a Makefile rule that depends on several files. When any of them changes, I want make to invoke a program and pass to it the list of the changed files as command line arguments. Ideally, I want something like this:
myfiles: file1.txt file2.txt file3.txt
my_command $(CHANGED_DEPENDENCIES)
For example, if I changed file1.txt and file2.txt, I’d expect make to invoke my_command file1.txt file2.txt
How do I accomplish that?
Thanks.
Use an automatic variable:
See gnu make