makefile - Make: Dependency on newest file in directory -


for small project, have following workflow:

  1. compile code , generate ./data , ./images
  2. run code, write many files ./data
  3. generate images data files, place them in ./images
  4. 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

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -