summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Bootstrapping aid from pre-kqueue(2) systems, e.g. 4.0-RELEASE.ru2002-12-011-0/+2
| | | | | Submitted by: jmallett Approved by: re (bmah)
* Finish the fix in revision 1.39 -- make(1)'s behavior is nowru2002-11-281-12/+9
| | | | | | "greedy" with respect to finding the dependency operators. Approved by: re
* Convert some broken cases where Error is called, but we try to continue,jmallett2002-11-081-17/+5
| | | | | | | | | | | | to Fatal errors, because the logic that we use to try to continue is far too broken, and makes things look and act weird, because we end up pointing past the end of a buffer boundry into freed memory in the caller, as we don't come close to setting the lengthPtr to a sane value. Reviewed by: make@ (This only changes failure cases which would have died horrid deaths to explicit clean death failure cases.)
* Document the confusing behavior that the .if conditional defaultsru2002-11-011-0/+1
| | | | | to defined(), e.g., ``.if 1'' is equivalent to ``.if defined(1)'', which is only true when the ${1} variable is defined.
* bsd.doc.mk changes:ru2002-10-291-1/+0
| | | | | | | | | | | | | | | Don't gratuitously pipe thru a cat(1) if NODOCCOMPRESS. Only create _stamp.extra when necessary. Get rid of SOELIMPP and OBJS. Use Groff version of soelim(1); we need its -I option for the following to work. Don't needlessly chdir to SRCDIR. Only a few documents need CD_HACK, and those that need it either use refer(1) or .PSPIC macro which internally uses the .psbb call.
* In VarHead(), look into the correct (modified) string.jmallett2002-10-291-1/+1
|
* Mention that the left-hand side of the comparisonru2002-10-291-3/+2
| | | | | | | | conditional must always be a variable expansion. Obtained from: PMake Do not lie that debugging .for loops is a no-op.
* Split var.c into var.c and var_modify.c and move all the modification funcsjmallett2002-10-287-669/+731
| | | | | | | | to var_modify.c, for readability. constify some low hanging fruit (string manipulation functions) and the upper layers appropriately. No longer use the private strstr(3) implementation, while changing string code. Tested by: lots of successful make buildworld.
* Fix problem with my ability to tell the difference between 'r' and 'l'... Wejmallett2002-10-241-1/+1
| | | | | | | | want to check var[1], not val[1]. Submitted by: Mark Valentine <mark@thuvia.demon.co.uk> Pointed out by: sam Pointy hat to: jmallett
* When expanding a specific [1-char] variable, only expand said specificjmallett2002-10-241-1/+1
| | | | | | | [1-char] variable. Don't just automatically expand something which starts with that character. Obtained from: OpenBSD [3 years ago!]
* Duplicate the variable name in the v->name field, as otherwise it points tojmallett2002-10-241-1/+3
| | | | | | | | data that will be modified. And do the appropriate thing now and free the v->name buffer along with other relinquished memory. XXX There is duplication here of destroying a Var, which is probably bogus, and probably missed in a few places.
* Remove efree(), it isn't used consistently enough to even pretend that itjmallett2002-10-2310-27/+24
| | | | | | might help on the systems it could possibly be used as a bandaid for. In fact, the only thing it's useful for is instrumenting free(3) calls, and in that capacity, it's better served as a local patch, than a public wrapper.
* De-obfuscate and correct the include path handling for SysV style includes.jmallett2002-10-231-35/+4
| | | | | | | PR: 32759 Submitted by: Mark Valentine Reviewed by: Matthew Emmerton" <matt@gsicomp.on.ca> MFC after: 15 days
* Move utilitarian routines to util.c, which isn't the same as the oldjmallett2002-10-104-234/+288
| | | | | | compatability-geared util.c. These are things like message printers and the PrintAddr function for traversing lists. Other general-purpose utilities inside make(1) can go here, in time.
* Convert make(1) to use ANSI style function declarations. Variablejmallett2002-10-0915-771/+340
| | | | | | | | | | | documentation already adequatedly existed in the description in most cases. Where it did not, it was added. If no documentation existed beforehand, then none was added. Some unused dummies for use in the traversal functions were marked as __unused during the conversion. Occasionally, local style fixes were applied to lines already being modified or influenced. Now make(1) should always build with WARNS=3.
* Use __FBSDID in the lst.lib files, to match to main make(1) files. It isjmallett2002-10-0926-26/+26
| | | | | defined to __RCSID when bootstrapping, by the Makefile, but this change is for consistency
* Remove extern declarations from functions and source files where they wouldjmallett2002-10-094-3/+4
| | | | happily fit into headers.
* Remove unused local-locals, where upper-level locals may safely be used.jmallett2002-10-091-8/+8
|
* Reference the correct local variable in all parts of a for loop, so wejmallett2002-10-081-1/+1
| | | | | | operate on the correct data (properly). Tracked down by: Dan Nelson
* Give make(1) the ability to use KQUEUE to wait for worker processesphk2002-10-043-1/+57
| | | | | | | | | instead of polling for them. Unfortunately we cannot enable it yet because it panics the kernel somewhere in kqueue. Submitted by: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>
* In lieu of a good way to prevent every possible looping in make(1), stopjmallett2002-10-031-0/+21
| | | | | | | | | there from being more than 500 processes forked by make(1), to prevent a forkbomb from happening, in a dumb and mechanical way. PR: alane Submitted by: bin/42772 MFC after: 2 weeks
* Code that has been #if0'd with the comment "WHY" since revision 1.1 canjmallett2002-10-021-8/+1
| | | | disappear.
* Remove 6-years-stale #if0, the behaviour isn't ever going to be limited tojmallett2002-10-021-5/+1
| | | | compatible mode, as far as I know, since we use it...
* Fix spurious three-space indentation in a four-space indentation file.jmallett2002-09-291-2/+2
|
* Fix ability to use csh(1) as the make(1) shell.jmallett2002-09-291-1/+3
| | | | Sponsored by: Bright Path Solutions
OpenPOWER on IntegriCloud