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

m
make(1) make(1)
be used in target rules in the makefile. They can also be redefined in the makefile.
$$@ The $$@ macro has meaning only on dependency lines. Macros of this form are called
dynamic dependencies because they are evaluated at the time the dependency is
actually processed. $$@ evaluates to exactly the same thing as
$@ does on a com-
mand line; that is, the current target name. This macro is useful for building large
numbers of executable files, each of which has only one source file. For instance, the
following HP-UX commands could all be built using the same rule:
CMDS = cat echo cmp chown
$(CMDS) : $$@.c
$(CC) -O $? -o $@
If this makefile is invoked with
make cat echo cmp chown, make builds each
target in turn using the generic rule, with
$$@ evaluating to cat while cat is the
target, to
echo when the target is echo
, and so forth.
The dynamic dependency macro can also take the F form,
$$(@F) which represents
the file name part of
$$@
. This is useful if the targets contain path names. For
example:
INCDIR = /usr/include
INCLUDES = $(INCDIR)/stdio.h \
$(INCDIR)/pwd.h \
$(INCDIR)/dir.h \
$(INCDIR)/a.out.h
$(INCLUDES) : $$(@F)
cp $? $@
chmod 0444 $@
Special Macros
The VPATH macro allows make to search a colon separated list of directories for dependents. Lines of the
form VPATH= path1:path2 ... causes make to first search the current directory for a dependent and if the
dependent is not found, make searches path1 and continues until the directories specified in the VPATH
macro are exhausted.
EXTERNAL INFLUENCES
For information about the UNIX standard environment, see standards(5).
Environment Variables
LANG provides a default value for the internationalization variables that are unset or null. If
LANG is
unset or null, the default value of "C" (see lang(5)) is used. If any of the internationalization variables con-
tains an invalid setting,
make will behave as if all internationalization variables are set to "C". See
environ(5).
LC_ALL If set to a nonempty string value, overrides the values of all the other internationalization vari-
ables.
LC_CTYPE determines the interpretation of text as single and/or multi-byte characters, the classification
of characters as printable, and the characters matched by character class expressions in regular expres-
sions.
LC_MESSAGES determines the locale that should be used to affect the format and contents of diagnostic
messages written to standard error and informative messages written to standard output.
NLSPATH determines the location of message catalogues for the processing of LC_MESSAGES .
PROJECTDIR provides a directory to be used to search for SCCS files not found in the current directory.
In all of the following cases, the search for SCCS files will be made in the directory SCCS in the identified
directory. If the value of PROJECTDIR begins with a slash, it is considered an absolute path name; other-
wise, the home directory of a user of that name is examined for a subdirectory src or source. If such a
directory is found, it is used. Otherwise, the value is used as a relative path name.
If PROJECTDIR is not set or has a null value, the current directory is searched first, followed by a search
in the SCCS directory in the current directory. The setting of PROJECTDIR affects all files listed in the
remainder of this utility description for files with a component named SCCS.
HP-UX 11i Version 3: February 2007 9 Hewlett-Packard Company 643