summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
Commit message (Collapse)AuthorAgeFilesLines
* Put variable assignments on .MAKEFLAGS and .MFLAGS targets intoharti2004-08-124-52/+13
| | | | | | | | | the .MAKEFLAGS variable so that these are also passed to sub-makes. This makes the handling of variables in the command environment more consistent. PR: bin/68853 Submitted by: Martin Kamerhofer <data@sbox.tugraz.at>
* Make explicit that MAKEOBJDIRPREFIX and MAKOBJDIR must be setharti2004-08-091-0/+7
| | | | | | | | | 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.
* Correct the .Dd date. Pluralize 'assignment' in one place.harti2004-08-041-2/+2
| | | | Requested by: ru
* Correct the description of the MFLAGS and .MAKEFLAGS variables. Addharti2004-08-031-6/+16
| | | | | | 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.
* Put variable assignments from the command line into the MAKEFLAGSharti2004-08-034-32/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | variable as required by POSIX. This causes such variables to be pushed into all sub-makes called by the make (except when the MAKEFLAGS variable is explicitely changed in the sub-make's environment). This makes them also mostly un-overrideable in sub-makes except on the sub-make's command line. Therefor specifying 'make CC=icc' will cause icc to be used as C compiler in all sub-makes no matter what the Makefiles itself try to do to the CC variable. This patch also corrects the handling of the MFLAGS variable. MFLAGS contains all the command line flags but not the command line variable assignments. The evaluation of the .MFLAGS or .MAKEFLAGS target now changes both MFLAGS and MAKEFLAGS (they used to change MAKEFLAGS only). Makefiles can use MFLAGS for their own purposes given that they do not except MFLAGS to be undefined at the beginning and that they don't evaluate .MFLAGS or .MAKEFLAGS. MFLAGS should be removed for POSIX compliance, but it is unfortunately heavily used by the X makefiles. This has been extensively tested by port builds (thanks to portmgr), new worlds and kernels. PR: standards/57295 (1st part above) Submitted by: James E. Flemer <jflemer@alum.rpi.edu> Approved by: portmgr Obtained from: NetBSD (1st part above) MFC after: 4 weeks
* Make the SIGCHLD handler static and declare its argumentharti2004-08-031-2/+2
| | | | as unused, so that make can be compiled with WARNS=3 again.
* Bump the date in .Dd for the recent '+' flag commit.harti2004-07-291-1/+1
| | | | Requested by: ru
* Implement POSIX's '+' flag for command lines. This flag causes a lineharti2004-07-295-32/+75
| | | | | | | | | | | | | | | 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
* Fix handling of comments on .elif lines. The patch given in a followupharti2004-07-221-0/+7
| | | | | | | | | | | | to the PR failed, because the line skipping function is actually called from two places in the code to do quite different things (this should be two functions probably): in a false .if to skip to the next line beginning with a dot and to collect .for loops. In the seconds case we should not skip comments, because they are actually harder to handle than we need for the .if case and should defer this to the main code. PR: bin/25627 Submitted by: Seth Kingsley (original patch)
* Improve make's diagnostic of mistmatched .if-.endif. This patch isharti2004-07-203-18/+39
| | | | | | | | | | slightly different from the patch in the PR. The problem is, that make handles .if clauses inside false .if clauses simply by counting them - it doesn't put them onto the conditional stack, nor even parses them so we need an extra line number stack for these ifs. PR: bin/61257 Submitted by: Mikhail Teterin <mi@aldan.algebra.com>
* Make it clearer what means 'won't work' for .if string == ${VAR}.harti2004-07-191-5/+12
| | | | | | | | | | | | | 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>
* Remove the dependency of the :C/regexp/replacement/ variable modifierkeramida2004-07-181-8/+7
| | | | | | | | | 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>
* Mechanically kill hard sentence breaks.ru2004-07-021-2/+2
|
* manlinteik2004-07-021-6/+5
| | | | Obtained from: ru
* New variable `.MAKEFILE_LIST', useful for tracing, debugging and dependency ↵eik2004-07-022-3/+30
| | | | | | | | | | | tracking. Use make -V .MAKEFILE_LIST | tr \ \\n | awk '$0==".." {l--; next} {l++; printf "%*s%s\n", l, " ", $0}' to print a tree of all included makefiles. Approved by: joerg MFC after: 1 week
* Markup nits.ru2004-05-191-7/+7
|
* Treat kevent(2) returning an error EINTR as the non-error it is.green2004-04-201-2/+3
|
* The .DEFAULT target with no commands caused a null pointer dereference.ru2004-04-121-1/+6
| | | | | PR: bin/63405 Obtained from: NetBSD
* Document the new .warning directive.ru2004-04-121-2/+8
|
* Added the new .warning directive.ru2004-04-121-3/+33
| | | | Submitted by: Cyrille Lefevre
* Unbreak compilation on RELENG_4.ru2004-04-051-1/+1
| | | | Submitted by: des
* Sort #includes, remove <sys/types.h> (made redundant by <sys/param.h>),des2004-04-051-4/+6
| | | | | | add <signal.h> (needed for sigaction()) Noticed by: Stefan Farfeleder <stefan@fafoe.narf.at>
* Reworked the fix to print the useful line number on error inru2004-03-103-89/+79
| | | | | | | | | | | the .for loop: - Replaced four global variables in parse.c with one. - Made Parse_FromString() accept the "lineno" as an argument. - Fixed line numbering when there are escaped newlines in the body of the .for loop. Adopted from: NetBSD
* Make it possible to ``.undef ${VAR}'' (expanding VAR to getru2004-03-091-0/+1
| | | | | | the variable name to undef). Submitted by: Cyrille Lefevre
* Fixed line numbering inside the .for loops.ru2004-03-091-1/+3
| | | | Submitted by: Cyrille Lefevre
* Fixed a bug that previous revision has introduced -- we missedru2004-01-251-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | the double quotes ("" and '') as a separate argument. Reported by: ache The fix in this and previous revisions combined is functionally equivalent to the below patch against rev. 1.27 but the code is now much easier to follow: %%% Index: str.c =================================================================== RCS file: /home/ncvs/src/usr.bin/make/str.c,v retrieving revision 1.27 diff -u -r1.27 str.c --- str.c 28 Oct 2002 23:33:57 -0000 1.27 +++ str.c 25 Jan 2004 12:09:21 -0000 @@ -168,7 +168,7 @@ inquote = (char) ch; /* Don't miss "" or '' */ if (start == NULL && p[1] == inquote) { - start = t + 1; + start = t; break; } } %%%
* Fixed broken logic when parsing double quotes.ru2004-01-221-14/+5
| | | | | PR: bin/61673 MFC after: 1 month
* Revert previous commit, ru has ideas how to better document thisschweikh2004-01-211-9/+1
| | | | elsewhere.
* Document __MAKE_CONF and its default, /etc/make.conf.schweikh2004-01-191-1/+9
| | | | MFC-After: 2 weeks
* Allow variable substitutions in SYSV variable substitutions likeharti2004-01-121-22/+33
| | | | | | | $(SRC:.c=$O). This brings us closer to other makes. Reviewed by: ru Obtained from: NetBSD
* Moved the code for :U and :L modifiers where it belongs, so thatru2004-01-101-32/+32
| | | | | the fallback for SysV (now in POSIX) variable substitution works for old_string arguments starting with 'U' or 'L'.
* Change the select timeout from 100ms to 2 seconds now that SIGCHILD isscottl2003-12-191-2/+2
| | | | handled.
* Install a SIGCHLD handler so select(2) will be interrupted when a childdes2003-12-131-0/+20
| | | | | | | | | | terminates. Without this patch, 'make -j1 buildworld' takes about 30% longer than 'make -B buildworld' on my 2.4 GHz P4; the difference is probably even larger on faster systems. With this patch, there is no perceptible difference in wall time between the two. Submitted by: bde MFC after: 3 days
* Fix a bug in variable parsing code that could cause a segfault.ru2003-10-061-2/+6
| | | | | PR: bin/46203 Submitted by: Stefan Farfeleder <stefan@fafoe.dyndns.org>
* Make the -q option DTRT in the compat mode.ru2003-10-032-1/+2
| | | | PR: 48210
* Fix a bug that prevented exists() from finding "foo/", "foo/."ru2003-10-021-3/+8
| | | | | | and "foo/.." when ".PATH: foo" was also given. PR: bin/34062
* Document the recently added `O' modifier.ru2003-10-021-0/+2
|
* Implement the O modifier. The O modifier sorts the words in amarcel2003-09-181-1/+51
| | | | | | | variable. The implementation is based upon the patch sent to arch@, but modified to be compatible with NetBSD. The modifier that does a reverse sort has been dropped for now, but the ability to add one later has been preserved.
* - Cut out the code that caches the "." directory out of Dir_Init()ru2003-09-144-67/+87
| | | | | | | | | | into a separate function, Dir_InitDot(). - Postpone the current and object directories detection (and caching of the "." directory) until after all command line arguments are parsed. This makes the -C option DTRT. PR: bin/47149
* Command line variables take precedence over global variables.ru2003-09-081-1/+1
| | | | | | | | | | | | | | Make this true in the .for loops too. The following fragment, FOO= foo bar all: .for f in ${FOO} @echo ${f} .endfor when run as "make FOO=xxx" should print "xxx". (OpenBSD had this bug fixed for some time.)
* Keep up with minor changes to NetBSD. Consider a variable empty whenimp2003-09-071-1/+1
| | | | | | not define. Obtained From: NetBSD (rev 1.18; sjg)
* Fixed broken arithmetic expression parser.ru2003-07-041-5/+2
| | | | | Reminded by: bde In memory of: alane
* Sync usage() with SYNOPSIS.ru2003-04-151-3/+3
|
* No need to check to see if we're running a version of FreeBSD 3.0 current orimp2003-04-041-3/+0
| | | | newer anymore.
* Remove another unused Makefile.trhodes2003-02-031-8/+0
|
* Change the handling of non-anchored global substitutions of the emptymarcel2003-01-151-8/+9
| | | | | | | | | | | | | | | | | | | string from a silent implicit non-global substitution to a non-silent explicit fatal error. Archored substitutions are those containing '^' or '$'. The problem with changing the substitution to prevent an infinite number of matches is that it doesn't provide the necessary feedback to the user that there's a bug in the/a makefile. Reporting the bug without making the condition fatal makes the feedback mostly useless due to the way that make fails to prefix the error with program name, makefile file name and line number information. Note that global substitutions of the empty string anchored with '^' (start of string) or '$' (end of string) do not cause an infinite number of matches and are therefore not reported and hence are non- fatal. Suggested by: bde Tested with: buildworld
* Prevent infinite substitution of the empty string by forcing non-marcel2003-01-131-0/+11
| | | | | | | | global substitution. In general it's a makefile bug to globally substitute the empty string, but it's a bug in make(1) if a bug in the makefile yields an infinite running time of make(1). Not objected to by: arch@
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-301-1/+1
| | | | Add FreeBSD Id tag where missing.
* Fixed the abuses of .Ql visible on stderr in troff mode.ru2002-12-231-63/+63
| | | | PR: docs/37176
* Check the return status of chdir() when using the -C option.seanc2002-12-171-1/+2
| | | | | Reviewed by: bright && jmallet MFC after: 1 day
OpenPOWER on IntegriCloud