Commit Graph

62 Commits

Author SHA1 Message Date
mycroft 139c9e6bf2 Once again, do the warning in a format that doesn't completely blow, and that
corresponds with text in the man page.  Also split it into 2 pieces that can
both be used with, e.g., C-x` in Emacs.
2001-01-14 20:54:16 +00:00
christos 3fbe1ebe81 convert error messages into english 2001-01-14 06:02:25 +00:00
christos 07c4e36361 We cannot override commands yet, ignore the additional sets for now.
This will be reverted when the tree is fixed.
2001-01-14 05:41:08 +00:00
christos 50a2a73342 - make the second list of commands override the first like gmake does
- remember where the first command definition occured so that we can debug
  things.
2001-01-14 05:34:06 +00:00
cgd 741c8f626f back out the change in rev 1.57. it was misguided; see discussion
on current-users (subject "build problem - multibyte.c").
2001-01-13 20:36:58 +00:00
jdolecek f68d9de78d only print the 'duplicate script for target' warning if
parseWarnFatal is on
2001-01-12 09:27:44 +00:00
christos bda102d681 PR/11800: Chris Demetriou: Add -W flag to exit on parse warnings.
While I am here, s/make:.*"/%s:\1", progname/
2001-01-10 15:54:00 +00:00
sjg 85be2f6526 Always try an give the absolute pathname of the Makefile that we got an error in.
Use .PARSEDIR if set and not '.', otherwise .CURDIR to qualify the Makefile's path.
2001-01-07 06:08:33 +00:00
sommerfeld e65a50bf34 Boolean consistancy (use TRUE, not 1) 2000-12-05 17:07:01 +00:00
is 135600f947 More format string cleanup by sommerfeld. 2000-10-11 14:46:00 +00:00
mycroft 796fb2ec8c Readd optimization last night. Problems earlier were partially due to the
arguments names on one function being swapped (by a previous author).

Do not do any duplicate suppression when a source list is created.  Instead:
* OP_MADE protects against trying to make the source multiple times.
* A new OP_MARK flag is introduced to suppress duplicates while expanding
  the .ALLSRC variable and .USE targets.
This turns the O(n^2) insertion into O(n) in most cases.

This is tested with a `make build' and some special test cases.
2000-06-11 07:39:52 +00:00
mycroft 83660a50d9 Back out last night's optimization for now. 2000-06-10 22:28:33 +00:00
mycroft edfd0106e2 Introduce an OP_MARK bit, and use it to suppress duplicates during .ALLSRC
and .USE expansion.  Also, remove some more Lst_Member() checks that are now
redundant.
2000-06-10 21:44:08 +00:00
mycroft 83f22c12ea Nuke an `optimization' that made source list creation O(n^2). This may cause
more memory to be used with stupid Makefiles, but it saves a fair amount of
time (~13% just for libc) with sane ones.
2000-06-10 13:48:48 +00:00
sjg 214b560694 allow .POSIX to define %POSIX as in FreeBSD 2000-05-11 08:22:40 +00:00
mycroft 2500a4b975 Some minor cleanup of :: tests. 1999-09-16 00:54:14 +00:00
mycroft b12871c6cb Rework how :: dependencies are handled.
Build a list of `cohorts' as before, but do *not* link each one into all the
parent nodes; instead, copy the `cohort' lists into the stream of targets to
be built inside Make_ExpandUse().  Also do the attribute propagation as a
separate pass after parsing.
This eliminates several O(n^2) algorithms.
1999-09-15 10:47:37 +00:00
mycroft dd291116bc Don't bother iterating through all the data structures to free(3) everything
right before exiting.
(The code is still present, `#ifdef CLEANUP', in case someone needs it...)
1999-09-15 08:43:21 +00:00
aidan 58f27ba58c Added .PARSEDIR and .PARSEFILE variables to make(1). 1999-08-09 21:06:28 +00:00
ross 0728723c31 Trivial speed hack. 1999-08-04 02:54:56 +00:00
christos f15f83610f Fix awful bug where:
V := $V foo
	V := $V bar

would report that variable V is recursive...
1999-06-02 18:47:11 +00:00
ross 3eb0afd457 Fix a bug that apparently prevented, since day 1, the .-include / .sinclude
feature from ever working. Also, fix the man page that incorrectly described
the syntax of the feature that didn't work.
1998-11-17 23:56:23 +00:00
christos 889ce7db6e - full prototypes
- more conservative printf
- char -> unsigned char
1998-11-06 23:31:09 +00:00
christos aed39ca72c PR/6174: ITOH Yasufumi: Purify bug and a compile error in utility code. 1998-09-18 20:15:36 +00:00
christos 8bd03e9aab - Add {.,}[s-]include for silent include file failures
- Make traditional include statement include more than one file if present
  on the line.

Keeping up with the other's :-)
1998-08-06 13:42:22 +00:00
fair 78f41cb540 patch from PR#3573 to rename a variable "main" to "mainList" 1998-03-23 08:52:48 +00:00
lukem 2ba9e97765 wrap #include <sys/cdefs.h>, __RCSID(...) stuff in #ifndef MAKE_BOOTSTRAP 1997-09-28 03:30:58 +00:00
christos 87d111ebee #if __STDC__ -> #ifdef __STDC__ 1997-07-11 20:17:37 +00:00
christos 254d64f064 Add WARNS=1
RCSID police
1997-07-01 21:17:00 +00:00
mycroft f88245a571 Make sure to propagate OP_PHONY to all cohorts that already existed. 1997-05-09 04:08:26 +00:00
gwr bf6930a26c Add the new .NOPATH feature which can be used to disable .PATH search
for particular targets, i.e. .depend, objects, etc.  (from Christos).
1997-05-08 21:24:41 +00:00
mycroft 01925a4fb0 Copy the .PHONY attribute to the cohorts of a double dependency. 1997-05-07 13:12:33 +00:00
christos 193e8d1b7d - Target searching addition:
Make used to only use the search path for nodes that were pure
	sources (not targets of other sources). This has been corrected
	and now gnu-autoconf generated Makefiles work in directories other
	than the source one.

- Suffix transformation rescanning:
	Suffix transformations (.c.o:; cc ...) were only recognized in
	the past when both suffixes were members of the suffix list.
	Thus a sequence like:
		.z.b:
			echo ${.TARGET}
		.SUFFIXES: .z
	would cause .z.b: to be inserted as a regular target (and the main
	target in this case). Other make programs always add rules that
	start with a period in the transformation list and never consider
	them as targets. We cannot do that (consider .depend files) so we
	resort to scanning the list of the current targets every time a
	suffix gets added, and we mutate existing targets that are now
	valid transformation rules into transformation rules. If the
	transformed target was also the main target, we set the main target
	to be the next target in the targets list.
1997-05-02 14:24:27 +00:00
christos dd0a1d0814 Add a .MADE directive to indicated that the children of a target are
up-to-date, even when they are not. This is to simulate our current
make install behavior with proper dependencies.
1997-03-10 21:19:49 +00:00
christos e43039b92f add a missing 'static' decl. 1996-12-31 17:55:28 +00:00
christos aa49881371 - Merge in FreeBSD and Lite2 changes.
- Fix bug where a non-archive target with a .a suffix would always
  be considered to be out of date, since it does not have a TOC.
1996-11-06 17:58:58 +00:00
thorpej dff3ccad44 Fix extra "make:" and newline in error message.
From enami tsugutomo <enami@ba2.so-net.or.jp>, PR #2651.
1996-09-27 02:36:58 +00:00
christos 453e90716c - Fix bug where the first line after a conditionally skipped was not ready
in its entirety if it contained a continuation.
- Print the whole error line, not just the first 20 characters of it.
1996-09-13 04:22:09 +00:00
christos 091b5c0118 Add estrdup(), a checked version of strdup and use it. 1996-08-13 16:42:00 +00:00
christos 5c1983c016 - Move -D flags from Makefile to config.h and explain what they do. Add
-Wall -Wno-unused to CFLAGS. Add new define SYSVVARSUB to enable SysV
  style variable substitutions and enable them.
- Add SunOS style command substitutions via SUNSHCMD
- Fix core dump with '{variable = value'
1996-05-28 23:34:35 +00:00
christos 0acf990595 Add PHONY attribute and target. This is the first step to cleanup the
xinstall and xlint crud.
1996-03-15 21:52:32 +00:00
christos 9779dee0b1 Fix PR/2118; apply sysincludes patch. 1996-03-06 00:15:17 +00:00
christos 1b11cdf58d if PR/2090, sysvinclude too optimistic, did not check for space after the
include keyword
1996-02-17 13:28:09 +00:00
thorpej fb02474c1f In ParseDoInclude(), make a temporary copy of the current file name
while searching for ""-type include files, since the current file name
might not be a writeable string.
1996-02-07 23:04:04 +00:00
christos f0874be2f5 - Added .WAIT to synchronize between sources like other pmake variants.
- Updated documentation to include .ORDER .PARALLEL .NO_PARALLEL .NONPARALLEL
1995-12-16 05:03:09 +00:00
christos 61067003d8 Minor:
- ${.PREFIX} should never contain a full pathname
    - Fixed gcc -Wall warnings
Major:
    - compatMake is now FALSE. This means that we are now running in
      full pmake mode:
	  * rules on dependency lines can be executed in parallel and or
	    out of sequence:

	    foo: bar baz

	    can fire the rule for baz before the rule for bar is fired.
	    To enforce bar to be fired before baz, another rule needs to be
	    added. [bar: baz]
	  * adjacent shell commands in a target are now executed by a single
	    invocation of the shell, not one invocation of the shell per line
      (compatMake can be turned off using the -B flag)
    - The -j flag now works... I.e. make -j 4 will fork up to four jobs in
      parallel when it can. The target name is printed before each burst
      of output caused by the target execution as '--- target ---', when j > 1
    - I have changed all the Makefiles so that they work with make -j N, and
      I have tested the whole netbsd by:
	  'make -j 4 cleandir; make -j 4 depend; make -j 4; make -j 4 install'
    - I have not compiled or tested this version of make with -DREMOTE.
1995-11-02 23:54:35 +00:00
christos 17c2255148 Fix PR/1443:
Dependency rules with `=' in the lhs are parsed as variable assignments.
E.g., the following Makefile fails:

A=a b c d
all: $(A:%=%b)
$(A:%=%b):
	@echo $@
1995-09-10 03:58:16 +00:00
christos b5f782e810 - $NetBSD$ rcsids
- Fixed so that .[A-Z]* targets that do not match keywords are ignored as
  Posix mandates
- Added .PHONY target keyword
1995-06-14 15:18:37 +00:00
ws de7fa9654c Sort keyword table correctly, so binary search really works 1995-05-15 13:10:10 +00:00
christos f222a602cf Fixed so that orphan tabs are ignored. Should close PR760. 1995-02-08 04:36:41 +00:00