mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-01-12 16:45:35 +00:00
* doc/make.texi (Remaking Makefiles): [SV 61623] Add optimization
This commit is contained in:
parent
c72e1ec446
commit
6faa02247e
1 changed files with 15 additions and 1 deletions
|
@ -1399,11 +1399,25 @@ makefile and restart, and never do anything else. So, to avoid this,
|
|||
@code{make} will @strong{not} attempt to remake makefiles which are specified
|
||||
as targets of a double-colon rule with a recipe but no prerequisites.
|
||||
|
||||
Phony targets (@pxref{Phony Targets}) have the same issue: they are never
|
||||
Phony targets (@pxref{Phony Targets}) have the same effect: they are never
|
||||
considered up-to-date and so an included file marked as phony would cause
|
||||
@code{make} to restart continuously. To avoid this @code{make} will not
|
||||
attempt to remake makefiles which are marked phony.
|
||||
|
||||
You can take advantage of this to optimize startup time: if you know you don't
|
||||
need your @file{Makefile} to be remade you can prevent make from trying to
|
||||
remake it by adding either:
|
||||
|
||||
@example
|
||||
.PHONY: Makefile
|
||||
@end example
|
||||
|
||||
or:
|
||||
|
||||
@example
|
||||
Makefile:: ;
|
||||
@end example
|
||||
|
||||
If you do not specify any makefiles to be read with @samp{-f} or
|
||||
@samp{--file} options, @code{make} will try the default makefile names;
|
||||
@pxref{Makefile Names, ,What Name to Give Your Makefile}. Unlike
|
||||
|
|
Loading…
Reference in a new issue