Commit Graph

120 Commits

Author SHA1 Message Date
Christian Brueffer
346bfbfcce - Missing full stops
- Upper case the first character of an description
- Section headings do not need to be quoted. From OpenBSD's make.1, revision 1.81
- Plural of suffix is suffixes. From OpenBSD's make.1, revision 1.61
- s/seperating/separating/

PR:		135165
Submitted by:	Alan R. S. Bueno <alan.bsd@gmail.com>
MFC after:	1 week
2010-05-12 02:00:11 +00:00
Ruslan Ermilov
8f5f49447d Eliminated nits from last commit.
OK'ed by:	rodrigc
2010-01-27 21:06:53 +00:00
Craig Rodrigues
ab13f9f29e Partial merge of man page cleanups from NetBSD:
revision 1.91
  Fri Nov 7 01:01:46 2003 UTC by lukem

  Add some subsections in the VARIABLE ASSIGNMENTS section.

  In the "modifier description" list, show each modifier with the leading `:'.
  Rationale: it's hard to search for modifiers without it, and we already do
  the same thing in the -options and .makecommands lists.  I now find it much
  easier to find the description for a modifier in the man page.

Obtained from: NetBSD
2010-01-27 02:38:10 +00:00
David E. O'Brien
290dac20e6 Add ability to search up the directory hierarchy for the system directory.
Do by specifying ".../" with '-m' or MAKESYSPATH (new) environment variable.

Reviewed by:	<sjg@NetBSD.org>
Obtained from:	NetBSD (+ embellishment by me, sent back to NetBSD)
2010-01-04 18:57:22 +00:00
Max Khon
c2502d78e1 Avoid infinite loops when remaking makefiles not only
for Makefile targets but also for targets they depend on.
2009-04-07 19:49:38 +00:00
David E. O'Brien
eee3404481 + Add the -Q be-quiet flag for parallel jobs.
- Enable -Q by default for the moment - there is something weird
  going on in the rescue build.
2009-01-03 10:14:01 +00:00
David E. O'Brien
78885448f1 1. Add the ability to tweak the token output before targets in job mode.
E.g.,  .MAKE.JOB.PREFIX=${.newline}---[${.MAKE.PID}]
   would produce

   ---[1234] target ---

2. Added ${.newline} as a simple means of being able to include '\n' in the
   assignment of .MAKE.JOB.PREFIX

Obtained from:	NetBSD
2008-12-29 10:26:02 +00:00
Tom Rhodes
610c7c3155 Fix up after last commit:
Bump doc date;
Kill hard sentence breaks;
Fix commas by moving them off their own line.
2008-12-27 00:17:41 +00:00
Luigi Rizzo
5e7fbb7b5e Clarify the behaviour of conditionals when dealing with comparisons.
In particular, point out that string comparison can only use != and ==
(how weird, given that the underlying call to strcmp returns more
information), that floating point values are correctly interpreted
as numbers, and that the left-hand side must be a variable expansion.

MFC after:	3 weeks
2008-12-26 22:31:45 +00:00
Ed Schouten
40e761838e Add POSIX -p flag to make(1).
This article [1] describes the -p flag for make(1):

	Write to standard output the complete set of macro definitions and
	target descriptions. The output format is unspecified.

We already support a similar flag (-d g1), but unlike -p, it still
executes commands. Our implementation just turns it into -d g1, but also
sets flag `printGraphOnly', which will cause make(1) to skip execution.

[1] http://www.opengroup.org/onlinepubs/009695399/utilities/make.html

Reviewed by:	imp
PR:		standards/99960
2008-07-30 21:18:38 +00:00
David E. O'Brien
1082b19643 Note that the .POSIX special target disables the "Remaking Makefiles" feature. 2008-06-27 14:35:33 +00:00
Ruslan Ermilov
8c9dc249d1 Fix bugs in the previous revision. 2008-03-24 09:47:44 +00:00
David E. O'Brien
ad9165a038 If the special target .MAKEFILEDEPS exists, then enable the
"remaking makefiles" feature.  Otherwise, follow traditional Pmake behavior.
(hash table will be regenerated and committed follow this commit)
2008-03-12 14:50:58 +00:00
Yaroslav Tykhiy
0c35219978 Don't forget to set MAKEFLAGS in the childs' environment
from the .MAKEFLAGS global variable even if it's empty or
unset.  This means setting MAKEFLAGS to just an empty string
in the latter case.

If not doing so, make(1) behaved inconsistently WRT MAKEFLAGS.
In particular, it would let a `-f foo' option down to sub-makes
if .MAKEFLAGS was unset.  E.g.,

	env MAKEFLAGS="-f mymakefile" make

would pass `-f mymakefile' down to sub-makes via their environment
(unless mymakefile added something to .MAKEFLAGS).
But any additional options appearing would change this behaviour to
not passing `-f mymakefile' to sub-makes, as in:

	env MAKEFLAGS="-f mymakefile" make -D DUMMY

or

	env MAKEFLAGS="-f mymakefile -D DUMMY" make

(unless mymakefile cleared .MAKEFLAGS).

Also make(1) would leave MAKEFLAGS at its initial value if the
makefile set .MAKEFLAGS to an empty value.  I.e., it was impossible
to override MAKEFLAGS with an empty value.  (Note well that makefiles
are not to touch MAKEFLAGS directly, they alter .MAKEFLAGS instead.
So make(1) can filter out things such as -f when copying MAKEFLAGS
to .MAKEFLAGS at startup.  Direct modifications to MAKEFLAGS just go
nowhere.)

While the original intentions of the BSD make authors are somewhat
unclear here, the bug proves that NOT passing -f options down is
the settled behaviour because the opposite behaviour is totally
unreliable in the presence of any other options.  In addition, not
passing down -f's found in the environment is consistent with doing
so WRT the command line.

Update the manpage accordingly and make the whole description of
MAKEFLAGS and .MAKEFLAGS more consistent as this change indeed
brings more consistency into the reliable behaviour of make(1).

Submitted by:	ru (main.c)
Tested with:	make world
2008-03-05 20:11:04 +00:00
Yaroslav Tykhiy
9966971b24 Move a stray paragraph on .Ev MAKEFLAGS to where it belongs. 2008-03-04 11:28:54 +00:00
Yaroslav Tykhiy
bfabc524aa Revise the description of how .Ev MAKEFILE and .Va .MAKEFILE relate.
The most important point is that -f option(s) are never copied from
.Ev MAKEFILE to .Va .MAKEFILE by make(1), which is consistent with
handling the command line.  (-f silently sit in .Ev MAKEFILE and go
to make's children unless overwritten via .Va .MAKEFILE)

Bump .Dd.
2008-03-04 11:25:23 +00:00
Yaroslav Tykhiy
ea5b47c61c Split descriptions of .Ev MAKEFILE and .Va .MAKEFLAGS for clarity. 2008-03-04 10:33:42 +00:00
Yaroslav Tykhiy
7773f5ddf9 Give more details on the following topics:
o How global, command-line, and environment variables relate.
o What peculiarities the -f option has WRT ${MAKEFLAGS}.
2007-10-31 08:20:09 +00:00
Max Khon
d2742a2b29 Better English. 2007-03-08 14:05:45 +00:00
Max Khon
9a81351403 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
2007-03-08 09:16:11 +00:00
Maxim Konovalov
1bfbae3533 o Grammar: is appears -> appears.
PR:		docs/107306
Submitted by:	Tomas Mozes
MFC after:	1 week
2006-12-31 07:22:55 +00:00
Yaroslav Tykhiy
9b3d1b0253 Fix a group of typos:
preceed -> precede,
preceeded -> preceded,
preceeding -> preceding.

Submitted by:	Andre Guibert de Bruet <andy@siliconlandmark.com>
2006-12-29 13:08:46 +00:00
Ruslan Ermilov
c4baa2453c Markup nit. 2006-09-29 21:17:10 +00:00
Ruslan Ermilov
cb29445a92 Markup fixes. 2006-09-29 15:20:48 +00:00
Max Khon
66b07418fa Add :u var modifier (remove adjacent duplicate words like uniq(1).
Reviewed by:	harti
Obtained from:	NetBSD (mostly)
2006-04-08 06:59:54 +00:00
Yaroslav Tykhiy
aeb2a851ad Revise the manpage to a certain extent, mostly with respect to
make's processing of top-level and included makefiles.  Point
out at make.conf(5) and __MAKE_CONF when telling about sys.mk.

Reviewed by:	ru
2005-10-14 23:54:20 +00:00
Yaroslav Tykhiy
9c4e83a46c __MAKE_CONF doesn't really belong here because it is
a FreeBSD extension of sys.mk.  A xref to make.conf(5)
will be enough here.

Requested by:	ru
2005-10-12 10:09:36 +00:00
Yaroslav Tykhiy
253c3c7312 Clarify the usage and effects of sys.mk, make.conf(5), and __MAKE_CONF.
MFC after:	2 weeks
2005-10-10 14:49:55 +00:00
Ruslan Ermilov
762fcdcf7d Remove redundant `\&' escapes. 2005-09-27 08:06:21 +00:00
Ruslan Ermilov
0b13db0306 Fixup previous commit. 2005-09-27 08:02:03 +00:00
Poul-Henning Kamp
2e5ee2bfac Add a .sinclude directive which does the exact same as .include, except
whine when the file cannot be found and opened.
2005-09-26 20:31:00 +00:00
Giorgos Keramidas
6fb9b618f5 Fix all the spelling mistakes I could find in the man pages for words
that have at least 3 characters.

MFC after:	1 week
Thanks to:	Music band ``Chingon''
		for keeping me company while searching for these.
2005-07-31 03:30:48 +00:00
Ruslan Ermilov
39c59153e9 Markup and wording fixes.
Approved by:	re (blanket)
2005-06-14 11:50:53 +00:00
Hartmut Brandt
51fb4c0273 Another shell attribute 'unsetenv' that will cause to unsetenv("ENV")
before executing the shell. Until now this was done when the default
shell was the ksh. This failed if the default shell was sh or csh and
the user switched to ksh.
2005-05-24 13:14:24 +00:00
Hartmut Brandt
d92e260a4a Describe the meta and builtins attributes for the .SHELL special
target.
2005-05-24 10:59:08 +00:00
Hartmut Brandt
af22b04427 Describe the -x option and the .WARN pseudo-target. 2005-05-24 10:55:00 +00:00
Hartmut Brandt
c06ac233d7 Document the new -A flag for ignoring archive errors. 2005-03-31 11:40:53 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Hartmut Brandt
b071ad2dca Fix quoting of the MAKEFLAGS environment variable by only quoting spaces
and tabs. This is still not correct for command line variable values
ending in a backslash because this would require a larger effort.
Document this limitation in the BUGS section of the man page. The
quoting is mostly compatible with that of gmake and smake.

Tested by:	Max Okumoto and Joerg Sonnenberger from DragonFly BSD
Reviewed by:	ru (man page, partly)
2005-01-26 18:19:39 +00:00
Ruslan Ermilov
6c7216df78 Sort sections. 2005-01-18 13:43:56 +00:00
Ruslan Ermilov
4438d91ea2 Scheduled mdoc(7) sweep. 2005-01-11 10:32:52 +00:00
Hartmut Brandt
b52c5e95b6 Describe the .SHELL target.
Reviewed by:	ru
2004-12-03 08:03:11 +00:00
Ruslan Ermilov
a1b597b050 Document the effects of modifying the .MAKEFLAGS internal
variable and using the .MAKEFLAGS special target, and the
differences between them.

Reviewed by:	harti
2004-08-18 13:25:46 +00:00
Hartmut Brandt
8460583b9f Make explicit that MAKEOBJDIRPREFIX and MAKOBJDIR must be set
as environment variables and should not be set on make's command
line. They happen to work accidentially as command line variables
too when none of the sub-makes wants to play games with them (because
make is putting command line variables into the environment and will
find them there later on). Makefile.inc1 wants to change
MAKEOBJDIRPREFIX. In this case one cannot set it on the command line.
2004-08-09 16:13:54 +00:00
Hartmut Brandt
413d82a6fd Correct the .Dd date. Pluralize 'assignment' in one place.
Requested by: ru
2004-08-04 15:10:35 +00:00
Hartmut Brandt
3f3d0ec007 Correct the description of the MFLAGS and .MAKEFLAGS variables. Add
the MFLAGS target. Document that variable assignments from the MAKEFLAGS
environment variable and the .MAKEFLAGS and .MFLAGS target have the
same precedence as command line variable assignments.
2004-08-03 19:14:14 +00:00
Hartmut Brandt
d010007507 Bump the date in .Dd for the recent '+' flag commit.
Requested by: ru
2004-07-29 16:54:42 +00:00
Hartmut Brandt
34c9c43931 Implement POSIX's '+' flag for command lines. This flag causes a line
to be executed even when -n is given on the command line to make. This is
very handy for calls to submakes.

This is slightly changed from the original patch as obtained from NetBSD.
The NetBSD variant prints lines which have both '+' and '@' when -n
is specified. The commited version always obeys '@'.

Bump MAKE_VERSION so Makefiles can use this conditionally.

PR:		standards/66357 (partly)
Submitted by:	Mark Baushke <mdb@juniper.net>
Obtained from:	NetBSD
2004-07-29 14:29:23 +00:00
Hartmut Brandt
e9345b8636 Make it clearer what means 'won't work' for .if string == ${VAR}.
Replace the use of '=' in conditionals in the examples
by the more correct '=='.

Clarify the example explaining that .for expansion takes place before
.if handling by showing the correct code instead of saying 'the other
way around'. Change a variable name there so the example is more parseable
to the human reader.

PR:		docs/65400
Submitted by:	Roman Neuhauser <neuhauser@chello.cz>
2004-07-19 14:42:57 +00:00
Giorgos Keramidas
ebca193729 Remove the dependency of the :C/regexp/replacement/ variable modifier
from the :S modifier which follows a bit further below.  This way the
reader can read each of these two descriptions without having to jump
back and forth in the manpage.

PR:		docs/26943
Submitted by:	Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>
2004-07-18 02:26:30 +00:00