HP-UX Reference (11i v2 07/12) - 1 User Commands A-M (vol 1)

m
make(1) make(1)
International Code Set Support
Single and multi-byte character code sets are supported.
RETURN VALUE
make returns a 0 upon successful completion or a value greater than 0 if an error occurred. If the
-q
option is specified, make returns 0 if the target was up-to-date and a value greater than 0 if the target was
not up-to-date.
EXAMPLES
The following example creates an executable file from a C source code le without a makefile, if program.c
exists in the current directory:
make program
The following example shows more than one makefile specified and some command line macros defined,
and updates the first target in module1:
make -f module1 -f module2 RELEASE=1.0 CFLAGS=-g
The following example updates two targets in a default makefile currently residing in the current directory:
make clobber prog
The following example updates the prog target in a specified makefile, allows environment variables to
override any common variables in the makefile, clears the built-in suffix list and ignore the built-in rules,
and outputs exhaustive debugging information:
make -erd -f module1 prog
WARNINGS
Be wary of any file (such as an include file) whose access, modification, and last change times cannot be
altered by the make-ing process. For example, if a program depends on an include file that in turn
depends on another include file, and if one or both of these files are out-of-date,
make tries to update these
files each time it is run, thus unnecessarily re-
makeing up-to-date files that are dependent on the include
file. The solution is to manually update these files with the
touch command before running
make (see
touch(1)).
Some commands return nonzero status inappropriately; use
-i to overcome the difficulty.
File names with the characters
=, :, @ and $ do not work.
Built-in commands that are directly executed by the shell such as cd (see cd(1)), are ineffectual across new-
lines in
make.
The syntax (lib(file1.o file2.o file3.o) is illegal.
You cannot build lib(file.o) from file.o.
The macro $(a:.o=.c˜) does not work.
Expanded target lines cannot contain more than 16384 characters, including the terminating newline.
If no makefile exists in the current directory, typing
make filename
results in make attempting to build filename from filename.c
If make is invoked in a shell script with a quoted argument that evaluates to NULL (such as $@), make
fails.
DEPENDENCIES
NFS Warning
When comparing modification times of files located on different NFS servers, make behaves unpredictably
if the clocks on the servers are not synchronized.
FILES
[Mm]akefile
s.
[Mm]akefile
SCCS/s.
[Mm]akefile
648 Hewlett-Packard Company 10 HP-UX 11i Version 2: December 2007 Update