Roland Ver. 4.5 Informações Técnicas Página 114

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 212
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 113
104 GNU make
9.6 Testing the Compilation of a Program
Normally, when an error happens in executing a shell command, make gives up immediately,
returning a nonzero status. No further recipes are executed for any target. The error implies
that the goal cannot be correctly remade, and make reports this as soon as it knows.
When you are compiling a program that you have just changed, this is not what you
want. Instead, you would rather that make try compiling every file that can be tried, to
show you as many compilation errors as possible.
On these occasions, you should use the -k or --keep-going flag. This tells make
to continue to consider the other prerequisites of the pending targets, remaking them if
necessary, before it gives up and returns nonzero status. For example, after an error in
compiling one object file, make -k will continue compiling other object files even though it
already knows that linking them will be impossible. In addition to continuing after failed
shell commands, make -k will continue as much as possible after discovering that it does
not know how to make a target or prerequisite file. This will always cause an error message,
but without -k’, it is a fatal error (see Section 9.7 [Summary of Options], page 104).
The usual behavior of make assumes that your purpose is to get the goals up to date;
once make learns that this is impossible, it might as well report the failure immediately.
The -k flag says that the real purpose is to test as much as possible of the changes made
in the program, perhaps to find several independent problems so that you can correct them
all before the next attempt to compile. This is why Emacs’ M-x compile command passes
the -k flag by default.
9.7 Summary of Options
Here is a table of all the options make understands:
-b
-m These options are ignored for compatibility with other versions of make.
-B
--always-make
Consider all targets out-of-date. GNU make proceeds to consider targets and
their prerequisites using the normal algorithms; however, all targets so consid-
ered are always remade regardless of the status of their prerequisites. To avoid
infinite recursion, if MAKE_RESTARTS (see Section 6.14 [Other Special Variables],
page 73) is set to a number greater than 0 this option is disabled when consider-
ing whether to remake makefiles (see Section 3.5 [How Makefiles Are Remade],
page 14).
-C dir
--directory=dir
Change to directory dir before reading the makefiles. If multiple -C options
are specified, each is interpreted relative to the previous one: -C / -C etc is
equivalent to -C /etc’. This is typically used with recursive invocations of
make (see Section 5.7 [Recursive Use of make], page 50).
-d
Print debugging information in addition to normal processing. The debugging
information says which files are being considered for remaking, which file-times
Vista de página 113
1 2 ... 109 110 111 112 113 114 115 116 117 118 119 ... 211 212

Comentários a estes Manuais

Sem comentários