Chapter 10: Using Implicit Rules 117
TANGLE Program to translate Web into Pascal; default ‘tangle’.
CTANGLE Program to translate C Web into C; default ‘ctangle’.
RM Command to remove a file; default ‘rm -f’.
Here is a table of variables whose values are additional arguments for the programs
above. The default values for all of these is the empty string, unless otherwise noted.
ARFLAGS Flags to give the archive-maintaining program; default ‘rv’.
ASFLAGS Extra flags to give to the assembler (when explicitly invoked on a ‘.s’ or ‘.S’
file).
CFLAGS Extra flags to give to the C compiler.
CXXFLAGS Extra flags to give to the C++ compiler.
COFLAGS Extra flags to give to the RCS co program.
CPPFLAGS Extra flags to give to the C preprocessor and programs that use it (the C and
Fortran compilers).
FFLAGS Extra flags to give to the Fortran compiler.
GFLAGS Extra flags to give to the SCCS get program.
LDFLAGS Extra flags to give to compilers when they are supposed to invoke the linker,
‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable
instead.
LDLIBS Library flags or names given to compilers when they are supposed to invoke
the linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to
LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS variable.
LFLAGS Extra flags to give to Lex.
YFLAGS Extra flags to give to Yacc.
PFLAGS Extra flags to give to the Pascal compiler.
RFLAGS Extra flags to give to the Fortran compiler for Ratfor programs.
LINTFLAGS
Extra flags to give to lint.
10.4 Chains of Implicit Rules
Sometimes a file can be made by a sequence of implicit rules. For example, a file n.o could
be made from n.y by running first Yacc and then cc. Such a sequence is called a chain.
If the file n.c exists, or is mentioned in the makefile, no special searching is required:
make finds that the object file can be made by C compilation from n.c; later on, when
considering how to make n.c, the rule for running Yacc is used. Ultimately both n.c and
n.o are updated.
However, even if n.c does not exist and is not mentioned, make knows how to envision
it as the missing link between n.o and n.y! In this case, n.c is called an intermediate file.
Kommentare zu diesen Handbüchern