Run script only on modified file using Makefile
Run script only on modified file using Makefile I have few txt files in a directory. I want to run a shell script only on the files which have been modified. How can I achieve this through Makefile ? Have written the following part but it builds all the txt files in the directory. Would be great to get some pointers on this. txt Makefile txt FILENAME:= $(wildcard dir/txts/*/*.txt) .PHONY: build-txt build-txt: $(FILENAME) sh build-txts.sh $^ Define modified -- are they newer than a particular target, or just modified since the last time this makefile was run in that directory? – HardcoreHenry 2 days ago @HardcoreHenry modified since the last time makefile ran – dejavu 2 days ago ...
