makefile - Make: Dependency on newest file in directory -
for small project, have following workflow:
- compile code , generate
./data
,./images
- run code, write many files
./data
- generate images data files, place them in
./images
- generate video images
i have written makefile, can run code, , compile before, if necessary. don't know how implement dependencies of steps 3 , 4, , make targets manually.
so, there way check if e.g. newest file in ./data
newer newest file in ./images
? it's not necessary on file-by-file basis, , total number of data / image files not known.
typically date of directory date last file added/modified, use timestamp on directory dependencies.
images : data // generate images
alternatively, if there mapping between files in 2 directories, like:
images/%.img: data/%.dat // generate image...
which prevent reprocessing data that's been handled.
Comments
Post a Comment