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: 18.5 Alphabetical Summary of Commands Chapter 19 Next: 19.2 Description File Lines
 

19. The make Utility

This section presents the following topics:

  • Command-line syntax

  • Description file lines

  • Macros

  • Special target names

  • Sample default macros, suffixes, and rules

For a detailed description of make , refer to the Nutshell Handbook, Managing Projects with make .

The make program generates a sequence of commands for execution by the UNIX shell. It uses a table of file dependencies input 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 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.

19.1 Command-line Syntax

make [ options ] [ targets ] [ macro definitions ]

Options, targets, and macro definitions can appear in any order. Macros definitions are typed as:



name

=

string

19.1.1 Options

-e

Environment variables will override any macros defined in description files.

-f file

Use file as the description file; a filename of - denotes standard input. -f can be used more than once to concatenate multiple description files. Default file is makefile or Makefile .

-i

Ignore error codes from commands (same as .IGNORE ).

-k

Abandon the current entry when it fails, but keep working with unrelated entries.

-n

Print commands but don't execute (used for testing). -n prints lines even if they begin with @ in the description file.

-p

Print macro definitions, suffixes, and target descriptions.

-q

Query; return 0 if file is up-to-date; nonzero otherwise.

-r

Do not use the default rules.

-s

Do not display command lines (same as .SILENT ).

-t

Touch the target files, causing them to be updated.


Previous: 18.5 Alphabetical Summary of Commands UNIX in a Nutshell: System V Edition Next: 19.2 Description File Lines
18.5 Alphabetical Summary of Commands Book Index 19.2 Description File Lines

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










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