2. Make and Makefile

make

is a tool to control the generation of executables and non-sourcefiles of a program. Users can define rules which set how a target file shall be build and which dependencies have to fulfilled beforehand.

Rules:

target: [dependencies]
	 recipe

Here you see the principle syntax of a make rule. Dependencies are optional and are only used if needed for building a target. A specific make rule could look like this:

table1.vot: table2.vot
	 python magicpipeline.py

table2.vot:
	 ./fortran95

Here table2.vot is a prerequisite to table1.vot. make will look at the rule for table2.vot before processing the recipe of table1. For instance the fortran code in the recipe of table2 may write a file that is used by magicpipeline.py in the recpipe of the rule of table1.vot.


Hendrik Heinl

Copyright Notice