History log of /freebsd-9.3-release/usr.bin/make/job.h
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 186559 29-Dec-2008 obrien

1. Add the ability to tweak the token output before targets in job mode.
E.g., .MAKE.JOB.PREFIX=${.newline}---[${.MAKE.PID}]
would produce

---[1234] target ---

2. Added ${.newline} as a simple means of being able to include '\n' in the
assignment of .MAKE.JOB.PREFIX

Obtained from: NetBSD


# 186279 18-Dec-2008 fjoe

Exit with error code 2 when run with -k (continue if errors) and build failed.


# 167330 08-Mar-2007 fjoe

Implement "Remaking Makefiles" feature:

After reading Makefile and all the files that are included using .include
or .sinclude directives (source Makefiles) make considers each source
Makefile as a target and tries to rebuild it. Both explicit and implicit
rules are checked and all source Makefiles are updated if necessary. If
any of the source Makefiles were rebuilt, make restarts from clean state.

To prevent infinite loops the following source Makefile targets are
ignored:
- :: targets that have no prerequisites but have commands
- ! targets
- targets that have .PHONY or .EXEC attributes
- targets without prerequisites and without commands

When remaking a source Makefile options -t (touch target), -q (query
mode), and -n (no exec) do not take effect, unless source Makefile is
specified explicitly as a target in make command line.
Additionally, system makefiles and .depend are not considered as a
Makefiles that can be rebuilt.

Reviewed by: harti


# 146572 24-May-2005 harti

Factor out all the .SHELL parsing related stuff into its own file and
rename the function to be consistent with the naming scheme in the rest
of make. No functional changes.

Obtained from: DragonFlyBSD (idea and most of shell.h)


# 146560 24-May-2005 harti

Before doing any parsing parse the builtin shell specifications and
set the current shell to DEFSHELL. Put all these specifications into
a list. Add user specified new shells to this list. If the user
just selects one of the already know shells just pick the right one
off the list. This let's one do something like:

# Full specification of the user's shell. This also selects the shell.
.SHELL: name=myshell path=/somewhere/foo echo=loud ...

FOO != bar # use myshell here

.SHELL: name=sh

BAR != baz # use /bin/sh here

.SHELL: name=myshell # no need for full spec here.

# continue to use the user's special shell.


# 146345 18-May-2005 harti

Get rid of global variables for argument vectors produced by brk_string()
introduce a struct that holds all the information about an argument
vector and pass that around.

Author: Max Okumoto <okumoto@ucsd.edu>
Obtained from: DragonFlyBSD


# 146338 18-May-2005 harti

Get rid of the ReturnStatus obscuration that was anyway used only
in two places. While here don't bother returning anything from
Lst_Replace - nobody ever checks the return code.

Suggested by: jmallet


# 146177 13-May-2005 harti

Move the Boolean and ReturnStatus stuff from sprite.h to util.h and
get rid of sprite.h.

Obtained from: DragonFlyBSD


# 146174 13-May-2005 harti

Make Shell_Init() static - it's only used here.
Make sure we don't end up with shellPath beeing non-zero, but shellName
beeing zero in the error case - back out cleanly from the error.
When executing a command for macro assignment in Cmd_Exec() stuff the
path of the shell into argv[0], not the name. This makes no difference
from the functionality point of view, but allows the regression tests to
determine whether make executes the correct shell.


# 146144 12-May-2005 harti

Cleanup main(). Move catching SIGCHLD into job.c. Move unsetenv("ENV")
into job.c. Move retrieving of environment nearer to the place where it
is actually used and invert the preprocessor conditionals to use
positive logic.

Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.236)


# 146142 12-May-2005 harti

Compat_RunCommand is used only in job.c so make it static there.

Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.234)


# 146140 12-May-2005 harti

Fix the fix for bin/72510 applied in job.c:1.70. Actually there have
been two maxJobs variables: one static in job.c and one global used in
main.c and parse.c. Makeing one global out of these was the wrong way
to fix the problem. Instead rename the global one to jobLimit and keep
maxJobs static in job.c.

Suggested by: rwatson
PR: bin/72510


# 146059 10-May-2005 harti

Make shellPath and shellName static - they're used in job.c only.
Move definition of parsing error levels from make.h into parse.h.

Patches: 7.202,7.203
Submitted by: Max Okumoto <okumoto@ucsd.edu>


# 146057 10-May-2005 harti

Move the defines for TMPPAT and KQUEUE from the public job.h into job.c
since they are used only there.

Patch: 7.200
Submitted by: Max Okumoto <okumoto@ucsd.edu>


# 146056 10-May-2005 harti

Merge compat.c into job.c. There is a lot in common between these
files and we are going to factor this out.

Patch: 7.199 (slightly changed)
Submitted by: Max Okumoto <okumoto@ucsd.edu>


# 146054 10-May-2005 harti

Move Cmd_Exec() from main.c to job.c and fix its prototype. This
results in a warning that will go away soon.

Patch: 7.198
Submitted by: Max Okumoto <okumoto@ucsd.edu>


# 144493 01-Apr-2005 harti

Remove a forward declaration that isn't needed anymore.


# 144483 01-Apr-2005 harti

Both struct Job and struct Shell are only used inside job.c so there is
no need to have them in a header file that is included by other modules.
Move them both into the c-file.


# 141104 01-Feb-2005 harti

Clean up include files and file including. Split nonints.h into pieces
that get included just where they are needed. All headers include the
headers that they need to compile (just with an empty .c file). Sort
includes alphabetically where apropriate and fix some duplicate commenting
for struct Job, struct GNode and struct Shell by removing one version and
inlining the comments into the structure declaration (the comments have been
somewhat outdated).

This patch does not contain functional changes (checked with md5).

Submitted by: Max Okumoto <okumoto@ucsd.edu>


# 138512 07-Dec-2004 harti

Typedefs of pointers to structs are evil. Make Lst and LstNode typedef of
the structs itself not of pointers to them. This will simplify constification.

Checked by: diff on the object files


# 138232 30-Nov-2004 harti

Stylification: missing spaces, extra space after function names, casts
and the sizeof operator, missing empty lines, void casts, extra empty lines.

Checked by: diff on make *.o lst.lib/*.o

Submitted by: Max Okumoto <okumoto@soe.ucsd.edu> (partly)


# 138228 30-Nov-2004 harti

Constify the array of predefined shells. It turns out that we need two
versions of the structure definition for this: one with const char
pointers, because otherwise gcc won't let us initialize the fields with
constant strings, and one without the const, because we need to work
with the structure.


# 137606 12-Nov-2004 phk

Add code to enforce the paralleism count (-j N) for the entire tree
of submakes spawned during processing.

We create a fifo and stuff one character into it for each job we are
allowed to run. The name of the fifo is passed to child processes
in the MAKE_JOBS_FIFO environment variable.

A make which finds this variable on startup will open the fifo and
only spawn jobs when it managed to read a token from the fifo.
When the job completes a token is writen back to the fifo.

Slave make processes get one token for free: the one their parent
make got in order to run them. This makes the make processes
themselves invisible in the process counts.

The net effect is that "make -j 12 -s buildworld" will start at
most 12 jobs at the same time, instead of as previously up to
65 jobs would get started.


# 137572 11-Nov-2004 phk

Get rid of more local/remote leftovers


# 137252 05-Nov-2004 harti

Now with the remote job support removed there can be no remote jobs and
no jobs that need to be remigrated. Remove the flags and the associated
code.


# 137202 04-Nov-2004 harti

Remove the remote stuff from make. This actually never worked in our make
because the necessary files were not imported with the original import.
If somebody really needs it, there is still the devel/pmake port.

This is just the first step and removes just everything that is ifdef'ed out.
Otherwise the code is unchanged.

Checked by: md5

Approved by: no objections on arch@


# 136840 23-Oct-2004 ru

Expand the scope of the .SHELL specification to also cover
the compat mode of operation and the != operator.

While here, fixed a bug in the .SHELL directive processing
when only the name= attribute is specified and no built-in
shell matches this name, causing null pointer dereference.

Obtained from: NetBSD (except for bugs)


# 123659 19-Dec-2003 scottl

Change the select timeout from 100ms to 2 seconds now that SIGCHILD is
handled.


# 104693 08-Oct-2002 jmallett

Remove extern declarations from functions and source files where they would
happily fit into headers.


# 104475 04-Oct-2002 phk

Give make(1) the ability to use KQUEUE to wait for worker processes
instead of polling for them.

Unfortunately we cannot enable it yet because it panics the kernel
somewhere in kqueue.

Submitted by: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>


# 103981 25-Sep-2002 jmallett

Don't declare things as extern when they will be static.

Sponsored by: Rachel Hestilow <rachel@jerkcity.com>


# 103503 17-Sep-2002 jmallett

#define<space> -> #define<tab>


# 98136 12-Jun-2002 jmallett

The error functions take constant pointers to strings for their format.


# 94594 13-Apr-2002 obrien

Prefer BSDmakefile over makefile and Makefile.

Submitted by: jmallett
Obtained from: OpenBSD


# 94589 13-Apr-2002 obrien

Fix copyrights, and undo SCS ID damage.


# 92921 21-Mar-2002 imp

remove __P


# 69527 02-Dec-2000 will

There's no reason to use fancy forms of NULL. Replace all instances
of NIL, NILLST, NILLGNODE, etc. with NULL.

Obtained from: OpenBSD


# 56151 17-Jan-2000 kris

Create tempfiles securely.

Reviewed by: imp


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 50145 22-Aug-1999 hoek

Fix a temp file race occurring only when -j is used.

Noticed by: ru
Obtained from: OpenBSD


# 25080 21-Apr-1997 phk

In these XXX MHz days, waiting 500ms for a process to do something is
really far too long. Let us try 100ms instead, if you have a PP200,
maybe that's even too long. This should speed up make -j# builds.
I wonder why SIGCHLD isn't used...


# 23006 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 18804 08-Oct-1996 steve

O' to be bitten by CVS. Cleanup after import
of Christos' version of make(1) and add Id's.

Set straight by: Bruce Evans and Peter Wemm :)


# 18730 06-Oct-1996 steve

Merge in NetBSD's changes to make(1). Changes include:

- Add the .PHONY, .PARALLEL, and .WAIT directives
- Added the -B and -m commandline flags
- misc. man page cleanups
- numerous job-related enhancements
- removed unused header file (bit.h)
- add util.c for functions not found in other envs.
- and a few coordinated whitespace changes

Special thanks to Christos Zoulas <christos@netbsd.org>
for help in the merge. A 'diff -ur' between Net and
FreeBSD now only contains sccsid-related diffs. :)

Obtained from: NetBSD, christos@netbsd.org, and me


# 8874 30-May-1995 rgrimes

Remove trailing whitespace.


# 5814 23-Jan-1995 jkh

Bring in a number of changes from NetBSD's make, fixing quite a few
problems in the process:

1. Quoting should work properly now. In particular, Chet's reported bash
make problem has gone away.
2. A lot of memory that just wasn't being free'd after use is now freed.
This should cause make to take up a LOT less memory when dealing with
archive targets.
3. Give proper credit to Adam de Boor in a number of files.
Obtained from: NetBSD (and Adam de Boor)


# 1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.


# 1590 27-May-1994 rgrimes

BSD 4.4 Lite Usr.bin Sources