summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/make.1
diff options
context:
space:
mode:
authorfjoe <fjoe@FreeBSD.org>2007-03-08 09:16:11 +0000
committerfjoe <fjoe@FreeBSD.org>2007-03-08 09:16:11 +0000
commit19d858e266534f79d31f05bb4f1b0810dae9b0e4 (patch)
tree4df26b7f4601246e5adacdf07dd59f9d468d6c03 /usr.bin/make/make.1
parentf6d48b2630c435828501c18fc4f28e9a6df9adfd (diff)
downloadFreeBSD-src-19d858e266534f79d31f05bb4f1b0810dae9b0e4.zip
FreeBSD-src-19d858e266534f79d31f05bb4f1b0810dae9b0e4.tar.gz
Implement "Remaking Makefiles" feature:
After reading Makefile and all the files that are included using .include or .sinclude directives (source Makefiles) make considers each source Makefile as a target and tries to rebuild it. Both explicit and implicit rules are checked and all source Makefiles are updated if necessary. If any of the source Makefiles were rebuilt, make restarts from clean state. To prevent infinite loops the following source Makefile targets are ignored: - :: targets that have no prerequisites but have commands - ! targets - targets that have .PHONY or .EXEC attributes - targets without prerequisites and without commands When remaking a source Makefile options -t (touch target), -q (query mode), and -n (no exec) do not take effect, unless source Makefile is specified explicitly as a target in make command line. Additionally, system makefiles and .depend are not considered as a Makefiles that can be rebuilt. Reviewed by: harti
Diffstat (limited to 'usr.bin/make/make.1')
-rw-r--r--usr.bin/make/make.145
1 files changed, 45 insertions, 0 deletions
diff --git a/usr.bin/make/make.1 b/usr.bin/make/make.1
index e77ec19..393e4f5 100644
--- a/usr.bin/make/make.1
+++ b/usr.bin/make/make.1
@@ -1465,6 +1465,51 @@ Several flags can be specified on a single
.Ic .WARN
target by seperating them with blanks.
.El
+.Sh REMAKING MAKEFILES
+After reading Makefile and all the files that are included using
+.Ic .include
+or
+.Ic .sinclude
+directives (source Makefiles)
+.Nm
+considers each source Makefile as a target and tries to rebuild it.
+Both explicit and implicit rules are checked and all source Makefiles
+are updated if necessary. If any of the source Makefiles were rebuilt,
+.Nm
+restarts from clean state.
+.Pp
+To prevent infinite loops the following source Makefile targets are ignored:
+.Bl -bullet
+.It
+.Ic ::
+targets that have no prerequisites but have commands
+.It
+.Ic !
+targets
+.It
+targets that have
+.Ic .PHONY
+or
+.Ic .EXEC
+attributes
+.It
+targets without prerequisites and without commands
+.El
+.Pp
+When remaking a source Makefile options
+.Ic -t
+(touch target),
+.Ic -q
+(query mode), and
+.Ic -n
+(no exec) do not take effect, unless source Makefile is specified
+explicitly as a target in
+.Nm
+command line.
+.Pp
+Additionally, system makefiles and
+.Ic .depend
+are not considered as a Makefiles that can be rebuilt.
.Sh ENVIRONMENT
The
.Nm
OpenPOWER on IntegriCloud