A makefile is typically used for source compilation; however, as a dependency mechanism, make
can have many more uses.
For a minor example, I have a script that runs daily, and it might update or create some '*.csv.gz' files in a directory based on some web-scraping; all the gzipped files need to be consolidated into one file, and if there are new files, obviously the consolidation process needs to be run.
In my case, the following makefile does the job:
consolidation: datasummary.pcl
datasummary.pcl: *.csv.gz
consolidate.py
The cron job runs the update process, and then make consolidation
; if the datasummary.pcl
file is older than any *.csv.gz
file, consolidate.py
runs.
I'm very interested in ideas about unusual (i.e. not about source compiling) uses of a makefile. What other interesting examples of makefile usage can you give?
Let's assume we talk about GNU make; if otherwise, please specify version.