OpenBSD CVS

CVS log for src/usr.bin/make/job.c


[BACK] Up to [local] / src / usr.bin / make

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.165 / (download) - annotate - [select for diffs], Mon Sep 4 11:35:11 2023 UTC (8 months, 2 weeks ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.164: +1 -2 lines
Diff to previous 1.164 (colored)

GC old code that was originally implemented to facilitate adoption by
other BSDs, which never happened, so make things simpler for further
development.

Ditches config.h entirely since it gets reduced to 2 defines.

okay tb@

Revision 1.164 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:11 2023 UTC (14 months, 1 week ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.163: +1 -2 lines
Diff to previous 1.163 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.163 / (download) - annotate - [select for diffs], Mon Dec 26 19:16:02 2022 UTC (16 months, 3 weeks ago) by jmc
Branch: MAIN
Changes since 1.162: +2 -2 lines
Diff to previous 1.162 (colored)

spelling fixes; from paul tagliamonte
amendments to his diff are noted on tech

Revision 1.162 / (download) - annotate - [select for diffs], Tue Jun 2 12:24:44 2020 UTC (3 years, 11 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.161: +1 -2 lines
Diff to previous 1.161 (colored)

kill dead line
okay millert@

Revision 1.161 / (download) - annotate - [select for diffs], Tue Jun 2 12:24:09 2020 UTC (3 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.160: +7 -3 lines
Diff to previous 1.160 (colored)

use the right abstraction to abort jobs, also show debug info as this
thing is tricky

okay millert@

Revision 1.160 / (download) - annotate - [select for diffs], Wed Jan 29 17:06:51 2020 UTC (4 years, 3 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.159: +5 -2 lines
Diff to previous 1.159 (colored)

in the very strange case where make's child gets ptrace'd by its own infant
(hi mpi@) we may wish to ignore WIFSTOPPED so that other bugs elsewhere
may get found.

Also give more information in "can't happen" case to speed up figuring
problems out.

okay millert@, mpi@

Revision 1.159 / (download) - annotate - [select for diffs], Thu Jan 16 16:07:18 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.158: +17 -6 lines
Diff to previous 1.158 (colored)

turns out there WAS something fishy in signal handling in the "generic"
reaper. Specifically, the sigprocmask/wait/sigsuspend dance is correct for
the main process, BUT you have to remember to reset the signal mask to
something sane for the child (this was a duh! moment, that bug is very
stupid)


Finally, bluhm@  saw the actual issue. Kudoes to him.

The change to "unify" sequential and parallel make  made the bug reproducible
under some circumstances
(because in the parallel make case, many things may happen in different
successions, so you don't get the wrong signal mask that often, but the
sequential case is reproducible, and using the "streamlined" reaper meant the
fork would occur WITHIN the signal loop instead of OUTSIDE)

So:
- discover signal state early on through Sigset_init;
- introduce reset_signal_mask to get back to the initial state;
- call reset_signal_mask systematically after fork

This organisation thanks to cmd_exec.  SOME cmd_exec happens before Job_Init
happens, some afterwards (variables are still lazy and both !!= and :sh will
occur AFTER parsing), so both fork() need to be protected.

okay bluhm@

thx to sthen@ and naddy@ and mpi@ for helping out.

Revision 1.158 / (download) - annotate - [select for diffs], Mon Jan 13 16:03:44 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.157: +17 -17 lines
Diff to previous 1.157 (colored)

move function around to minimize conflicts

Revision 1.157 / (download) - annotate - [select for diffs], Mon Jan 13 15:55:57 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.156: +2 -2 lines
Diff to previous 1.156 (colored)

proper prototype

Revision 1.156 / (download) - annotate - [select for diffs], Mon Jan 13 15:53:14 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.155: +1 -7 lines
Diff to previous 1.155 (colored)

forgot gc'ing one function

Revision 1.155 / (download) - annotate - [select for diffs], Mon Jan 13 15:41:53 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.154: +4 -49 lines
Diff to previous 1.154 (colored)

make the choice of engine explicit

simplify the running of .BEGIN/.END so that they pass through the engine
first (so they can now have dependencies). Error out properly if .BEGIN/.END
fails.

Revision 1.154 / (download) - annotate - [select for diffs], Mon Jan 13 15:24:31 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.153: +5 -55 lines
Diff to previous 1.153 (colored)

unify compat mode and parallelmode a bit: there's no longer a need for
handle_one_job, always go thru Job_Make now.

Revision 1.153 / (download) - annotate - [select for diffs], Mon Jan 13 15:19:04 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.152: +6 -3 lines
Diff to previous 1.152 (colored)

make things more complex so that they can become simpler:
in the compatMake case, we still get into handle_all_running_jobs in case
of a fatal signal and at the end. Pass compatMake around to job.c so that
it will *not* run parallel make code in the sequential make case, thus
actually making sure both engines are separate.

Revision 1.152 / (download) - annotate - [select for diffs], Mon Jan 13 15:12:58 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.151: +6 -6 lines
Diff to previous 1.151 (colored)

introduce a JOB_KEEPERROR flag so that the logic for moving jobs
to availableJobs/errorJobs happens just once

Revision 1.151 / (download) - annotate - [select for diffs], Mon Jan 13 15:05:18 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.150: +9 -15 lines
Diff to previous 1.150 (colored)

zap more unneeded indirection, may_continue_job is enough

Revision 1.150 / (download) - annotate - [select for diffs], Mon Jan 13 15:00:59 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.149: +3 -4 lines
Diff to previous 1.149 (colored)

remove_job no longer pulls its weight

Revision 1.149 / (download) - annotate - [select for diffs], Mon Jan 13 14:57:00 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.148: +3 -3 lines
Diff to previous 1.148 (colored)

better name for function

Revision 1.148 / (download) - annotate - [select for diffs], Mon Jan 13 14:51:50 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.147: +34 -20 lines
Diff to previous 1.147 (colored)

simplify the way we account for different jobs:
- have a simple variable "sequential" that counts  whether we are
running more than one job (for the expensive heuristics)
- don't expose various things globally, just have a set_noparallel() for
the parser
- preallocate exactly enough job structures and record them in availableJobs
- keep one job on the side for .INTERRUPT

Revision 1.147 / (download) - annotate - [select for diffs], Mon Jan 13 14:14:24 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.146: +5 -5 lines
Diff to previous 1.146 (colored)

move expensive heuristics a bit and explain better why we do that
in that error case.

Revision 1.146 / (download) - annotate - [select for diffs], Sat Jan 4 16:16:37 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.145: +8 -1 lines
Diff to previous 1.145 (colored)

create a separate function "may_continue_heldback_jobs" and invoke
it in the main reaper loop, instead of waiting for a job with an
expensive command to exit.

This prevents jobs with an expensive command from holding back everything
else until their full list of commands is run, instead of just the
expensive one.

(as JOB_IS_EXPENSIVE is updated before and after each command for a job,
this is safe)

This might make  things slightly more parallel. It's definitely more correct
and less tangled.

okay millert@

Revision 1.145 / (download) - annotate - [select for diffs], Sat Jan 4 12:50:52 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.144: +2 -3 lines
Diff to previous 1.144 (colored)

remove redundant test, !keepgoing is already a condition for
a job getting on the errorJobs list

okay millert@

Revision 1.144 / (download) - annotate - [select for diffs], Tue Dec 31 13:59:14 2019 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.143: +3 -2 lines
Diff to previous 1.143 (colored)

plug memory leak
okay millert@

Revision 1.143 / (download) - annotate - [select for diffs], Mon Dec 30 11:01:16 2019 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.142: +5 -1 lines
Diff to previous 1.142 (colored)

7 years later, I think the commit message was not enough.
document this rather intricate loop (only comments no code change)

Revision 1.142 / (download) - annotate - [select for diffs], Wed Dec 25 20:42:04 2019 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.141: +10 -11 lines
Diff to previous 1.141 (colored)

exit_type is already set up with exactly the information we need,
so get rid of cluttered duplicate logic

okay kn@

Revision 1.141 / (download) - annotate - [select for diffs], Sat Dec 21 15:28:17 2019 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.140: +2 -2 lines
Diff to previous 1.140 (colored)

rename built_status constants to be less quirky
fold back BEINGMADE and BUILDING which mean the same thing
GC CYCLE/ENDCYCLE

okay millert@

Revision 1.140 / (download) - annotate - [select for diffs], Tue Dec 19 13:51:13 2017 UTC (6 years, 5 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.139: +2 -2 lines
Diff to previous 1.139 (colored)

somehow, I lost that static.
From Michal W. Bombardieri, thx

Revision 1.139 / (download) - annotate - [select for diffs], Sat Jan 21 12:35:40 2017 UTC (7 years, 3 months ago) by natano
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.138: +1 -2 lines
Diff to previous 1.138 (colored)

Dedup prototype for really_kill().

Revision 1.138 / (download) - annotate - [select for diffs], Sat Jan 21 12:31:34 2017 UTC (7 years, 3 months ago) by natano
Branch: MAIN
Changes since 1.137: +3 -5 lines
Diff to previous 1.137 (colored)

Use errno to make the debug message more descriptive.
ok deraadt

Revision 1.137 / (download) - annotate - [select for diffs], Sat Jan 21 11:30:11 2017 UTC (7 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.136: +1 -36 lines
Diff to previous 1.136 (colored)

Stop calling out to sudo/doas to kill processes.  Reliance on system
configuration to perform a racy behaviour is not wise.
ok natano

Revision 1.136 / (download) - annotate - [select for diffs], Tue Jul 28 14:22:26 2015 UTC (8 years, 9 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.135: +15 -9 lines
Diff to previous 1.135 (colored)

let the hack that lets make kill jobs after sudo also work with doas.
okay tedu@, millert@, tweaks by millert@

Revision 1.135 / (download) - annotate - [select for diffs], Fri Dec 14 11:10:03 2012 UTC (11 years, 5 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.134: +7 -2 lines
Diff to previous 1.134 (colored)

a few more comments

Revision 1.134 / (download) - annotate - [select for diffs], Sat Dec 8 12:54:17 2012 UTC (11 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.133: +5 -5 lines
Diff to previous 1.133 (colored)

document a bit of job.c
notice that Job_Finish() really returns a boolean, so unconfuse
that accordingly (it's likely the extra Fatal() message is not
needed and we could just call finish)

Revision 1.133 / (download) - annotate - [select for diffs], Sat Nov 24 11:05:33 2012 UTC (11 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.132: +2 -2 lines
Diff to previous 1.132 (colored)

Don't output a . at the end of directory, as it is confusing.
okay beck@

Revision 1.132 / (download) - annotate - [select for diffs], Tue Oct 23 20:32:21 2012 UTC (11 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.131: +2 -2 lines
Diff to previous 1.131 (colored)

fix fringe case where length is around 140.
problem found by Tobias Ulmer.

Revision 1.131 / (download) - annotate - [select for diffs], Thu Oct 18 17:54:43 2012 UTC (11 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.130: +145 -30 lines
Diff to previous 1.130 (colored)

numerous error message fixes:
- do ^C checking differently: don't record sent signals, but when jobs
die, recheck whether we received/have pending a INT/QUIT/TERM/HUP signal.
Then don't display our process group "normally", instead group together
everything dying by signal/shell dying by signal (just give the target
names).

- make certain we always handle signals before dying from "other conditions"
- have the parser messages look more like normal messages
- remove double error messages from some parser errors
- make sure unclosed variables ARE errors when some modifiers are present

- keep track of the base directory we're run from, so that submakes can
get shortened directories...
- make sure the whole error message including silent command fits into a
reasonable length.

okay millert@

Revision 1.130 / (download) - annotate - [select for diffs], Tue Oct 9 19:46:33 2012 UTC (11 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.129: +18 -18 lines
Diff to previous 1.129 (colored)

tweak error messages yet some more, lots of feedback from
deraadt@, millert@

Revision 1.129 / (download) - annotate - [select for diffs], Sat Oct 6 19:19:53 2012 UTC (11 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.128: +3 -3 lines
Diff to previous 1.128 (colored)

truncate silent command output to two lines. okay millert@

Revision 1.128 / (download) - annotate - [select for diffs], Sat Oct 6 09:32:40 2012 UTC (11 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.127: +109 -120 lines
Diff to previous 1.127 (colored)

- extra juice for debugging signal passing.  Note when we can't pass the
signal because the process already bought it (pgroups will do that to you)
(lots of discussion with Todd on that one)
- tweak error handling some more to make it less verbose when just one job
is running...
- show signal name in case of signal interrupts.
- zap OP_LIB, move that stuff to the location where we warn when we meet
that bug.

okay millert@

Revision 1.127 / (download) - annotate - [select for diffs], Thu Oct 4 13:20:46 2012 UTC (11 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.126: +20 -6 lines
Diff to previous 1.126 (colored)

backout pgroup/job control from make, there is something deeply bogus
in stdin interaction.

Fixes update-patches as reported by aja...

Revision 1.126 / (download) - annotate - [select for diffs], Tue Oct 2 10:29:30 2012 UTC (11 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.125: +151 -64 lines
Diff to previous 1.125 (colored)

more changes, discussed and tested by various people.
- put back some job control, turns out it's necessary when we don't run a
shell.
- zap old #ifdef CLEANUP code... probably doesn't even compile.
- kill most of the OP_LIB code. Just keep a wee little bit for compatibility
(deprecated .LIBS and .INCLUDES, warns for weird dependencies instead of
erroring out).
- much improved debugging and -p output: sort variables, targets, rules,
output stuff in a nicer format mimicing input.
- better error message when no command is found, explain where the target comes from.
- sort final error list by file.
- show system files in errors as <bsd.prog.mk>
- reincorporate random delay, that was dropped
- optimize siginfo output by not regenerating the whole string each time.
- finish zapping old LocationInfo field that's no longer used.

Revision 1.125 / (download) - annotate - [select for diffs], Fri Sep 21 08:18:40 2012 UTC (11 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.124: +2 -2 lines
Diff to previous 1.124 (colored)

vax, found by fries@

Revision 1.124 / (download) - annotate - [select for diffs], Fri Sep 21 07:55:20 2012 UTC (11 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.123: +433 -924 lines
Diff to previous 1.123 (colored)

major overhaul of the way make handle jobs, inspired by dpb:
instead of forking a "job" per target, and having that job further fork
separate commands, have make maintain a list of jobs, indexed by pid
of currently running commands, and handle process termination
continuation-style.  This has lots of benefits:
- make is responsible for most printing, so we no longer need pipes nor
job control: make -j jobs see the tty.
- no more special-casing for jobs that don't really execute anything.
- unify code for make -jn and make -B, including signal handlers and
job waiting.  So make -n, make -q, +cmd now run commands in the same
way in all cases.
- unified more accurate error-reporting, as make knows precisely which
command failed. Commands are tagged with their lines, and we display failing
commands in silent mode.
- fine-grained "expensive" command handling (recursion limiter). Do it
per-command instead of per-target.

Moreover, signal response is now simpler, as we just block the signals
in a small critical sections, test for events, and sigpause (thanks a lot
to guenther@ and millert@), so running make is now almost always paused
without any busy-waiting.

Thanks to everyone who tested and gave input.

Revision 1.123 / (download) - annotate - [select for diffs], Sat Aug 25 08:12:56 2012 UTC (11 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.122: +3 -1 lines
Diff to previous 1.122 (colored)

- make wrong variable specs (unterminated) parse errors.
- add info to be able to pinpoint parse errors at runtime.
- let job runners abort when a parse error happens while expanding a variable
during execution
- fix an infinite loop when compiling without FEATURE_RECVARS.

okay millert@, krw@
the very few errors found out by this (less than 10 over src/X/ports)
fixed trivially beforehand, as requested by deraadt@

Revision 1.122 / (download) - annotate - [select for diffs], Wed Apr 11 18:27:30 2012 UTC (12 years, 1 month ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.121: +6 -3 lines
Diff to previous 1.121 (colored)

make has had heuristics to avoid parallel make recursion.
Sometimes they mess up, so add .CHEAP/.EXPENSIVE to explicitly tell make
'hey this is not THAT bad' or 'worse than you think'.
agreed by guenther@, millert@ (and some tweaks)

Revision 1.121 / (download) - annotate - [select for diffs], Thu Mar 22 13:47:12 2012 UTC (12 years, 2 months ago) by espie
Branch: MAIN
Changes since 1.120: +3 -3 lines
Diff to previous 1.120 (colored)

minor cleanup: error messages include lineno and fileno together, so
recognize that and create a struct Location_ for it.

mostly from Jonathan Calmels, a few nits from me.

okay otto@

Revision 1.120 / (download) - annotate - [select for diffs], Mon Jul 19 19:46:44 2010 UTC (13 years, 10 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.119: +1 -2 lines
Diff to previous 1.119 (colored)

Correct $OpenBSD$ stuff

Revision 1.119 / (download) - annotate - [select for diffs], Thu Jul 15 10:37:32 2010 UTC (13 years, 10 months ago) by espie
Branch: MAIN
Changes since 1.118: +27 -27 lines
Diff to previous 1.118 (colored)

whitespace

Revision 1.118 / (download) - annotate - [select for diffs], Sun Aug 16 09:50:13 2009 UTC (14 years, 9 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.117: +1 -5 lines
Diff to previous 1.117 (colored)

remove useless comments

Revision 1.117 / (download) - annotate - [select for diffs], Sun May 10 11:07:37 2009 UTC (15 years ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.116: +279 -439 lines
Diff to previous 1.116 (colored)

simplify job handling a great deal: we don't care when jobs get
stopped/continued, as we won't try to start new jobs when other stuff
is stopped.

Redo signal handling so that most stuff can be done directly in the handler.
This requires blocking/unblocking signals while creating new jobs, and creating
a small list that only contains job's pids.

Switch to pgrps for jobs, since that works.

Add a clamping heuristic that avoids starting new jobs while an expensive job
is running (expensive meaning "very likely to be a recursive make run"). This
idea is mostly from Theo, through the implementation is mine.

Revision 1.116 / (download) - annotate - [select for diffs], Sun Apr 26 09:25:49 2009 UTC (15 years ago) by espie
Branch: MAIN
Changes since 1.115: +4 -14 lines
Diff to previous 1.115 (colored)

move code around a bit, extract code from run_prepared_gnode
into a run_gnode_parallel. That simplifies the control flow of that routine
a bit, to allow for more tweaks in the parallel case.

okay kettenis@, otto@

Revision 1.115 / (download) - annotate - [select for diffs], Tue Nov 11 09:32:20 2008 UTC (15 years, 6 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.114: +17 -21 lines
Diff to previous 1.114 (colored)

allocate job only when it's needed.
okay otto@

Revision 1.114 / (download) - annotate - [select for diffs], Tue Nov 4 07:22:35 2008 UTC (15 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.113: +18 -51 lines
Diff to previous 1.113 (colored)

changes to get target equivalence to work better.
- add new file to create lists of equivalent targets (siblings)
- use that for sequential mode to have much better VPATH support
- separate checking commands from reporting error, for later.
- zap DieHorribly accordingly
- renumber existing flags
- signal_running_jobs() is simpler than pass_signal_to_jobs()
- new debug option -dn for name matching.

Similar code to handle parallel make is still missing.

thanks to Mark, Miod, Theo, Otto, Todd for tests and/or comments.

Revision 1.113 / (download) - annotate - [select for diffs], Mon Mar 24 18:03:53 2008 UTC (16 years, 1 month ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.112: +4 -2 lines
Diff to previous 1.112 (colored)

bye, bye recalloc. Bad interface for various reasons.
discussed with deraadt@ and otto@ and millert@

Revision 1.112 / (download) - annotate - [select for diffs], Tue Jan 29 22:23:10 2008 UTC (16 years, 3 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.111: +184 -154 lines
Diff to previous 1.111 (colored)

A few changes:
- expand commands earlier, so that we can eventually scan them to take
smarter decisions.
- clean up the select() mask code and rename variables to sensible things.
- quite a few minor renames for readability
- erecalloc
- clean up wait status handling, do not try to rebuild wait status, but
instead parse it early and deal with the parsed code.

tested by lots of people, thanks guys!

Revision 1.111 / (download) - annotate - [select for diffs], Sat Jan 12 13:08:59 2008 UTC (16 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.110: +69 -62 lines
Diff to previous 1.110 (colored)

better error reporting/job handling error:
- systematically reorder jobs based on who did output last, so that the
last job to output is *first* to output again.
- better reaction to errors: any job that outputs is checked for termination
directly, and the Error message is printed right afterwards.
- better error messages, giving more useful information in -j mode.

Revision 1.110 / (download) - annotate - [select for diffs], Sat Dec 1 15:14:34 2007 UTC (16 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.109: +2 -1 lines
Diff to previous 1.109 (colored)

I was sure I had committed this already, grrrr.
Anyways, switch to a growable array for job to do.
Allows us to randomize it.
fix manpage.
do not add delay if just one job to run.

Revision 1.109 / (download) - annotate - [select for diffs], Wed Nov 28 09:40:08 2007 UTC (16 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.108: +3 -0 lines
Diff to previous 1.108 (colored)

debug scaffolding: allows the insertion of a random delay before firing up
jobs in parallel mode.

Revision 1.108 / (download) - annotate - [select for diffs], Sat Nov 10 12:51:40 2007 UTC (16 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.107: +2 -2 lines
Diff to previous 1.107 (colored)

rename make -> must_make, made -> built_status
to make them easier to find in source files.

Revision 1.107 / (download) - annotate - [select for diffs], Tue Nov 6 21:09:42 2007 UTC (16 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.106: +5 -0 lines
Diff to previous 1.106 (colored)

get make.c in a more readable state, by extracting code into separate
functions.

Restore a big more debug: if DEBUG(JOB), print commands (unexpanded).

Revision 1.106 / (download) - annotate - [select for diffs], Sat Nov 3 14:05:39 2007 UTC (16 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.105: +6 -18 lines
Diff to previous 1.105 (colored)

simplify: Job_CheckCommands deals with silent and ignerr now, so there's
no need to duplicate that info at the job level since we can just use
the gn->type.

Revision 1.105 / (download) - annotate - [select for diffs], Sat Nov 3 11:44:30 2007 UTC (16 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.104: +11 -11 lines
Diff to previous 1.104 (colored)

token is a confusing name, rename to banner

Revision 1.104 / (download) - annotate - [select for diffs], Sat Nov 3 10:41:48 2007 UTC (16 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.103: +2 -1 lines
Diff to previous 1.103 (colored)

fix an obnoxious bug: in parallel mode, dieing in the job controller is not
the same as dieing in a sub job, since waiting on sub-jobs won't work.
So keep track of who we are via a state variable.

Revision 1.103 / (download) - annotate - [select for diffs], Sat Nov 3 10:38:14 2007 UTC (16 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.102: +0 -6 lines
Diff to previous 1.102 (colored)

zap confusing old comment

Revision 1.102 / (download) - annotate - [select for diffs], Sat Nov 3 10:36:48 2007 UTC (16 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.101: +1 -0 lines
Diff to previous 1.101 (colored)

mark nodes as made when there is no command around the target.
real files get updated anyways, but phony nodes stay around as unmade,
which breaks things in subtle ways, since parallel mode just assumes things
get built.

Revision 1.101 / (download) - annotate - [select for diffs], Fri Nov 2 17:27:24 2007 UTC (16 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.100: +269 -756 lines
Diff to previous 1.100 (colored)

Work done at p2k7.


This is a really big step towards getting parallel make to work.


Note that this is not yet complete. There are still a few `details' to
fix before this works 100%.  Specifically: sequential make (compat) and
parallel make don't use the same engine, and the parallel engine still
has a few limitations. For instance, some known issues:
- parallel make does not deal with .phony targets correctly all the time.
- some errors are deadly in parallel make mode.
- parallel make NEEDS way more sturdy correspondance of file system paths
and target names, since it often needs to match dependencies to targets
before the corresponding files exist.
- some local variables like $* get set in a bogus way in some cases.
- suffix handling has issues, especially related to the NULL suffix.
So, if you find stuff that does NOT yet work with parallel make, don't go
blindly try to fix the Makefile. It's very likely you might have stumbled
into a make bug. (unless you really, really, understand Makefiles, DON'T
GO CHANGING THEM YET).



Tested by lots of people, thanks go to miod@, and robert@ among other people.

Quick summary of what this does:

- remove `saving commands' extension (it's not really usable, nor used)
- move compat job runner and parallel interrupt handling into engine.c
- tweak the code so that both compat and parallel mode use the same job runner
and the same interrupt handling. Remove the other one.
- optimize job runner so that, in parallel mode, the last command does not
fork if we can avoid it (as it's already running in a sub shell).
- scrape all the code that dealt with creating shell scripts from commands.
- scrape all the code that dealt with recognizing special sequences in
command output to print/not print output.
- fix the parallel job pipe to not keep around file descriptors that are not
needed.
- replace the parallel job buffering with a nicer one, that deals with
non-blocking descriptors to try to agregate as much output from one job in
one go (greed) to unconfuse the users.
- create two pipes per job, so that stdout and stderr stay separate.
- make job token printing a debug option.
- always use the parallel job-runner to `execute' commands, even if we just
print them out.
- store list of errors encountered during parallel make running, and print them
on exit, so that we know what went wrong.
- add a dirty hack to targ.c to deal with paths produced by gccmakedep.

Revision 1.100 / (download) - annotate - [select for diffs], Sun Oct 14 09:02:10 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.99: +0 -1 lines
Diff to previous 1.99 (colored)

allows node to be run twice, by not destroying the cmdnode contents.
This way, you can run `make .BEGIN'. Okay, this will run .BEGIN twice.

Revision 1.99 / (download) - annotate - [select for diffs], Tue Oct 9 09:41:51 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.98: +2 -5 lines
Diff to previous 1.98 (colored)

factor out identical code

Revision 1.98 / (download) - annotate - [select for diffs], Tue Oct 9 09:41:24 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.97: +29 -19 lines
Diff to previous 1.97 (colored)

cut up JobStart, prepare the job to be run in a separate function

Revision 1.97 / (download) - annotate - [select for diffs], Tue Oct 9 09:40:26 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.96: +4 -18 lines
Diff to previous 1.96 (colored)

don't bother returning anything from JobStart, we don't look at it anyways

Revision 1.96 / (download) - annotate - [select for diffs], Tue Oct 9 09:39:21 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.95: +53 -46 lines
Diff to previous 1.95 (colored)

minor refactor: introduce function start_queued_job, to make it more apparent
JobStart and JobRestart often do the same thing.
Move JobMakeArgv call around for similar reasons.
Introduce new list (queuedJobs) we don't use yet.

Revision 1.95 / (download) - annotate - [select for diffs], Tue Oct 9 09:35:43 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.94: +12 -11 lines
Diff to previous 1.94 (colored)

rename jobs to more descriptive runningJobs (and easier to grep)

Revision 1.94 / (download) - annotate - [select for diffs], Tue Oct 9 09:34:05 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.93: +33 -22 lines
Diff to previous 1.93 (colored)

just-in-time signal handling: do not setup the handlers until we need them.

Revision 1.93 / (download) - annotate - [select for diffs], Tue Oct 9 09:32:03 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.92: +60 -62 lines
Diff to previous 1.92 (colored)

rename functions for clarity.
Add a global `got_signals' to quick-path thru handle_all_signals.
remove most of the #ifdef USE_PGRP cruft: always be ready to handle those
signals, just do not define a handler for them yet.

Revision 1.92 / (download) - annotate - [select for diffs], Sat Oct 6 19:34:32 2007 UTC (16 years, 7 months ago) by cnst
Branch: MAIN
Changes since 1.91: +8 -12 lines
Diff to previous 1.91 (colored)

replace realloc/memset/pointer-arithmetic with recalloc; ok millert@ ray@ espie@

Revision 1.91 / (download) - annotate - [select for diffs], Sat Sep 29 09:59:04 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.90: +4 -7 lines
Diff to previous 1.90 (colored)

simple refactoring: replace convoluted code with simple equivalent test
structure.

Revision 1.90 / (download) - annotate - [select for diffs], Sat Sep 29 09:47:23 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.89: +4 -7 lines
Diff to previous 1.89 (colored)

use constant FD_CLOEXEC, more readable than 1.
zap comment that should have gone with setting use_pipes.

Revision 1.89 / (download) - annotate - [select for diffs], Sat Sep 29 09:02:05 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.88: +6 -13 lines
Diff to previous 1.88 (colored)

remove comment that no longer apply.
Replace a stupid comment with something that makes sense.
(this function needs a rewrite, it's incredibly stupid anyways)

Revision 1.88 / (download) - annotate - [select for diffs], Sun Sep 23 14:58:50 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.87: +22 -29 lines
Diff to previous 1.87 (colored)

don't even attempt to reuse the same temp file name.
Just create a new one each time we need it, and kill the file right away.

Revision 1.87 / (download) - annotate - [select for diffs], Sun Sep 23 12:53:21 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.86: +33 -47 lines
Diff to previous 1.86 (colored)

now, JOB_FIRST is always set, so kill more conditional code.
(taken from NetBSD)

Revision 1.86 / (download) - annotate - [select for diffs], Sun Sep 23 12:51:59 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.85: +11 -18 lines
Diff to previous 1.85 (colored)

last parameter to JobStart is always NULL, so nuke it.

Revision 1.85 / (download) - annotate - [select for diffs], Sun Sep 23 12:49:04 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.84: +15 -84 lines
Diff to previous 1.84 (colored)

compatMake is never true in there, so kill dead code.

Revision 1.84 / (download) - annotate - [select for diffs], Sun Sep 23 09:46:08 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.83: +39 -86 lines
Diff to previous 1.83 (colored)

replace if (DEBUG(job)) { fprintf(stdout,...); fflush(stdout); }
with a debug_printf() function.
Maybe slightly slower, but it's ways easier to read.

Revision 1.83 / (download) - annotate - [select for diffs], Sun Sep 23 09:44:39 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.82: +14 -28 lines
Diff to previous 1.82 (colored)

kill local/jobs distinction. Correctly this time...

Revision 1.82 / (download) - annotate - [select for diffs], Sun Sep 23 09:41:11 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.81: +3 -3 lines
Diff to previous 1.81 (colored)

more specific error messages if dup2 fails

Revision 1.81 / (download) - annotate - [select for diffs], Sun Sep 23 09:39:18 2007 UTC (16 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.80: +3 -9 lines
Diff to previous 1.80 (colored)

zap sunos bug work-around

Revision 1.80 / (download) - annotate - [select for diffs], Tue Sep 18 08:27:22 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.79: +24 -23 lines
Diff to previous 1.79 (colored)

reindent new part

Revision 1.79 / (download) - annotate - [select for diffs], Tue Sep 18 07:45:25 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.78: +76 -43 lines
Diff to previous 1.78 (colored)

revert maxLocal removal, there's something fishy going on.

Revision 1.78 / (download) - annotate - [select for diffs], Mon Sep 17 12:42:09 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.77: +121 -191 lines
Diff to previous 1.77 (colored)

rewrite of the basic suffix/target parsing: use hash for suffixes.

Store special targets in target hash, and use them for the parsing.

Use OP_DUMMY flag to mark targets that don't really exist yet, such
as interrupt and default nodes.

Also, .PATHxxx is special in suffixes.

Small tweaks to compat.c, so that run_commands does more stuff after
the fork() (and thus no need to free things).

Remove distinction between local and global jobs.

Revision 1.77 / (download) - annotate - [select for diffs], Mon Sep 17 12:03:40 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.76: +3 -2 lines
Diff to previous 1.76 (colored)

remove C99ism

Revision 1.76 / (download) - annotate - [select for diffs], Mon Sep 17 12:01:16 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.75: +168 -280 lines
Diff to previous 1.75 (colored)

make usePipes the default, zap undocumented -P.

Revision 1.75 / (download) - annotate - [select for diffs], Mon Sep 17 11:48:13 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.74: +3 -4 lines
Diff to previous 1.74 (colored)

one single printf

Revision 1.74 / (download) - annotate - [select for diffs], Mon Sep 17 10:37:08 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.73: +31 -133 lines
Diff to previous 1.73 (colored)

byebye shellspecs

Revision 1.73 / (download) - annotate - [select for diffs], Mon Sep 17 10:33:28 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.72: +9 -30 lines
Diff to previous 1.72 (colored)

we have valid err/echo flags

Revision 1.72 / (download) - annotate - [select for diffs], Mon Sep 17 10:31:13 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.71: +17 -50 lines
Diff to previous 1.71 (colored)

we have echoctl and errctl

Revision 1.71 / (download) - annotate - [select for diffs], Mon Sep 17 10:28:48 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.70: +12 -12 lines
Diff to previous 1.70 (colored)

hardcode some more shell

Revision 1.70 / (download) - annotate - [select for diffs], Mon Sep 17 10:22:30 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.69: +10 -19 lines
Diff to previous 1.69 (colored)

start hardcoding the shell. we always run with sh anyways.

Revision 1.69 / (download) - annotate - [select for diffs], Mon Sep 17 10:17:26 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.68: +28 -22 lines
Diff to previous 1.68 (colored)

make DBPRINTF into a real function with variable number of arguments

Revision 1.68 / (download) - annotate - [select for diffs], Mon Sep 17 09:28:36 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.67: +28 -28 lines
Diff to previous 1.67 (colored)

kill extra spaces at end of line

Revision 1.67 / (download) - annotate - [select for diffs], Mon Sep 17 08:36:57 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.66: +10 -10 lines
Diff to previous 1.66 (colored)

kill += 1, -= 1     -> ++, --

Revision 1.66 / (download) - annotate - [select for diffs], Sun Sep 16 15:12:12 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.65: +1368 -1329 lines
Diff to previous 1.65 (colored)

reindent

Revision 1.65 / (download) - annotate - [select for diffs], Sun Sep 16 12:01:11 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.64: +1 -2 lines
Diff to previous 1.64 (colored)

remove warnings

Revision 1.64 / (download) - annotate - [select for diffs], Sun Sep 16 10:57:02 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.63: +2 -216 lines
Diff to previous 1.63 (colored)

kill .SHELL, make doesn't even support it in non-parallel mode.

Revision 1.63 / (download) - annotate - [select for diffs], Sun Sep 16 10:39:07 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.62: +3 -136 lines
Diff to previous 1.62 (colored)

first step towards sanity: take the functions common to parallel/not parallel
make outside of make.c and job.c, and create an engine.c file to hold them.

Revision 1.62 / (download) - annotate - [select for diffs], Tue Jun 12 16:33:27 2007 UTC (16 years, 11 months ago) by cnst
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.61: +12 -7 lines
Diff to previous 1.61 (colored)

Fix a 10-year-old pointer-arithmetic bug in make,
introduced on 1997-12-16, make/job.c revision 1.8.

This should fix the CPU spinout bug when running make with a -j option --
from now on, `make -j24` successfully completes the kernel build on my
Core 2 Duo, instead of halting the build and eating one CPU until ^C.

Found and debugged by myself, with the help of malloc.conf options.

"definitely a bug, nice catch" beck@
"let's also fix a [potential] memory leak in realloc" by millert@
"should go in" deraadt@

Revision 1.61 / (download) - annotate - [select for diffs], Fri Mar 2 04:32:32 2007 UTC (17 years, 2 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.60: +2 -2 lines
Diff to previous 1.60 (colored)

strlen fixes from Charles Longeau.

OK moritz@.

Revision 1.60 / (download) - annotate - [select for diffs], Thu Jan 4 17:55:35 2007 UTC (17 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.59: +8 -10 lines
Diff to previous 1.59 (colored)

having a function that iterates through node's datum so that we retrieve
the list item with lst_member is non-sensical, create a new function
(Lst_ForEachNodeWhile) that iterates through lstnodes directly and use
it.

Less obfuscated, slightly more efficient...

okay otto@

Revision 1.59 / (download) - annotate - [select for diffs], Wed Apr 13 02:33:08 2005 UTC (19 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.58: +2 -2 lines
Diff to previous 1.58 (colored)

use STD{IN,OUT,ERR}_FILENO

Revision 1.58 / (download) - annotate - [select for diffs], Mon Nov 29 06:20:03 2004 UTC (19 years, 5 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

Spell precede correctly.
'looks fine' millert@, krw@. ok jmc@

Revision 1.57 / (download) - annotate - [select for diffs], Mon Jul 19 02:10:47 2004 UTC (19 years, 10 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.56: +94 -12 lines
Diff to previous 1.56 (colored)

fix signal race in job.c: the signal handler only sets a flag, and
the main loop polls for that signal periodically.

Fixes make -j kernel.

okay art@

Revision 1.56 / (download) - annotate - [select for diffs], Wed Apr 7 13:11:36 2004 UTC (20 years, 1 month ago) by espie
Branch: MAIN
Changes since 1.55: +42 -69 lines
Diff to previous 1.55 (colored)

ISO function declarations, trim a few comments, rename a few variables to
more explicit/more consistent names.

okay otto@

Revision 1.55 / (download) - annotate - [select for diffs], Tue Jun 3 02:56:11 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.54: +2 -6 lines
Diff to previous 1.54 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.54 / (download) - annotate - [select for diffs], Sun Apr 6 22:47:14 2003 UTC (21 years, 1 month ago) by espie
Branch: MAIN
Changes since 1.53: +4 -4 lines
Diff to previous 1.53 (colored)

get rid of some strcpy/sprintf.
ok krw@, matthieu@, deraadt@

Revision 1.53 / (download) - annotate - [select for diffs], Tue Feb 18 13:14:43 2003 UTC (21 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

intial -> initial;

the great intial witch hunt, as prompted by tdeval@

os-aix-dso.c: ok henning@
ab.C: ok drahn@

Revision 1.52 / (download) - annotate - [select for diffs], Wed Jul 31 19:29:20 2002 UTC (21 years, 9 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored)

use fork, not vfork. seems to fix misterious trapframe trashing on hppa; deraadt@ ok

Revision 1.51 / (download) - annotate - [select for diffs], Wed Jun 12 06:07:16 2002 UTC (21 years, 11 months ago) by mpech
Branch: MAIN
Changes since 1.50: +19 -19 lines
Diff to previous 1.50 (colored)

a real pid_t cleanup.

espie@ ok for make/,
deraadt@ one extra eye,
millert@ ok

Revision 1.50 / (download) - annotate - [select for diffs], Tue Mar 19 00:08:31 2002 UTC (22 years, 2 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.49: +159 -16 lines
Diff to previous 1.49 (colored)

Kill remote comments, un-expose private code.
ok millert@

Revision 1.49 / (download) - annotate - [select for diffs], Sat Mar 2 13:42:51 2002 UTC (22 years, 2 months ago) by espie
Branch: MAIN
Changes since 1.48: +5 -53 lines
Diff to previous 1.48 (colored)

Kill JOB_REMIGRATE.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Mar 2 00:23:13 2002 UTC (22 years, 2 months ago) by espie
Branch: MAIN
Changes since 1.47: +30 -438 lines
Diff to previous 1.47 (colored)

kill #ifdef REMOTE stuff that only obfuscates issues.
ok millert@, miod@

Revision 1.47 / (download) - annotate - [select for diffs], Sat Nov 17 19:37:46 2001 UTC (22 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.46: +3 -1 lines
Diff to previous 1.46 (colored)

errno saving

Revision 1.46 / (download) - annotate - [select for diffs], Sun Nov 11 12:35:02 2001 UTC (22 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored)

Fixed version... don't see how this could work on i386, since it didn't
initialize create in main.c.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Nov 11 06:02:06 2001 UTC (22 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

undo changes that crash on (at least) the alpha

Revision 1.44 / (download) - annotate - [select for diffs], Sun Nov 11 01:19:23 2001 UTC (22 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

Redo LstInit as a macro: smaller and faster code in all cases, zeroing two
pointers is simpler than calling a function.
Recognize purely static lst headers, which don't really need any
initialization.
ok miod@

Revision 1.43 / (download) - annotate - [select for diffs], Tue Sep 4 23:35:58 2001 UTC (22 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.42: +7 -3 lines
Diff to previous 1.42 (colored)

Replace the deprecated BSD sigsetmask/sigblock/sigpause functions with their POSIX counterparts.

Revision 1.42 / (download) - annotate - [select for diffs], Tue May 29 12:53:40 2001 UTC (22 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.41: +3 -1 lines
Diff to previous 1.41 (colored)

Take includes out of lst.h, re-add what's needed to separate files.
Removes remaining lint stuff from lst.lib.

Revision 1.41 / (download) - annotate - [select for diffs], Wed May 23 12:34:44 2001 UTC (23 years ago) by espie
Branch: MAIN
Changes since 1.40: +131 -130 lines
Diff to previous 1.40 (colored)

Mostly clean-up:
- cut up those huge include files into separate interfaces for all modules.
Put the interface documentation there, and not with the implementation.
- light-weight includes for needed concrete types (lst_t.h, timestamp_t.h).
- cut out some more logically separate parts: cmd_exec, varname, parsevar,
timestamp.
- put all error handling functions together, so that we will be able to
clean them up.
- more systematic naming: functioni  to handle interval, function to handle
string.
- put the init/end code apart to minimize coupling.
- kill weird types like ReturnStatus and Boolean. Use standard bool (with a
fallback for non-iso systems)
- better interface documentation for lots of subsystems.

As a result, make compilation goes somewhat faster (5%, even considering
the largish BSD copyrights to read). The corresponding preprocessed
source goes down from 1,5M to 1M.

A few minor code changes as well: Parse_DoVar is no longer destructive.
Parse_IsVar functionality is folded into Parse_DoVar (as it knows what an
assignment is), a few more interval handling functions. Avoid calling
XXX_End when they do nothing, just #define XXX_End   to nothing.

Parse_DoVar is slightly more general: it will handle compound assignments
as long as they make sense, e.g., VAR +!= cmd
will work.  As a side effect, VAR++=value now triggers an error
(two + in assignment).
- this stuff doesn't occur in portable Makefiles.
- writing VAR++ = value or VAR+ +=value  disambiguates it.
- this is a good thing, it uncovered a bug in bsd.port.mk.

Tested by naddy@. Okayed millert@. I'll handle the fallback if there is
any. This went through a full make build anyways, including isakmpd
(without mickey's custom binutils, as he didn't see fit to share it with me).

Revision 1.40 / (download) - annotate - [select for diffs], Thu May 3 13:41:06 2001 UTC (23 years ago) by espie
Branch: MAIN
Changes since 1.39: +472 -557 lines
Diff to previous 1.39 (colored)

Synch with my current work.
Numerous changes:
- generate can build several tables
- style cleanup
- statistics code
- use variable names throughout (struct Name)
- recursive variables everywhere
- faster parser (pass buffer along instead of allocating multiple copies)
- correct parser. Handles comments everywhere, and ; correctly
- more string intervals
- simplified dir.c, less recursion.
- extended for loops
- sinclude()
- finished removing extra junk from Lst_*
- handles ${@D} and friends in a simpler way
- cleaned up and modular VarModifiers handling.
- recognizes some gnu Makefile usages and errors out about them.

Additionally, some extra functionality is defined by FEATURES. The set of
functionalities is currently hardcoded to OpenBSD defaults, but this may
include support for some NetBSD extensions, like ODE modifiers.

Backed by miod@ and millert@, who finally got sick of my endless patches...

Revision 1.39 / (download) - annotate - [select for diffs], Wed Dec 27 19:07:58 2000 UTC (23 years, 4 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.38: +4 -3 lines
Diff to previous 1.38 (colored)

Show CURDIR in that failure case too. Can't show a Makefile name yet
though...

Ok'ed miod@.

Revision 1.38 / (download) - annotate - [select for diffs], Fri Nov 24 14:36:34 2000 UTC (23 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.37: +3 -5 lines
Diff to previous 1.37 (colored)

Change the time stamp interface to use an abstract datatype.
Define two possible interfaces: the classic one,
and the new one (used where available) that depends on timespec.

Better granularity, make is now able to distinguish between files that
were built during the same second.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Sep 14 13:52:42 2000 UTC (23 years, 8 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.36: +3 -3 lines
Diff to previous 1.36 (colored)

Introduce a few macros to handle timestamps in an abstract way.

Replace the time stamp hash in dir.c with an open hashing structure.

In doing so, remove some nasty casts, simplify code a bit:
Dir_MTime can return a modification time, since make does not make
a distinction between out-of-date and non-existent files.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Sep 14 13:46:45 2000 UTC (23 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.35: +4 -3 lines
Diff to previous 1.35 (colored)

Replace the old hash used to hold file names within a directory with
open hashing.

An interesting optimization is that the open hashing interface is more
fine-grained, hence we can compute the correct hash value at the start
of Dir_FindFile, and reuse it for each hash structure into which we look
(the effect is measurable on large directories along with objdir/VPATH).

Remove a few unnecessary Lst_Open/Lst_Close that serve no purpose except
obfuscating the code.

The interface to dir.h changes slightly, hence tedious includes changes...

Revision 1.35 / (download) - annotate - [select for diffs], Thu Sep 14 13:32:06 2000 UTC (23 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.34: +9 -9 lines
Diff to previous 1.34 (colored)

Some systematic clean-up.
- UNUSED macro that expands to __attribute__((unused)) for gcc
- move rcsid around so that they can be tagged UNUSED.
- activate -Wunused.
- use UNUSED instead of kludgy junk for function arguments.
- add extern to all extern prototypes.
- update comments in lst.h.
- clean up var.c a little bit, constifying arguments, updating comments...

Revision 1.34 / (download) - annotate - [select for diffs], Fri Jun 30 23:26:25 2000 UTC (23 years, 10 months ago) by espie
Branch: MAIN
Changes since 1.33: +7 -7 lines
Diff to previous 1.33 (colored)

Recognize `+cmd' as a command that should always be executed, even in
make -n mode.

Currently works only in sequential make mode. In parallel make mode,
it's just a no-op.

Useful to debug recursive Makefiles, and part of POSIX.

Revision 1.33 / (download) - annotate - [select for diffs], Fri Jun 23 16:41:53 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.32: +3 -3 lines
Diff to previous 1.32 (colored)

This patch replaces str_concat with a slightly unobfuscated version.

In particular, Dir_MakeFlags is abusing str_concat, and works much better
with buffers.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Jun 23 16:20:01 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.31: +4 -4 lines
Diff to previous 1.31 (colored)

Once those special variable are taken care of, other Var functions can take
the GNode's context directly.  We rename that special Lst to `SymTable *'
in prevision of things to come.

Along the line, we lose the special GNodes affected to VAR_CMD, VAR_GLOBAL,
VAR_ENV, which become simple Lsts... This is not a problem, except when
getting to a context's name for debugging (handled very nicely by
offsetof).

Again, this is a preparatory patch, which does not gain anything except
for cleaning up issues...

Reviewed by millert@ and miod@, like the previous patch

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jun 23 16:18:09 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

Start of variable fixes and speed-ups.

This patch may seem a bit non-sensical at first. It simply introduces some
new interface. Specifically, recognizes that some variable names
(.TARGET/$@, .OODATE/$?, .ALLSRC/$>, .IMPSRC/$<, .PREFIX/$*, .ARCHIVE/$!,
.MEMBER/$%) are `special' (the actual variables which are local to a
target, e.g. GNode).

Currently, The Varq functions (for Varquick access) are only stubs to the
normal functions.

This fixes a very important detail before proceeding to turn variable lists
into hash tables: if every GNode holds a hash table, initialization times
for those will be very costly. But generic GNodes only hold those seven
special variables... which can be stored directly into a small array;
the only general cases are the environment, the command line and
global variables.

Revision 1.30 / (download) - annotate - [select for diffs], Fri Jun 23 16:15:49 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.29: +33 -37 lines
Diff to previous 1.29 (colored)

Trivial consequences of the previous list changes:

- audit code for Lst_Datum, it's never applied to an empty pointer,
so check can be removed -> turn into a macro,
- Lst_First, Lst_Last can become macro as well
- specialized version of Lst_Succ (Lst_Adv) to use in loops where it cannot
fail,
- Lst_Open can no longer fail. Trim down corresponding code.

Reviewed millert@, miod@

Revision 1.29 / (download) - annotate - [select for diffs], Sat Jun 17 14:38:15 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.28: +46 -47 lines
Diff to previous 1.28 (colored)

This patch introduces a distinction between
Lst_Init (constructor) and Lst_New (allocation + construction)
Lst_Destroy (destructor) and Lst_Delete (deallocation + destruction),
and uses that to turn most dynamic allocation of lists (Lst pointers)
into static structures (LIST).

Most of this is mundane, except for allGNs in targ.c, where the code must
be checked to verify that Targ_Init is called soon enough.

Lst_New is a temporary addition. All lists will soon be static.

Reviewed by millert@, like the previous patch.

Revision 1.28 / (download) - annotate - [select for diffs], Sat Jun 10 01:41:05 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.27: +29 -27 lines
Diff to previous 1.27 (colored)

Clean-up patch: use `void *' instead of old-fashioned ClientData/Address.

Revision 1.27 / (download) - annotate - [select for diffs], Sat Jun 10 01:32:22 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.26: +8 -24 lines
Diff to previous 1.26 (colored)

Thus, Lst_ForEach no longer needs returning a status.
In fact, it can become a macro based on Lst_ForEachFrom.
This also introduces Lst_Every, as a shortcut for the very common case where
Lst_ForEach does not need any user data.

Finally,  make consistent use of a few function typedefs, instead of having
explicit void (*)(Lst)  arguments all over the place.

Revision 1.26 / (download) - annotate - [select for diffs], Sat Jun 10 01:26:36 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.25: +10 -13 lines
Diff to previous 1.25 (colored)

Lst_Find and Lst_ForEach do the same thing, except that the comparison
sense is reversed (Lst_Find  returns when proc says 0, whereas Lst_ForEach
goes on while proc says 0).

This patch turns a number of Lst_ForEach into Lst_Find.
Specifically, all Lst_ForEach that actually may return quickly as proc
does not always returns zero.

Of course, the corresponding proc need to be tweaked to swap 0 and 1...

Revision 1.25 / (download) - annotate - [select for diffs], Sun Mar 26 16:21:32 2000 UTC (24 years, 1 month ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.24: +24 -25 lines
Diff to previous 1.24 (colored)

Remove idiotic, braindead casts T* -> void*
They serve no purpose, except hiding potential bugs.

In particular, remove (ClientData) cast from macro, showing potentially
troublesome use of Hashes to store time_t.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Mar 26 16:08:27 2000 UTC (24 years, 1 month ago) by espie
Branch: MAIN
Changes since 1.23: +6 -6 lines
Diff to previous 1.23 (colored)

Passing an (int) instead of an (int*) won't work.
Those casts are evil...

Revision 1.23 / (download) - annotate - [select for diffs], Tue Feb 1 03:23:32 2000 UTC (24 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.22: +2 -4 lines
Diff to previous 1.22 (colored)

no need to extern int errno if errno.h is included

Revision 1.22 / (download) - annotate - [select for diffs], Thu Jan 20 18:14:58 2000 UTC (24 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.21: +12 -25 lines
Diff to previous 1.21 (colored)

Fix problem pointed out by FreeBSD, regen temp file name each time, to
avoid races.

Make use of basic Unix semantics, namely you can unlink a file while holding
open fd on the data.  Avoid all the mess of having to track useless file names
around.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Dec 19 00:04:25 1999 UTC (24 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.20: +6 -6 lines
Diff to previous 1.20 (colored)

Rearrange Lst_Find interface to conform better with other functions.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Dec 18 21:58:07 1999 UTC (24 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.19: +11 -11 lines
Diff to previous 1.19 (colored)

Nothing ever checks ReturnStatus on Lst_Insert, Lst_Append, Lst_AtFront,
Lst_AtEnd, Lst_Concat, Lst_Remove, Lst_Replace.

Don't bother returning one.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Dec 18 21:56:07 1999 UTC (24 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.18: +6 -4 lines
Diff to previous 1.18 (colored)

Lst_DeQueue already checks for empty lists.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Dec 18 21:53:32 1999 UTC (24 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.17: +19 -19 lines
Diff to previous 1.17 (colored)

NIL, NILGNODE, etc, are only glorified NULL.
Get rid of them.

Get rid of list.h, nothing uses it anyway.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Dec 18 02:11:26 1999 UTC (24 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.16: +4 -4 lines
Diff to previous 1.16 (colored)

make does not use circular lists, get rid of the extra weight.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Dec 16 17:27:18 1999 UTC (24 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored)

Var_Subst is actually two distinct functions folded into one:
split the function specific to for.c out, and give them more sensible
arguments at the same time.

This makes .for loop handling more efficient, as we have some heuristic
to evaluate the size of the buffer needed...

Revision 1.15 / (download) - annotate - [select for diffs], Mon Dec 6 22:28:44 1999 UTC (24 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.14: +3 -5 lines
Diff to previous 1.14 (colored)

Extra parameter no longer needed, ditch.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Nov 11 11:35:17 1999 UTC (24 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored)

Kill Str_FindSubString, it's strstr.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Oct 5 22:06:24 1999 UTC (24 years, 7 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.12: +4 -2 lines
Diff to previous 1.12 (colored)

Efficiency patch from NetBSD:
make spends time freeing data structures right before exiting.
So don't bother.
Keep the code inside #ifdef, so that it's still there if someone
ever wants to use make code inside a library.

Revision 1.12 / (download) - annotate - [select for diffs], Sat Dec 5 00:06:27 1998 UTC (25 years, 5 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.11: +32 -8 lines
Diff to previous 1.11 (colored)

Modifications from netbsd:
- don't interfere with MACHINE/MACHINE_ARCH defines for bootstrap
- type clean-up, time_t, and printing `unknown' ints
- fix TARGET/MEMBER bug in archive rules
- memmove...
- cleaner Error handler.
- reentrant brk_string
- .MAKE env variable
- preliminary scaffolding for .NOPATH

Other improvements:
- efree
- shellneed streamlined
- display Stop in .CURDIR after an error.
- document most features and misfeatures.
- add a few OpenBSD notes to the tutorial.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jul 13 02:11:37 1998 UTC (25 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (colored)

ftpd: sleep for an indeterminate amount for non-existant logins
      to simulate a crypt, like login does.
Use SEEK_* not L_* and kill some 0L's used in lseek while we're there.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Jun 3 17:00:05 1998 UTC (25 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.9: +3 -2 lines
Diff to previous 1.9 (colored)

zero sigaction before use

Revision 1.9 / (download) - annotate - [select for diffs], Sun Mar 15 22:19:24 1998 UTC (26 years, 2 months ago) by flipk
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

fix possibility of null pointer deref when using make's "-j" option.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Dec 16 22:26:21 1997 UTC (26 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.7: +32 -12 lines
Diff to previous 1.7 (colored)

do not overflow fd_set

Revision 1.7 / (download) - annotate - [select for diffs], Sun Jun 15 21:29:22 1997 UTC (26 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.6: +15 -13 lines
Diff to previous 1.6 (colored)

Avoid possible /tmp races by using mkstemp(3).

Revision 1.6 / (download) - annotate - [select for diffs], Sat Nov 30 21:08:56 1996 UTC (27 years, 5 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.5: +123 -121 lines
Diff to previous 1.5 (colored)

Sync with NetBSD:
- 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.
- Fix NetBSD PR #2930: declare missing variable.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Sep 2 16:04:11 1996 UTC (27 years, 8 months ago) by briggs
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.4: +4 -4 lines
Diff to previous 1.4 (colored)

Sync up with NetBSD:
(christos)
	Fix bug reported by Greg Hudson where leaf (source only) nodes were
	referenced only by their basename and not by their full pathname. This
	breaks when .PATH or MAKEOBJDIR are used. There might be Makefiles
	around that try to work around this bug by prepending ${.CURDIR} to
	the sources, and they should be found and fixed. Also a lot of the gunk
	in suff.c that was attempting to work around the same problem could be
	removed.
(christos)
	- 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'
(christos)
	Fix bug where make will always exit with 0, even when one or more
	parallel jobs failed. (Only affects parallel make code)
(christos)
	Protect __P from being multiply defined (for systems that already
	define it)
(christos) Add strdup() since ultrix is missing it.
	From Larry Schwimmer <rosebud@cyclone.Stanford.EDU>
(christos) Add estrdup(), a checked version of strdup and use it.
(christos) Recognize SVR4 style long filename entries in archives.
(thorpej) Tidy up some RCS ids a bit.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jun 26 05:36:32 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.3: +2 -1 lines
Diff to previous 1.3 (colored)

rcsid

Revision 1.3 / (download) - annotate - [select for diffs], Thu Feb 22 22:24:47 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
Changes since 1.2: +17 -10 lines
Diff to previous 1.2 (colored)

From NetBSD:
Support SVR4 style archives.
Fix pr/1421 (from Matthew Green) and pr/1997 (from Jeff Thieleke).
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.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Dec 14 03:23:31 1995 UTC (28 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +989 -561 lines
Diff to previous 1.1 (colored)

from christos@netbsd:
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.
- Turn compat mode on by default. It gets turned off when the -j without
  the -B flag is specified. [Thus you can use -j 1 to turn it off].
- Fix malloc -> emalloc as Gordon noted.
Updates for POSIX/SVR4 compiling:
arch.c:          Don't require ranlib stuff. Not everybody has it.
dir.c:           SunOS-4 != Solaris; change #ifdef sun to #if sun && !__svr4__
job.c, compat.c: Don't use 'union wait', use int and the W*() macros.
main.c:          Check for uname() == -1; some unames return > 0...
util.c, job.c:   Add signal() with BSD semantics for svr4, don't use bsd
                 sigmask and friends.

from cgd@netbsd:
pull in make.h.  (PAlloc() now uses emalloc(), which is prototyped in
make.h.  If the prototype is not in scope on the Alpha, I see lots
of "cast to pointer from integer of different size" warnings.)

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:45:42 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:45:42 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.