The file file is usually used to compile the source; however, as a dependency mechanism, it makecan have many more possibilities.
For a small example, I have a script that runs daily, and it can update or create some "* .csv.gz" files in a directory based on some web clips; all gzipped files need to be combined into one file, and if there are new files, it is obvious that the consolidation process should be started.
In my case, the following makefile does the following task:
consolidation: datasummary.pcl
datasummary.pcl: *.csv.gz
consolidate.py
The cron task starts the update process, and then make consolidation; if the file is datasummary.pclolder than any file *.csv.gz, it starts consolidate.py.
I'm very interested in ideas about the unusual (and not about the original compilation) use of the makefile. What other interesting examples of using a makefile can you give?
Suppose we are talking about GNU make; if not, indicate the version.
source
share