This unix and linux site aims to provide book reviews and free ebook on unix linux, unix commands, unix shell, unix programming, unix shell scripting, unix tutorial, suse linux, rehat linux, debian linux, slackware linux, linux server, linux commands, fedora linux, linux gui, linux networking, unix time sharing concepts, programming linux games, samba-3, motif programming, unix signal programming, and linux complete reference, etc

A GNU Make Tutorial

By Byron Weber Becker
Make is a utility which uses a script, called a makefile to automatically determine which of a sequence of steps must be repeated because some files have changed. Two of the most common uses are
  • Recompiling programs residing in several files, and
  • Testing programs.

Since we are using Modula-3, which has its own make-like facility, this document will focus on using make for testing.

There are many versions of make in use. This tutorial assumes GNU Make, distributed freely by the Free Software Foundation. It has a number of features which make it more attractive than the standard Unix make.

Rules

Make uses instructions found in a file named makefile or Makefile to determine what actions to take in order to satisfy some requirement. A simple makefile consists of "rules" or "recipes" that describe how to create a particular target. Each rule has the following shape:

target... : dependencies ...
command
...
...

A target may be either a file to be generated by make or an identifier for an action to be carried out. Make determines that it needs to build a target if one or more dependencies have changed since the target was last built.

Click to Read More

Popular Posts

Linux Unix Books