Hmm ... the Make/Makefile concept is not unique to Unix. MS Visual C++ also uses Makefile to automate the build process of a source project. It just has an interface fancy enough to hide some of its dark corners.
You need to distinguish the roles played by "make" and compilation. Make is a build utility. It defines a language (in the way you write Makefiles) that allows developers to specify exactly the way they would like their source files to be transformed (by means of external commands that carry out the actual transformation), and, most importantly, the interdependencies of source files and their derivatives (such as compiled object code, executables etc.). Finding out the interdependencies is exactly the strength of Make, otherwise we can always put the transformation commands in a batch file (shell script), which will always work but you will miss one of the major offerings of a build system - selective transformation (compilation).
For instance, given this simple Makefile:
.PHONY: all clean
all: output.html
output.html: stylesheet.xsl model.xml
xsltproc stylesheet.xsl model.xml > output.html
clean:
-rm output.html
which generates the file "output.html" derived from two source files "stylesheet.xsl" and "model.xml" (the dependencies). We confirm we get the generated "output.html":
cbkihong@cbkihong:/dev/shm$ make
xsltproc stylesheet.xsl model.xml > output.html
cbkihong@cbkihong:/dev/shm$ ls -l
16
-rw-r--r-- 1 cbkihong cbkihong 118 2005-10-11 08:27 Makefile
-rw-r--r-- 1 cbkihong cbkihong 157 2005-10-11 08:27 model.xml
drwxr-xr-x 2 root root 60 2005-10-11 07:51 network
-rw-r--r-- 1 cbkihong cbkihong 253 2005-10-11 08:28 output.html
-rw-r--r-- 1 cbkihong cbkihong 415 2005-10-11 08:28 stylesheet.xsl
But if we run "make" again,
cbkihong@cbkihong:/dev/shm$ make
make: Nothing to be done for `all'.
It detects the timestamp of "output.html" is newer than stylesheet.xsl and model.xml, so it concludes the previously generated target is up to date, hence a transformation is not required this time. So this is selective transformation. If you have a complex project involving lots of transformations, this will save you a lot of time for compilation if you have the previously generated derivatives. This is what a simple batch file that can't give you (without extra coding). Make manages this for you.
Although Make is frequently used for compilation, it is separate from the actual compilation process (which is performed by the transformation command specified). That is why I used the term "transformation" instead of "compilation" above. In the example above I did not compile any C source files, but I have used Make to automate the process of building in a likewise fashion. Think about Make as a coordinator of the build process. It manages the compilation of a source project, but the actual compilation is done by a compiler, not Make.