Commit Graph

317 Commits

Author SHA1 Message Date
itojun
6924e04336 redo of previous: do not destroy v->val if str points to v->val.
XXX GC of v->val
2001-03-10 00:41:48 +00:00
itojun
4679105873 correct case with VAR_KEEP. if clause checked VAR_KEEP backwards,
and made str a dangling pointer.
2001-03-09 12:49:05 +00:00
sjg
cefcce2537 Test for non-existant LIB was incorrect (using cmtime cf. mtime). 2001-03-05 16:20:33 +00:00
christos
3e343f9152 PR/12251: Thomas Klausner: Make core dumps on unclosed conditional.
Well, it should say 'make core-dumps on any error on the primary makefile'.
This was a result of the new changes to print the path to the parsed
Makefile... Made the code a lot more conservative, plus prepended <progname>:
to each message.
2001-02-23 21:11:38 +00:00
cgd
2f928e31d3 <sys/time.h>, rather than <time.h>. The former is actually the documented
way to get gettimeofday(), etc.  On some systems on which you might want
to host make (e.g. solaris), <time.h> won't get you a struct timeval
definition.
2001-01-23 02:48:05 +00:00
thorpej
f9db1fd410 Add trace.o 2001-01-18 05:53:05 +00:00
cgd
d594ce939b comment or delete text after CPP directives. 2001-01-16 02:50:27 +00:00
cgd
3e8fb298b1 Avoid accidental use of trigraphs. Pointed out by development version of gcc. 2001-01-16 02:37:03 +00:00
christos
a5854c63b6 .PHONY gnode's don't get a PREFIX, so don't try to set the parent's prefixes
on a parallel make.
2001-01-15 22:17:09 +00:00
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
a73d3d97ca Provide a new .if commands(<target>) primitive that returns true if the
target has commands associated with it.
2001-01-14 20:44:26 +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
christos
a2da9e7752 make the -W arg work; it was not put in the getopt string. 2001-01-14 05:33:53 +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
fc4c89c68b ReadMakefile: Don't simply fopen() fname before checking if we are in separate
objdir.  This is the way freebsd does it, and apart from being more correct,
saves a lot of pointless fopen() calls.
2001-01-07 06:16:02 +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
ded2509e8b Missing bit of last change 2001-01-01 15:50:23 +00:00
sommerfeld
3274266e5f Delete forceSerial; just use compatMake for that.
Add -N flag to *really* not execute any commands (useful when using
the -d flags to debug usr/src/Makefile)
Document -N
Update documentation of -n to mention that it still executes commands
for targets marked .MAKE so that the -N/-n distinction is clear.
2001-01-01 15:47:37 +00:00
sommerfeld
1ef47ae656 Include token counts in trace output.
Don't let tokensFree go negative.
2000-12-30 16:38:22 +00:00
sommerfeld
dd9c50102d Fix token accounting for .BEGIN/.END jobs 2000-12-30 15:58:34 +00:00
sommerfeld
663ff035b1 Avoid token leaks when aborting after an error. 2000-12-30 14:21:22 +00:00
sommerfeld
129b8c6309 strdup tracefile so that it doesn't get smashed. 2000-12-30 02:52:03 +00:00
sommerfeld
9984263e63 Do lazy token release - don't return tokens to the pipe unless we're
waiting for something or we're done.
2000-12-30 02:51:21 +00:00
sommerfeld
8a39635d34 Back out debug cruft. 2000-12-30 02:06:42 +00:00
sommerfeld
a804073cac Add a token-passing scheme to allow a recursive make to successfully
use -j; all make's in a recursive build cooperate to limit the total
number of jobs, using a token-passing scheme.

The current token passing algorithm is similar to the one implemented
by gmake; there is a single pipe which is inherited through the entire
process hierarchy; tokens are obtained by reading a byte from the
"read end" of the pipe, and are returned by writing them to the "write
end".  This exact algorithm is likely to change in the future.

Implementation details:
 - Use the new trace facility to allow measurement of the
effectiveness of different token-passing schemes
 - Get a token in MakeStartJobs(), return it in Make_Update()
 - Eliminate Job_Full() and the jobFull global since they are
redundant with token system.
 - Add an "internal" -J option (to pass the token pipe fd's down to
submakes) and a -T option for tracing.
 - Change how compatMake is forced so that -j means something when
inherited by submakes.
 - When waiting for a token, poll the token-passing pipe as well as
the output pipes of existing jobs.
2000-12-30 02:05:20 +00:00
sommerfeld
694b899b9c Quick and dirty trace mechanism to make it easier to look at how different
parallel make job distribution algorithms work in practice.
2000-12-29 23:11:08 +00:00
mycroft
b91d3efb9a Make the fds[] realloc O(n). Also make the rethreading a lot simpler. 2000-12-05 21:57:20 +00:00
sommerfeld
e65a50bf34 Boolean consistancy (use TRUE, not 1) 2000-12-05 17:07:01 +00:00
sommerfeld
e3f68e5130 Make clearfd() take O(1) time instead of O(N) by moving only the last
job in the arrays to the hole made by the now-dead job.  No
measureable performance difference for -j4, but the code is simpler
this way.
2000-12-05 15:28:55 +00:00
sommerfeld
b5e2403ec9 correct performance regression of recent change from select() to
poll() for parallel make:
 - Make the poll() code behave more like the select() code: sleep for
a bit waiting for output rather than busy-wait (eww).
 - Install a no-op SIGCHLD handler so that poll/select wake up early
(with -1/EINTR) when a child exits.
 - Change the default sleep time from 500ms to 5 seconds since we now
wake up promptly when a child exits.
2000-12-05 15:20:10 +00:00
christos
fd8f9c7b9f oops forgot to commit this one. 2000-12-04 20:13:29 +00:00
christos
8ba1720b96 mycroft did not like my O(n^2) lookup algorithm, so I made things much
more complicated.
2000-12-04 17:45:17 +00:00
christos
105cc20925 1. switch to using poll by default; can be overriden by compiling with
-DUSE_SELECT
2. make sure that we don't overrun our allocated fd_set if USE_SELECT is defined
2000-12-03 02:19:32 +00:00
christos
709d0cf4cb add noreturn attribute to the functions that need it. 2000-12-03 02:18:14 +00:00
christos
9a19da76d7 1. the tfile patch was incorrect. If we are doing multiple jobs, we
try to open tfile many times, passing bad strings to mkstemp
2. remove extra semicolon after the MESSAGE macro
3. more error checking
4. be more careful about setting things to NULL after freeing.
5. fix a comment that does not apply anymore
2000-12-03 01:27:03 +00:00
christos
6a9332cff1 use 6 X's instead of 5 for portability. 2000-12-03 01:18:15 +00:00
is
135600f947 More format string cleanup by sommerfeld. 2000-10-11 14:46:00 +00:00
christos
89d34c0b70 fixed comment U -> u 2000-09-05 21:08:35 +00:00
christos
73e15c3ea3 :u modifier a'la uniq(1) [from der Mouse] 2000-09-05 17:57:52 +00:00
christos
a9e7fd9028 don't attempt to free varNoError too. 2000-08-13 22:47:01 +00:00
christos
e8b09532bb PR/10714: SUNAGAWA Keiki: Add newer hpux support, but without removing the
old hpux support.
2000-08-03 15:53:24 +00:00
mycroft
d53a63dfff Use a lower threshold for rebuilding hash tables. 2000-06-11 07:54:32 +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
04af209e45 Don't use OP_MARK when attaching suffix transformations. 2000-06-10 22:24:21 +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