home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: 19.5 Alphabetical Summary of Commands Chapter 20 Next: 20.2 Command-Line Syntax
 

20. The make Utility

This chapter presents the following topics:

  • Conceptual overview

  • Command-line syntax

  • Description file lines

  • Macros

  • Special target names

  • Writing command lines

  • Sample default macros, suffixes, and rules

For more information, see Managing Projects with make , listed in the Bibliography.

20.1 Conceptual Overview

The make program generates a sequence of commands for execution by the Unix shell. It uses a table of file dependencies provided by the programmer, and, with this information, can perform updating tasks automatically for the user. It can keep track of the sequence of commands that create certain files, and the list of files or programs that require other files to be current before they can operate efficiently. When a program is changed, make can create the proper files with a minimum of effort.

Each statement of a dependency is called a rule . Rules define one or more targets , which are the files to be generated, and the files they depend upon, the prerequisites or dependencies . For example, prog.o would be a target that depends upon prog.c ; each time you update prog.c , prog.o must be regenerated. It is this task that make automates, and it is a critical one for large programs that have many pieces.

This chapter covers the SVR4 make . Many Unix vendors have enhanced make in different, and often incompatible, ways. Check your local documentation for the final word.

On Solaris, /usr/lib/svr4.make is the generic SVR4 version of make . If you set USE_SVR4_MAKE in the environment, /usr/ccs/bin/make or /usr/xpg4/bin/make runs this version.


Previous: 19.5 Alphabetical Summary of Commands UNIX in a Nutshell: System V Edition Next: 20.2 Command-Line Syntax
19.5 Alphabetical Summary of Commands Book Index 20.2 Command-Line Syntax

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System










??????????????@Mail.ru