I have a directory images/
that I want to copy to build/images/
from within a Makefile. The directory might contain multiple levels of subdirectories. What would be the most elegant way to do that? I want:
- avoid a full directory copy on each
make
run (i.e. nocp -r
) - guaranteed consistency (i.e. if a file changed in
images/
it should be automatically updated inbuild/images/
) - avoid to specify a rule for each image and each subdirectory in the Makefile
- solve the issue within
make
, so norsync
orcp -u
if possible
I am using GNU make, so GNU specific stuff is allowed.