The NetBSD Project

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

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / make

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.78 / (download) - annotate - [select for diffs], Tue Dec 19 19:33:39 2023 UTC (3 months, 4 weeks ago) by rillig
Branch: MAIN
CVS Tags: HEAD
Changes since 1.77: +2 -4 lines
Diff to previous 1.77 (colored) to selected 1.38 (colored)

make: clean up comments

No binary change, except for line numbers in assertions.

Revision 1.77 / (download) - annotate - [select for diffs], Wed Dec 15 12:58:01 2021 UTC (2 years, 4 months ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.76: +7 -5 lines
Diff to previous 1.76 (colored) to selected 1.38 (colored)

make: format comments according to /usr/share/misc/style

Assisted by indent(1), with manual corrections due to its many remaining
bugs.

No functional change.

Revision 1.76 / (download) - annotate - [select for diffs], Wed Dec 15 12:24:13 2021 UTC (2 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.75: +5 -6 lines
Diff to previous 1.75 (colored) to selected 1.38 (colored)

make: use consistent indentation for statements and continuations

No binary change, except for line numbers in assertions in suff.c.

Revision 1.75 / (download) - annotate - [select for diffs], Wed Dec 15 12:08:25 2021 UTC (2 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored) to selected 1.38 (colored)

make: remove redundant comments for multiple-inclusion guards

Revision 1.74 / (download) - annotate - [select for diffs], Wed Dec 15 09:53:41 2021 UTC (2 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.73: +7 -6 lines
Diff to previous 1.73 (colored) to selected 1.38 (colored)

make: mark several functions whose result must be used

Suggested by sjg, to catch more bugs like the memory leak in cond.c
1.303 from 2021-12-13.

No binary change.

Revision 1.73 / (download) - annotate - [select for diffs], Sat Apr 3 11:08:40 2021 UTC (3 years ago) by rillig
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.72: +10 -10 lines
Diff to previous 1.72 (colored) to selected 1.38 (colored)

make: use C99 bool type instead of defining its own

No functional change.

Revision 1.72 / (download) - annotate - [select for diffs], Fri Feb 5 19:19:17 2021 UTC (3 years, 2 months ago) by sjg
Branch: MAIN
Changes since 1.71: +2 -1 lines
Diff to previous 1.71 (colored) to selected 1.38 (colored)

Avoid strdup in mkTempFile

Require caller to pass a buffer and size if they
want the tempfile not unlinked.

Add Job_TempFile to handle blocking signals around
call to mkTempFile, so that meta_open_filemon can use it
in jobs mode.

Revision 1.71 / (download) - annotate - [select for diffs], Wed Dec 30 10:03:16 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.70: +5 -3 lines
Diff to previous 1.70 (colored) to selected 1.38 (colored)

make(1): format multi-line comments

Revision 1.70 / (download) - annotate - [select for diffs], Tue Dec 15 16:30:55 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.69: +32 -32 lines
Diff to previous 1.69 (colored) to selected 1.38 (colored)

make(1): indent job.h with tabs instead of spaces

Revision 1.69 / (download) - annotate - [select for diffs], Sat Dec 12 10:21:50 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.68: +1 -3 lines
Diff to previous 1.68 (colored) to selected 1.38 (colored)

make(1): move Job.xtraced to ShellWriter

This flag was placed wrong in the Job since it is only necessary as long
as the shell commands are written to the shell file.

Resetting it in JobStart and JobExec was completely misguided since that
is far away from writing the shell commands; this should have been done
in JobPrintCommands instead.

The status of this flag doesn't need to be printed in debugging mode
since it is controlled by a single command line option (-dx) and does
not interact with all the other switches.

Revision 1.68 / (download) - annotate - [select for diffs], Sat Dec 12 01:42:33 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.67: +2 -3 lines
Diff to previous 1.67 (colored) to selected 1.38 (colored)

make(1): in jobs mode, extract writing of shell commands

Right now, the test sh-flags.mk demonstrates many variants to configure
echoing of the shell commands (-s, .SILENT, '@'), error handling (-i,
.IGNORE, '-') and whether the commands are run (-n, -N, .MAKE,
.RECURSIVE, '+').

Even more variants are possible by configuring the shell to have error
control.  None of the built-in shell definitions has error control, so
it is unlikely that anybody uses them, but who knows.

Being able to configure these details at 3 levels is good, but what
makes all this really hard to understand is that some of these switches
interact in non-obvious ways.  For example, in jobs mode, a single
command can change job->ignerr (in JobPrintSpecialsEchoCtl), which will
affect all further commands of that job.

The goal of this refactoring is to make the code easier to understand by
making the switches on the job level constant and by moving all
modifications to them to the ShellWriter.

Revision 1.67 / (download) - annotate - [select for diffs], Thu Dec 10 21:41:35 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored) to selected 1.38 (colored)

make(1): negate Job.silent to echo

This gets rid of a few explicit negations and an implicit negation in
the variable name.

Revision 1.66 / (download) - annotate - [select for diffs], Thu Dec 10 21:33:25 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.65: +10 -15 lines
Diff to previous 1.65 (colored) to selected 1.38 (colored)

make(1): unpack struct JobFlags

The job flags are only used individually.

Revision 1.65 / (download) - annotate - [select for diffs], Thu Dec 10 20:49:11 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.64: +7 -7 lines
Diff to previous 1.64 (colored) to selected 1.38 (colored)

make(1): split JobFlags into separate fields

Having all these flags in a single bitmask makes it harder to see where
exactly they can possibly be used since their state could also be
modified using the unsuspicious job->flags = 0.  Using individual names
just leaves the single memset, and that is only used during
initialization.

Revision 1.64 / (download) - annotate - [select for diffs], Sun Nov 29 09:27:40 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.63: +3 -3 lines
Diff to previous 1.63 (colored) to selected 1.38 (colored)

make(1): use space instead of tab for preprocessor directives

Revision 1.63 / (download) - annotate - [select for diffs], Sat Nov 14 13:27:01 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.62: +2 -2 lines
Diff to previous 1.62 (colored) to selected 1.38 (colored)

make(1): fix grammar: setup -> set up

Revision 1.62 / (download) - annotate - [select for diffs], Sat Nov 14 12:38:06 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.61: +4 -4 lines
Diff to previous 1.61 (colored) to selected 1.38 (colored)

make(1): rename JobState to JobStatus

The status is only part of the whole state of a job.

Revision 1.61 / (download) - annotate - [select for diffs], Sun Nov 8 01:16:04 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.60: +1 -3 lines
Diff to previous 1.60 (colored) to selected 1.38 (colored)

make(1): remove unused JOB_IGNDOTS

It had been used in 1993 at least, don't know when it was finally
removed.

Revision 1.60 / (download) - annotate - [select for diffs], Sat Nov 7 21:24:33 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.59: +3 -2 lines
Diff to previous 1.59 (colored) to selected 1.38 (colored)

make(1): fix type of Job.suspended

Revision 1.59 / (download) - annotate - [select for diffs], Sat Nov 7 20:03:56 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.58: +7 -6 lines
Diff to previous 1.58 (colored) to selected 1.38 (colored)

make(1): clean up JobStart

Initialize the fields in declaration order.
Initialize Job.flags in a single assignment.

Revision 1.58 / (download) - annotate - [select for diffs], Mon Oct 26 21:34:10 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.57: +1 -2 lines
Diff to previous 1.57 (colored) to selected 1.38 (colored)

make(1): group the command line options and arguments

By having a single struct that holds all command line options and
arguments, it is easy to see in the code when such a command line
argument is modified.  It also cleans up the namespace since the command
line options don't follow a common naming style.  Having them in a
struct also means that there is a single place for putting the
documentation, not two as before.

The struct also suggests to extract the initialization code out of main,
which is still too large, having more than 400 lines of code and
covering far too many topics.

Revision 1.57 / (download) - annotate - [select for diffs], Fri Oct 23 07:14:32 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.56: +24 -14 lines
Diff to previous 1.56 (colored) to selected 1.38 (colored)

make(1): convert JobState and JobFlags to enum types

Both GCC and Clang complained when JobFindPid had its parameter "status"
as an int.  Strangely both compilers complained about a comparison
between unsigned and signed int, even though enums are defined to be
int, not unsigned.

Revision 1.56 / (download) - annotate - [select for diffs], Mon Oct 19 23:07:22 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.55: +1 -62 lines
Diff to previous 1.55 (colored) to selected 1.38 (colored)

make(1): move struct Shell from job.h to job.c

This type is only needed in job.c.

Revision 1.55 / (download) - annotate - [select for diffs], Mon Oct 5 21:37:07 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.54: +3 -3 lines
Diff to previous 1.54 (colored) to selected 1.38 (colored)

make(1): prepare job.c, main.c, parse.c, suff.c for WARNS=6

In job.c, GCC 5 complains about the macro FILENO that it has type
unsigned int, which is then passed as the argument of dup2, which
expects a simple int.  Maybe this workaround from 1995 is not necessary
anymore, or maybe it is but can be restricted to the few affected
platforms.

This leaves meta.c and the filemon files to be converted.  I didn't do
them since they are not well covered by the unit tests.

Revision 1.54 / (download) - annotate - [select for diffs], Mon Sep 28 00:13:03 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.53: +8 -8 lines
Diff to previous 1.53 (colored) to selected 1.38 (colored)

make(1): format job.h consistently

Revision 1.53 / (download) - annotate - [select for diffs], Mon Sep 28 00:06:36 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.52: +3 -5 lines
Diff to previous 1.52 (colored) to selected 1.38 (colored)

make(1): split Job.jobPipe into 2 separate fields

Just because these file descriptors have to be in an array when they are
created is not reason enough to keep this array and a few access macros
in the Job struct.  It's better to have separate fields, as they can be
documented independently.

Revision 1.52 / (download) - annotate - [select for diffs], Sun Sep 27 23:12:12 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.51: +37 -36 lines
Diff to previous 1.51 (colored) to selected 1.38 (colored)

make(1): rewrite documentation of Job

The comment above a struct is supposed to give a high-level overview.
The previous comment didn't do that but instead listed the struct fields
in declaration order in a numbered list, which was not helpful.

Revision 1.51 / (download) - annotate - [select for diffs], Sun Sep 27 21:35:16 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.50: +27 -27 lines
Diff to previous 1.50 (colored) to selected 1.38 (colored)

make(1): normalize whitespace in source code

There is no more space tab.  Either only tabs or only spaces or tabs
followed by spaces, but not spaces followed by tabs.

Revision 1.50 / (download) - annotate - [select for diffs], Sun Sep 27 19:17:03 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.49: +1 -2 lines
Diff to previous 1.49 (colored) to selected 1.38 (colored)

make(1): remove nonexistent function from header

Revision 1.49 / (download) - annotate - [select for diffs], Sun Sep 27 19:15:43 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.48: +2 -2 lines
Diff to previous 1.48 (colored) to selected 1.38 (colored)

make(1): fix type of Shell.noPLen

Revision 1.48 / (download) - annotate - [select for diffs], Mon Sep 21 17:44:25 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored) to selected 1.38 (colored)

make(1): add specific typedefs for lists

These typedefs are only intended to help human readers, they do not
provide any type-safety.  They also make the pointers explicit, which
had been hidden before by the typedef for Lst and LstNode.  Typing a few
'*' is less work than finding out which of the many types are pointers
and which aren't.

In meta.c, the variable "ln" served two completely different purposes,
which have been split again.  Register allocation is the job of the
compiler, not of the human source code reader.

Revision 1.47 / (download) - annotate - [select for diffs], Sat Aug 29 12:20:17 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored) to selected 1.38 (colored)

make(1): remove ReturnStatus, SUCCESS and FAILURE

These are used in so few places now that it is easier to use a simple
Boolean for them.

Revision 1.46 / (download) - annotate - [select for diffs], Thu Aug 27 06:18:22 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.45: +2 -5 lines
Diff to previous 1.45 (colored) to selected 1.38 (colored)

make(1): remove unused declarations from job.h

Revision 1.45 / (download) - annotate - [select for diffs], Sat Aug 22 08:01:34 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.44: +1 -3 lines
Diff to previous 1.44 (colored) to selected 1.38 (colored)

make(1): remove form feeds in the code

Revision 1.44 / (download) - annotate - [select for diffs], Thu Aug 13 03:54:57 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.43: +4 -4 lines
Diff to previous 1.43 (colored) to selected 1.38 (colored)

make(1): follow naming conventions for multiple-inclusion guards

This avoids undefined behavior.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Jul 3 08:13:23 2020 UTC (3 years, 9 months ago) by rillig
Branch: MAIN
Changes since 1.42: +6 -6 lines
Diff to previous 1.42 (colored) to selected 1.38 (colored)

make(1): remove trailing whitespace

Revision 1.42 / (download) - annotate - [select for diffs], Fri Jul 5 22:14:56 2013 UTC (10 years, 9 months ago) by sjg
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, is-mlppp-base, is-mlppp, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Changes since 1.41: +2 -1 lines
Diff to previous 1.41 (colored) to selected 1.38 (colored)

If commandShell hasErrCtl is true, set shellErrFlag for use by
CompatRunCommand() so that behavior in jobs and compat mode
remains consistent.

Revision 1.41 / (download) - annotate - [select for diffs], Tue Mar 5 22:01:44 2013 UTC (11 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: agc-symver-base, agc-symver
Changes since 1.40: +2 -1 lines
Diff to previous 1.40 (colored) to selected 1.38 (colored)

Add a .STALE special target that gets invoked when dependency files contain
stail entries.

Revision 1.40 / (download) - annotate - [select for diffs], Mon Sep 13 15:36:57 2010 UTC (13 years, 7 months ago) by sjg
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-mips64-premerge-20101231, dholland-make-base, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache, tls-maxphys
Changes since 1.39: +10 -1 lines
Diff to previous 1.39 (colored) to selected 1.38 (colored)

Add meta.c which implements "meta" mode for make.
In this mode, a .meta file is created for each target, capturing
the expanded commands used, any command output, and if filemon(9)
is available, a record of system calls which are of interest.
Not enabled unless USE_META=yes is set when building make.
Also, if FILEMON_H exists, meta.c will be compiled to use filemon(9).

Revision 1.39 / (download) - annotate - [select for diffs], Sat Apr 11 09:41:18 2009 UTC (15 years ago) by apb
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)

Honour the TMPDIR environment variable instead of always using /tmp
as a place to store temporary files.

Revision 1.38 / (download) - annotate - [selected], Sat Dec 13 15:19:29 2008 UTC (15 years, 4 months ago) by dsl
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

Use NULL instead of -1 cast to the relavant type (usually via NIL).
This was a suggestion from christos - so blame him if there is a deep
reason for using -1 :-)

Revision 1.37 / (download) - annotate - [select for diffs], Fri Feb 15 21:29:50 2008 UTC (16 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, mjf-devfs2, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base
Changes since 1.36: +4 -4 lines
Diff to previous 1.36 (colored) to selected 1.38 (colored)

back all changes out until I fix it properly.

Revision 1.36 / (download) - annotate - [select for diffs], Fri Feb 15 09:18:56 2008 UTC (16 years, 2 months ago) by dholland
Branch: MAIN
CVS Tags: christos-broken
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored) to selected 1.38 (colored)

fix typo in comment

Revision 1.35 / (download) - annotate - [select for diffs], Thu Feb 14 22:11:20 2008 UTC (16 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.34: +3 -3 lines
Diff to previous 1.34 (colored) to selected 1.38 (colored)

- use pid_t/size_t as appropriate instead of int.
- use %ld to print pids.
- fix a bit of lint.
- WARNS=4

Revision 1.34 / (download) - annotate - [select for diffs], Mon Oct 1 22:14:09 2007 UTC (16 years, 6 months ago) by sjg
Branch: MAIN
CVS Tags: matt-armv6-base, cube-autoconf-base, cube-autoconf
Changes since 1.33: +2 -1 lines
Diff to previous 1.33 (colored) to selected 1.38 (colored)

Add the ability to tweak the token output before targets in job mode.
Eg.
.MAKE.JOB.PREFIX=${.newline}---${.MAKE:T}[${.MAKE.PID}]
would produce
---make[1234] target ---

Revision 1.33 / (download) - annotate - [select for diffs], Wed Oct 11 07:01:44 2006 UTC (17 years, 6 months ago) by dsl
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: matt-armv6
Changes since 1.32: +6 -12 lines
Diff to previous 1.32 (colored) to selected 1.38 (colored)

There is no need to resize the pollfd array, it can only ever have 2+maxJobs
entries, so allocate at startup.
Use an 'int jobPipe[2]' within the job structure, and create pipes directly
into it.  Common up the code that creates all the pipes - making them all
non-block on the read side in the process.
Call Job_CatchChildren() directly from Job_CatchOutput() so that it only
gets called when a child actually exits.
NB: Something causes a 'pregnant pause' if (for example) you call 'nbmake obj'
in src/tools.  Introduced between netbsd 3 and 4.

Revision 1.32 / (download) - annotate - [select for diffs], Mon Oct 9 14:36:41 2006 UTC (17 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.31: +13 -41 lines
Diff to previous 1.31 (colored) to selected 1.38 (colored)

Rip out the code for the undocumented -P (don't use pipes for command
output) option.  I'm sure it is baggage from the past.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Oct 9 13:40:11 2006 UTC (17 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.30: +1 -2 lines
Diff to previous 1.30 (colored) to selected 1.38 (colored)

Instead of trying to report all the 'job suspended' and 'job resumed'
messages whan make itself is suspended (ie by ^Z) before make actually
suspends, supress the messages during this sequence.
This means we don't care that they would be output after the suspend
and we can stop attempting to reap child status from withing the signal
handler (which doesn't work for recursive parallel makes).
The code simplification means that we can remove much of the code that
blocked signals - since the signal handlers (expect that for ^C and friends)
now do almost no work.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Sep 23 20:51:28 2006 UTC (17 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.29: +8 -10 lines
Diff to previous 1.29 (colored) to selected 1.38 (colored)

Complete revamp of the way make handles job control signals.
- Send each type of signal to its own handler.
- Only call JobFinish when a process exits, in particular don't 'fake up'
  'exitstatus' for jobs being continued, nor call it for suspends.
- When a job is stopped, use an entire variable to remember the fact, so
  we know we need to send a SIGCONT.  Don't change any other state.
- In order to report '*** [job3] Suspended' before we suspend ourselves we
  have to call waitpid() from the signal handler - where we don't want to
  process job termination events. Save the exit status and process later.
The code now handles:
- jobs that suspend themselves
- jobs exiting while suspended
- jobs that don't actually suspend at all
Hoewever it still does printfs() from the signal handler, and I haven't yet
stopped it thrashing the signal mask.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Sep 22 19:07:09 2006 UTC (17 years, 7 months ago) by dsl
Branch: MAIN
Changes since 1.28: +7 -1 lines
Diff to previous 1.28 (colored) to selected 1.38 (colored)

Replace the two lists 'job_list' (previously 'jobs') and 'stoppedJobs'
with a table that is malloced with 'maxJobs' entries.
Add a 'job_state' field to the Job type that exactly follows which of
the old lists the job was on (or not).
Change all the code that scanned the lists to scan the array.
No logic changes in this commit.
(Soon we'll no longer need to lock out signals for the changes to job
statuses that are done from signal handlers now that there is no linked list.)

Revision 1.28 / (download) - annotate - [select for diffs], Thu Jun 29 22:01:17 2006 UTC (17 years, 9 months ago) by rillig
Branch: MAIN
CVS Tags: abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.27: +5 -1 lines
Diff to previous 1.27 (colored) to selected 1.38 (colored)

Fixed the bug reported in PR 33866, which is that the :Q operator does not
handle newlines correctly. Ok'ed by christos.

Revision 1.27 / (download) - annotate - [select for diffs], Fri Mar 31 21:05:34 2006 UTC (18 years ago) by dsl
Branch: MAIN
CVS Tags: chap-midi-nbase, chap-midi-base, chap-midi
Changes since 1.26: +5 -4 lines
Diff to previous 1.26 (colored) to selected 1.38 (colored)

There is no need to count jobs and job tokens.
If we don't create the job pipe, use the '-j n' option to limit the number
of tokens we will remove from the pipe.

Revision 1.26 / (download) - annotate - [select for diffs], Mon Mar 13 20:35:09 2006 UTC (18 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.25: +1 -3 lines
Diff to previous 1.25 (colored) to selected 1.38 (colored)

JOB_FIRST is always set (since we only execute the shell once for every
target). Nuke it.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Mar 11 17:18:00 2006 UTC (18 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.24: +3 -29 lines
Diff to previous 1.24 (colored) to selected 1.38 (colored)

Remove most of the code seemed to be there to support 'remote jobs'.
It isn't clear that it ever worked, if it did it has almost certainly
bitrotted in the last 12 years.  I'm not even sure all the required
components were present.
I suspect it was written to attempt to use a 'farm' of diskless sun3s.
In any case the apparant random assignment fo jobs to other systems doesn't
actually seem like a good idea!
Things like 'distcc' han be used to help slow systems run native builds.
Removing this code also simplifies make, and should let me speed up some of
its processing - without worrying about bitrotting it further.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Jan 22 19:54:55 2006 UTC (18 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.23: +2 -1 lines
Diff to previous 1.23 (colored) to selected 1.38 (colored)

Make .NOTPARALLEL stop the job engine issuing more than one token (instead
of trying to de-jobify the make.
You can now put .NOTPARALLEL in a submake of a recursive make (where it is
using a job-token pipe from the outer make and have it only run a single job.
You can also specify .NOTPARRALEL in the root makefile of a large recursive
make and have the submakes run multiple commands.
Add some diagnostics printfs (enabled with -dp) to the parser.

Revision 1.23 / (download) - annotate - [select for diffs], Wed Jan 4 21:35:44 2006 UTC (18 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.22: +1 -2 lines
Diff to previous 1.22 (colored) to selected 1.38 (colored)

Expunge last references to jobTokensFree

Revision 1.22 / (download) - annotate - [select for diffs], Wed Jan 4 21:31:55 2006 UTC (18 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.21: +1 -2 lines
Diff to previous 1.21 (colored) to selected 1.38 (colored)

When a parallel make job completes, always put the job token back into the
job_pipe and collect another one for the next job.
If we are aborting, remove all the 'normal' job tokens and add an 'error' one.
If we get an 'error' token, remove any other tokens, re-insert the error
token and exit (with error 'cos that is easier).
Add the current pid to some of the DEBUG(JOB) traces.
Combined effect is that parallel makes actually stop some fairly shortly
after an error, rather than running on long enough to fill the scrollback.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Dec 20 00:18:22 2003 UTC (20 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Changes since 1.20: +11 -4 lines
Diff to previous 1.20 (colored) to selected 1.38 (colored)

Fixes for PR#18573 (make -j not stopping correctly on error).
Using -e in sh/ksh to stop on error doesn't work with grouped commands. At
least for any SUSE compliant sh(1). Instead, extend the Shell struct and add
errOut which provides a template to use to check error status from commands.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Aug 7 11:14:52 2003 UTC (20 years, 8 months ago) by agc
Branch: MAIN
Changes since 1.19: +34 -1 lines
Diff to previous 1.19 (colored) to selected 1.38 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Aug 1 00:39:53 2003 UTC (20 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.18: +5 -1 lines
Diff to previous 1.18 (colored) to selected 1.38 (colored)

Allow .SHELL: to control the shell used by compat mode too.
Add a shell spec for ksh - a nice portable posix shell.
Document .SHELL:

Revision 1.18 / (download) - annotate - [select for diffs], Mon Jul 14 18:19:12 2003 UTC (20 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.17: +10 -10 lines
Diff to previous 1.17 (colored) to selected 1.38 (colored)

Pass WARNS=3

Revision 1.17 / (download) - annotate - [select for diffs], Sat Nov 16 22:22:23 2002 UTC (21 years, 5 months ago) by gson
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.16: +20 -12 lines
Diff to previous 1.16 (colored) to selected 1.38 (colored)

Fixed race condition that would cause make -j to pause for five
seconds if a SIGCHLD arrived while make was not blocked in poll(),
by making the SIGCHLD handler write to a pipe included in the poll.
Avoided the need to implement a duplicate fix for the USE_SELECT case
by emulating poll() in terms of select() when USE_SELECT is defined.
Fixes bin/18895.

Revision 1.16 / (download) - annotate - [select for diffs], Sat Jun 15 18:24:57 2002 UTC (21 years, 10 months ago) by wiz
Branch: MAIN
Changes since 1.15: +19 -19 lines
Diff to previous 1.15 (colored) to selected 1.38 (colored)

Remove !__STDC__ stuff, de-__P(), ANSIfy, and de-register.

Revision 1.15 / (download) - annotate - [select for diffs], Fri Jun 1 20:33:37 2001 UTC (22 years, 10 months ago) by sjg
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Changes since 1.14: +3 -1 lines
Diff to previous 1.14 (colored) to selected 1.38 (colored)

A number of semi-related changes.
1. make -dx turns on DEBUG_SHELL which causes sh -x to be used where
   possible.
2. PrintOnError() is now called when make is stopping due to an error.
   This routine reports the curdir and the value of any variables listed
   in MAKE_PRINT_VAR_ON_ERROR.
3. Variables set via command line, are propagated to child-makes via
   MAKEFLAGS.  This behaviour appears to be necessary for POSIX (according
   to the GNU folk anyway).
4. Do not reset MAKEFILE when reading ".depend" as this rather eliminates the
   usefulness of ${MAKEFILE}.
5. Added ${.newline} as a simple means of being able to include \n in the
   result of a :@ loop expansion.
6. Set ${MAKE_VERSION} if defined.  Need to come up with a useful value.

Reviewed: christos

Revision 1.14 / (download) - annotate - [select for diffs], Sat Dec 30 16:38:22 2000 UTC (23 years, 3 months ago) by sommerfeld
Branch: MAIN
Changes since 1.13: +3 -1 lines
Diff to previous 1.13 (colored) to selected 1.38 (colored)

Include token counts in trace output.
Don't let tokensFree go negative.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Dec 30 14:21:23 2000 UTC (23 years, 3 months ago) by sommerfeld
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored) to selected 1.38 (colored)

Avoid token leaks when aborting after an error.

Revision 1.12 / (download) - annotate - [select for diffs], Sat Dec 30 02:51:21 2000 UTC (23 years, 3 months ago) by sommerfeld
Branch: MAIN
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (colored) to selected 1.38 (colored)

Do lazy token release - don't return tokens to the pipe unless we're
waiting for something or we're done.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Dec 30 02:05:20 2000 UTC (23 years, 3 months ago) by sommerfeld
Branch: MAIN
Changes since 1.10: +6 -2 lines
Diff to previous 1.10 (colored) to selected 1.38 (colored)

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.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Dec 5 15:20:10 2000 UTC (23 years, 4 months ago) by sommerfeld
Branch: MAIN
Changes since 1.9: +11 -3 lines
Diff to previous 1.9 (colored) to selected 1.38 (colored)

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.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Dec 4 20:13:29 2000 UTC (23 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.8: +13 -1 lines
Diff to previous 1.8 (colored) to selected 1.38 (colored)

oops forgot to commit this one.

Revision 1.8 / (download) - annotate - [select for diffs], Sun Dec 3 01:18:15 2000 UTC (23 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored) to selected 1.38 (colored)

use 6 X's instead of 5 for portability.

Revision 1.7 / (download) - annotate - [select for diffs], Thu May 4 18:29:12 2000 UTC (23 years, 11 months ago) by drochner
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5, minoura-xpg4dl-base, minoura-xpg4dl
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored) to selected 1.38 (colored)

conditionalize prototypes for REMOTE support
(seems that REMOTE support is incomplete anyway)

Revision 1.6 / (download) - annotate - [select for diffs], Thu Mar 26 19:20:37 1998 UTC (26 years ago) by christos
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, comdex-fall-1999-base, comdex-fall-1999
Changes since 1.5: +3 -2 lines
Diff to previous 1.5 (colored) to selected 1.38 (colored)

PR/5210: Hauke Fath: make core dumps with .SHELL
Unfortunately this revealed a deeper problem with the brk_string code.
To fix it:
	- remove sharing of the buffer between brk_string invocations
	- change the semantics of brk_string so that the argument array
	  starts with 0, and return the buffer where the strings are
	  stored

Revision 1.5 / (download) - annotate - [select for diffs], Wed Nov 6 17:59:10 1996 UTC (27 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH001, netbsd-1-3-BETA
Branch point for: netbsd-1-3
Changes since 1.4: +8 -8 lines
Diff to previous 1.4 (colored) to selected 1.38 (colored)

- 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.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jun 14 15:19:26 1995 UTC (28 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA, netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Branch point for: netbsd-1-2
Changes since 1.3: +2 -1 lines
Diff to previous 1.3 (colored) to selected 1.38 (colored)

- $NetBSD$ rcsids
- Fixed so that .[A-Z]* targets that do not match keywords are ignored as
  Posix mandates
- Added .PHONY target keyword

Revision 1.3 / (download) - annotate - [select for diffs], Sat Mar 5 00:34:49 1994 UTC (30 years, 1 month ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.2: +17 -16 lines
Diff to previous 1.2 (colored) to selected 1.38 (colored)

fixes/improvements from Christos Zoulas <christos@deshaw.com>.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Aug 1 18:12:03 1993 UTC (30 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored) to selected 1.38 (colored)

Add RCS identifiers.

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (31 years, 1 month ago) by cgd
Branch: MAIN
Diff to selected 1.38 (colored)

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.




CVSweb <webmaster@jp.NetBSD.org>