make(1)

make(1)

International Code Set Support

Single and multi-byte character code sets are supported.

RETURN VALUES

make returns a 0 upon successful completion or a value greater than 0 if an error occurred. If the -qoption is speci®ed, 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 ®le from a C source code ®le without a make®le, if program.c exists in the current directory:

make program

The following example shows more than one make®le speci®ed and some command line macros de®ned, and updates the ®rst target in module1:

make -f module1 -f module2 RELEASE=1.0 CFLAGS=-g

The following example updates two targets in a default make®le currently residing in the current directory:

make clobber prog

The following example updates the prog target in a speci®ed make®le, allows environment variables to override any common variables in the make®le, clears the built-in suf®x list and ignore the built-in rules, and outputs exhaustive debugging information:

make -erd -f module1 prog

WARNINGS

Be wary of any ®le (such as an include ®le) whose access, modi®cation, and last change times cannot be altered by the make-ing process. For example, if a program depends on an include ®le that in turn depends on another include ®le, and if one or both of these ®les are out-of-date, make tries to update these ®les each time it is run, thus unnecessarily re-makeing up-to-date ®les that are dependent on the include ®le. The solution is to manually update these ®les with the touch command before running make (see touch(1)).

Some commands return non-zero status inappropriately; use -ito overcome the dif®culty.

File names with the characters = : @ $ 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 new-line.

If no make®le 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 modi®cation times of ®les 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

HP-UX Release 11i: December 2000

− 10 −

Section 1517

m