When I use this in a Makefile:
run: mydir/*
do_something.sh
it triggers do_something.sh every time a file in mydir is added/changed. Is it possible to also trigger do_something.sh when any file in the directory-tree of mydir (i.e in any subdirectory or subdirectory of a subdirectory, etc.) changes or is added?
This might do the trick.
run: $(shell find mydir/ -type f)
do_something.sh
run cannot be a PHONY target, i.e. it should create a file named run at the end of execution of the recipemydir have spaces in the name, you might get unexpected behaviorIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With