20.2. Command-Line Syntax
make [options] [targets] [macro definitions]
Options, targets, and macro definitions can appear in any order.
Macro definitions are typed as:
If no makefile or
exists, make will attempt to
extract the most recent version of one from an SCCS file, if one exists.
(Some versions also know about RCS.)
- Environment variables 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.
With no -f option, make first
looks for a file named makefile,
and then one named Makefile.
- Ignore error codes from commands (same as .IGNORE).
- Abandon the current target when it fails, but keep working with
- Print commands but don't execute (used for testing).
-n prints commands even if they
begin with @ in the description file.
Lines that begin with $(MAKE) are an
Such lines are executed. However, since the
-n is passed to the subsequent make
in the MAKEFLAGS environment variable, that make
also just prints the commands it executes.
This allows you to test out all the makefile
files in a whole software hierarchy without actually doing anything.
- Print macro definitions, suffixes, and target descriptions.
- Query; return 0 if file is up to date; nonzero otherwise.
- Do not use the default rules.
- Do not display command
lines (same as .SILENT).
- Touch the target files, causing them to be updated.
Copyright © 2003 O'Reilly & Associates. All rights reserved.