Make is a tool which can run commands to read files, process these files in some way, and write out the processed files. For example, in software development, Make is used to compile source code into executable programs or libraries, but Make can also be used to:
Make is called a build tool - it builds data files, plots, papers, programs or libraries. It can also update existing files if desired.
Make tracks the dependencies between the files it creates and the files used to create these. If one of the original files (e.g. a data file) is changed, then Make knows to recreate, or update, the files that depend upon this file (e.g. a plot).
There are now many build tools available, all of which are based on the same concepts as Make.
In this lesson we use
makefrom the Unix Shell. Some previous experience with using the shell to list directories, create, copy, remove and list files and directories, and run simple scripts is necessary.
In order to follow this lesson, you will need to download some files. Please follow instructions on the setup page.
|Setup||Download files required for the lesson|
|00:00||1. Introduction||How can I make my results easier to reproduce?|
|00:30||2. Makefiles||How do I write a simple Makefile?|
|01:00||3. Automatic Variables||How can I abbreviate the rules in my Makefiles?|
|01:30||4. Dependencies on Data and Code||How can I write a Makefile to update things when my scripts have changed rather than my input files?|
|02:00||5. Pattern Rules||How can I define rules to operate on similar files?|
|02:30||6. Variables||How can I eliminate redundancy in my Makefiles?|
|03:00||7. Functions||How else can I eliminate redundancy in my Makefiles?|
|03:30||8. Self-Documenting Makefiles||How should I document a Makefile?|
|04:00||9. Conclusion||What are the advantages and disadvantages of using tools like Make?|
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.