History log of /freebsd-9.3-release/usr.bin/make/job.c
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

# 241928 23-Oct-2012 jhb

MFC 228157:
- Fix segmentation fault when running "+command" when run with -jX -n due
to Compat_RunCommand() being called with `cmd' that is not on the
node->commands list
- Make ellipsis ("..." command) handling consistent: check for "..." command
in job make after variables expansion to match compat make behavior
- Fix empty command handling (after variables expansion and @+- modifiers
are processed): now empty commands are ignored in compat make and are not
printed in job make case


# 236742 08-Jun-2012 fjoe

MFC: r231544

Include target names in diagnostic output.

Submitted by: Garrett Cooper


# 225736 22-Sep-2011 kensmith

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

Approved by: re (implicit)


# 202070 11-Jan-2010 harti

Fix the previous commit (still not used to svn vs. cvs). Use the
define from paths.h for the default temporary directory and remove
and unneccessary getenv call.


# 202045 10-Jan-2010 harti

Make make respect the TMPDIR environment variable.

PR: bin/115447
Submitted by: Eugene Grosbein


# 201225 29-Dec-2009 ed

Add missing `void' keyword.


# 199404 17-Nov-2009 obrien

Garbage collect some old #ifdef'ed code from 1994 that causes vi's '%'
to be unable to find a match in Path_FindFile().


# 198197 18-Oct-2009 fjoe

Exit with non-zero error code in case of errors
when make is run with -k and not parallel (compat) make is run.


# 194217 14-Jun-2009 des

Add volatile to sig_atomic_t where it was missing.

MFC after: 1 week


# 188075 03-Feb-2009 obrien

Partially revert r186559.


# 187132 13-Jan-2009 obrien

Don't enable -Q by default - I've fixed the rescue build issue.


# 186713 03-Jan-2009 obrien

+ Add the -Q be-quiet flag for parallel jobs.
- Enable -Q by default for the moment - there is something weird
going on in the rescue build.


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


# 183465 29-Sep-2008 ache

Since in some cases (when found obsolete) 'make' can be builded earlier
at 'upgrade_checks' target, put arc4random_uniform() into
__FreeBSD_version ifdef.


# 181397 07-Aug-2008 ache

Use arc4random_uniform(3)


# 176808 04-Mar-2008 obrien

It seems some don't care for the anchient joke. Add WITHOUT_OLD_JOKE
to your CFLAGS if you fall into this camp.


# 176807 04-Mar-2008 obrien

No need to tell make to DTRT with "make love", just do it.
Also remove the 2002/08/31 bootstrapping aid for upgrades from
year old (mid-2001) systems.


# 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


# 167329 08-Mar-2007 will

Fix a bug where the standard input (fifoFd == 0) was confused with an
error return from open(2), leading to an erroneous value of maxJobs and
a hung make when -f is standard input and -j is used.

PR: bin/101232
Submitted by: Nate Eldredge <nge@cs.hmc.edu>


# 151162 09-Oct-2005 scottl

Make sure that the created fifo gets deleted if the top level make instance
exits due to a signal.


# 148151 19-Jul-2005 harti

Fix the "..." special command. If this command is found all further
commands for this target are appended to the .END target instead
of beeing executed now. They are executed when the graph is finished.
There was a bug with executing the .END target which came in when
doing conversion to LST_FOREACH() which caused make to dump core.

PR: bin/83698
Submitted by: Max Okumoto <okumoto@ucsd.edu>
MFC after: 3 days


# 146581 24-May-2005 harti

The caller of Var_Value() should not change the variable value. Make
this clear by constifying the return value.

Obtained from: DragonFlyBSD


# 146580 24-May-2005 harti

Get rid of the third argument to Var_Value() the pointer it pointed
to has always been set to NULL for some time now.

Obtained from: DragonFlyBSD


# 146574 24-May-2005 harti

Factor out ProcExec() into its own file and rename it to Proc_Exec() for
consistency with the rest of make.

Obtained from: DragonFlyBSD (except for the rename)


# 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)


# 146571 24-May-2005 harti

Use the name of the default shell instead of a numeric index to select
the default shell.

Idea from: DragonFlyBSD


# 146570 24-May-2005 harti

Another shell attribute 'unsetenv' that will cause to unsetenv("ENV")
before executing the shell. Until now this was done when the default
shell was the ksh. This failed if the default shell was sh or csh and
the user switched to ksh.


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


# 146557 24-May-2005 harti

Allow the .SHELL target to specify the list of shell meta characters and
the list of shell builtins. Both of these are needed for the compat
mode where make directly executes commands if the command line contains
neither a shell meta character nor a shell builtin. The list of builtins
is not changed, but csh has '@' added as a meta-character.

Initialize the default shell by parsing a string as one would specify
to the .SHELL target. So we get rid of the CShell clone of struct Shell which
just contained const char * where struct Shell had char *.

Add a debugging function for dumping a parsed shell description to
stdout.


# 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


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


# 146160 12-May-2005 jmallett

Include <err.h>. On my system CVS Make(1) has an implicit declaration of
warnc(3) without it.


# 146156 12-May-2005 harti

Get rid of the warning about vfork() clobbering variables.

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


# 146155 12-May-2005 harti

Do mktemp() by hand to get rid of the mktemp() warning and the
possible associated security hole.

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


# 146147 12-May-2005 harti

The first element of the vector built by brk_string() is never
used so there is no need to stuff the value of .MAKE into it,
which btw isn't set for quite a while already.

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


# 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


# 146133 12-May-2005 harti

Untwist the convoluted if() expressions in JobFinish(). They
could benefit from even more untwisting.

Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.23[01])


# 146132 12-May-2005 harti

Move some comments around to where they belong and remove some unneccessary
gcc magic.

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


# 146131 12-May-2005 harti

Convert Compat_RunCommand() to use ProcWait(). This also gives Cmd_Exec()
the potential to handle interrupts which it doesn't currently.

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


# 146130 12-May-2005 harti

Make a function ProcWait() that waits for the given process.

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


# 146129 12-May-2005 harti

Overhaul the fork(), exec() code. Put all the common handling that
takes place in the child process in a function ProcExec(). Make sure,
that the child does not call malloc() or other potential dangerous
functions (there are still calls to Punt() in the error case that
should go away). Allocate the argv string via malloc to overcome
the non-constness bug of the execvp prototype. Change the handling of
shell meta-characters and move the builtin list near the list of shell
builtins. Both of these lists should actuall be configurable by the .SHELL
target since they depend on the shell used.

Patch: 7.21[2-9], 7.22[0-46]
Submitted by: Max Okumoto <okumoto@ucsd.edu>


# 146061 10-May-2005 harti

Style: remove spaces before tabs.

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


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


# 146058 10-May-2005 harti

Make the three versions of fork() more uniform.

Patch: 7.201 (idea taken, but done differently)
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>


# 146027 09-May-2005 harti

Split Var_Subst() into two functions: Var_SubstOnly() which substitutes
only one variable and Var_Subst() which substitutes all. Split out the
test whether a variable should not be expanded into match_var().
Make access to the input string consistently using str[]. Remove two
unused functions: Var_GetTail() and Var_GetHead().

Patches: 7.184-7.189
Submitted by: Max Okumoto <okumoto@ucsd.edu>


# 144741 07-Apr-2005 harti

Mostly stylistic changes: remove the noPLen field from the Shell
structure - it is just the strlen() of noPrint. Inline JobCondPassSig()
in the only function JobPassSig() using it. Fix the argument types
of JobPrintCommand(). Better parsing for the .SHELL target keywords.


# 144665 05-Apr-2005 harti

There is not much sense in having an else after Punt() and _exit() which
never return. Also use pid_t for variables holding PIDs.


# 144658 05-Apr-2005 harti

Put parantheses into 'if (foo && bar & flag)'. While they are not strictly
needed, they are useful for the human reader.


# 144657 05-Apr-2005 harti

Remove lots if irritating parantheses and fix two comments.

Checked by: md5


# 144656 05-Apr-2005 harti

Remove the definition for STATIC and just use static.


# 144655 05-Apr-2005 harti

Remove unneccessary local prototypes.


# 144654 05-Apr-2005 harti

The static tfile is used only in one single function so move it into that
function.


# 144653 05-Apr-2005 harti

The tfile field of struct Job isn't used anymore since revision 1.22 so
remove it now.


# 144494 01-Apr-2005 harti

Use a type-safe intrusive list to put jobs on the jobs or stoppedJobs list
instead of the generic Lst.


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


# 144467 01-Apr-2005 harti

Style: fix indentation.


# 143959 22-Mar-2005 harti

Simplify buffer access by using Buf_Data() and Buf_Peel() where
appropriate.

Patch: 7.147-7.151

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


# 143810 18-Mar-2005 harti

Replace Lst_Find calls with LST_FOREACH loops. This helps in
constification und simplifies the code because the one-liner
predicates can be inlined into the code.


# 143703 16-Mar-2005 harti

Replace Lst_ForEach by LST_FOREACH.


# 143412 11-Mar-2005 harti

Remove leading underscores from the pathname defines. All identifiers
with leading underscore followed by an uppercase letter are in the
implementation namespace.


# 142993 02-Mar-2005 harti

Use the LST_FOREACH macro instead of the Lst_ForEach function. This
saves function calls and reduces void casting.


# 142457 25-Feb-2005 harti

Change the return value of Var_Subst to return a Buffer instead
of a char *.

Patch: 7.49

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


# 141647 10-Feb-2005 harti

Initialise the status variable. W_SETTERMSIG uses its value.

Submitted by: stefanf


# 141258 04-Feb-2005 harti

Use tabs to move to the comments instead of wild mixes of tabs and spaces.

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


# 141252 04-Feb-2005 harti

Some more easy constification.

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


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


# 139064 20-Dec-2004 harti

Fix compilation for the USE_KQUEUE case.

Submitted by: Emil Mikulic <emikulic@dmr.ath.cx>


# 139062 20-Dec-2004 harti

maxJobs is declared extern in job.h so it cannot be static in job.c.

PR: bin/75210
Submitted by: Andreas Jochens; Robert Millan <rmh@debian.org>


# 138916 16-Dec-2004 harti

Instead of dynamically allocating list heads allocated them statically
now that their size is only two pointers. This eliminates a lot of calls
to Lst_Init and from there to malloc together with many calls to
Lst_Destroy (in places where the list is obviously empty). This also
reduces the chance to leave a list uninitilized so we can remove more
NULL pointer checks and probably eliminates a couple of memory leaks.


# 138564 08-Dec-2004 harti

Get rid of the sequential access feature of the lists. This was used
only in a couple of places and all of them except for one were easily
converted to use Lst_First/Lst_Succ. The one place is compatibility
mode in job.c where the it was used to advance to the next command on
each invocation of JobStart. For this case add a pointer to the node to
hold the currently executed command.


# 138561 08-Dec-2004 harti

Constify the arguments to the list compare function. This temporarily
requires to make a copy of the filename in ReadMakefile and to duplicate
two small functions in suff.c. This hopefully will go away when everything
is constified.

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


# 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


# 138510 07-Dec-2004 harti

Make needs no circular lists so remove them from the list code.


# 138334 03-Dec-2004 harti

Change the algorithm that matches the builtin shells from the name keyword
of the .SHELL target. Formerly it used to select the shell with the
longest common trailing substring, so that bash would select sh, but pocsh
would select csh. Now an exact match is required so that specifying bash
without also giving a path and the other keywords will give an error.

PR:
Submitted by:
Reviewed by: ru
Approved by:
Obtained from:
MFC after:


# 138264 01-Dec-2004 harti

Style: remove a lot of unnecessary casts, add some and spell the null
pointer constant as NULL.

Checked by: diff -r on the object files before and after


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


# 138079 25-Nov-2004 harti

Fix a very long-standing error in handling .SHELL targets: this target
uses the brk_string function to parse the line. That function uses static
storage for both the expanded string and the returned argv[] vector.
The JobParseShell function simply stored away pointers into this static
storage. On the next use of something like ${FOO:O} this storage would
get overwritten with fatal results.

This also allows us to make the shells[] array const bringing us one step
further in making make WARNS=4 ready.


# 137991 22-Nov-2004 harti

Get rid of the shell table sentinel. It isn't needed anymore because
JobMatchShell returns NULL when no shell name matches since revision 1.51.


# 137610 12-Nov-2004 ceri

Wrap a comment properly.


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


# 137605 12-Nov-2004 harti

Fix a (very) long standing bug in make (this has been there probably
from the beginning). Make used to handle all its interrupt-time stuff
directly from the signal handler, including calls to printf, accessing
global data and so on. This is of course wrong and could provoke a core
dump when interrupting make. Just set a flag in the signal handler and
do everything else from the main thread.

PR: bin/29103


# 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@


# 136841 23-Oct-2004 ru

"unset verbose" is 13 characters, not 10.


# 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)


# 132839 29-Jul-2004 harti

Implement POSIX's '+' flag for command lines. This flag causes a line
to be executed even when -n is given on the command line to make. This is
very handy for calls to submakes.

This is slightly changed from the original patch as obtained from NetBSD.
The NetBSD variant prints lines which have both '+' and '@' when -n
is specified. The commited version always obeys '@'.

Bump MAKE_VERSION so Makefiles can use this conditionally.

PR: standards/66357 (partly)
Submitted by: Mark Baushke <mdb@juniper.net>
Obtained from: NetBSD


# 128500 20-Apr-2004 green

Treat kevent(2) returning an error EINTR as the non-error it is.


# 107447 01-Dec-2002 ru

Bootstrapping aid from pre-kqueue(2) systems, e.g. 4.0-RELEASE.

Submitted by: jmallett
Approved by: re (bmah)


# 106106 28-Oct-2002 jmallett

Split var.c into var.c and var_modify.c and move all the modification funcs
to var_modify.c, for readability. constify some low hanging fruit (string
manipulation functions) and the upper layers appropriately. No longer use
the private strstr(3) implementation, while changing string code.

Tested by: lots of successful make buildworld.


# 105826 23-Oct-2002 jmallett

Remove efree(), it isn't used consistently enough to even pretend that it
might help on the systems it could possibly be used as a bandaid for. In
fact, the only thing it's useful for is instrumenting free(3) calls, and in
that capacity, it's better served as a local patch, than a public wrapper.


# 104696 09-Oct-2002 jmallett

Convert make(1) to use ANSI style function declarations. Variable
documentation already adequatedly existed in the description in most
cases. Where it did not, it was added. If no documentation existed
beforehand, then none was added. Some unused dummies for use in the
traversal functions were marked as __unused during the conversion.
Occasionally, local style fixes were applied to lines already being
modified or influenced.

Now make(1) should always build with WARNS=3.


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


# 104125 28-Sep-2002 jmallett

Fix spurious three-space indentation in a four-space indentation file.


# 104108 28-Sep-2002 jmallett

Add empty default cases where they should be, remove non-local execution stuff
in compat.c which doesn't even have preprocessor-conditional-hidden support
code, and add a debugging statement where we might end up with a nil list
somehow, but where I doubt it.

First confirmed userland kill for Flexelint.

Sponsored by: Bright Path Solutions


# 103545 18-Sep-2002 jmallett

Make the DEBUGF() macro portable by (ugh) adding a Debug() function, which
is merely printf() but to stderr. This takes care of the caveat which lead
to the use of a vararg macro -- getting everything to stderr.


# 103508 17-Sep-2002 jmallett

Move common use of if (DEBUG(FOO)) printf... to DEBUGF(FOO, ...), using
variable length arguments to a macro. Bump version as this makes DEBUG
statements *always* go to stderr rather than sometimes stdout. There are
a few stragglers, which I will take care of as soon as I can. Mostly these
relate to the need-for-death-of some of the remote job code.

Nearby stylistic nits and XXX added/fixed where appropriate.


# 103503 17-Sep-2002 jmallett

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


# 98500 20-Jun-2002 jmallett

Diff reduction for great justice against NetBSD, cast to unsigned char when
passing an argument to isspace(3).


# 98136 12-Jun-2002 jmallett

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


# 97251 24-May-2002 ru

Back out the ``run shell from $PATH'' change; this was an overkill
and is insecure.

Requested by: bde


# 97122 22-May-2002 ru

Do not run shell from /bin, run it from $PATH.
Bump MAKE_VERSION to 5200205221.


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


# 94587 13-Apr-2002 obrien

Update SCM ID method.


# 94584 13-Apr-2002 obrien

De'register.


# 94582 13-Apr-2002 obrien

Check to make sure fdopen() succeeds in make(1).

Submitted by: jmallett
Inspired by: NetBSD


# 94506 12-Apr-2002 charnier

Reorder #include. Cast arg #2 of lseek to an off_t when constant. No need to
test if failsafe memory allocation fails, it can't. perror -> warn. Use
failsafe memory allocation provided.

Use .Pa and .Ar. Uppercase (first letter) programname after dot.


# 92921 21-Mar-2002 imp

remove __P


# 80381 26-Jul-2001 sheldonh

Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. The
definitions are more readable, and it's possible that they're
more portable to pathalogical platforms.

Submitted by: David Hill <david@phobia.ms>


# 72645 18-Feb-2001 asmodai

Preceed/preceeding are not english words. Use precede and preceding.


# 69531 02-Dec-2000 will

There's also no point in #typedef'ing void/char pointers. Accordingly,
rip out ClientData/Address pointers and use standard types.

Obtained from: OpenBSD


# 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


# 68898 19-Nov-2000 kris

Unlink the temporary file immediately so it is removed on exit.

Obtained from: OpenBSD


# 64823 18-Aug-2000 ru

Remove gratuitous free() call when we use special .SHELL target.


# 64739 16-Aug-2000 green

Allow use of the ${MAKE_SHELL} variable to specify alternate shells for
make(1) to use. Setting it to "sh" and "ksh" are the only values which
work right ATM; I wouldn't expect "csh" to get you far ;)


# 62833 09-Jul-2000 wsanchez

Use __RCSID()


# 62830 08-Jul-2000 wsanchez

Initialize variable


# 60569 14-May-2000 will

Add loud debugging facility (-dl option) which allows programmers/developers
to override @-prefixed commands in Makefiles. It is especially useful for
debugging ports and/or complex Makefiles in such a manner that is basically
a last resort, but is quite effective if the output is well-handled.

I'll update the manpage after dinner. ;-)

Better patch submitted by: steve
Reviewed by: phk, steve, chuckr, obrien,
Lyndon Nerenberg <lyndon@orthanc.ab.ca>


# 56151 17-Jan-2000 kris

Create tempfiles securely.

Reviewed by: imp


# 51150 11-Sep-1999 hoek

Unduplicate IDs from comments, do $Id -> $FreeBSD$ (submitted-by: bde)


# 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


# 49938 16-Aug-1999 hoek

Merge style- and trivial- only changes from OpenBSD (dated 1999/07/29-19:55+1).

Obtained from: OpenBSD, sometimes indirected from NetBSD; myself


# 44026 14-Feb-1999 dt

Remove couple of 'extern int errno'. (They turned to something funny when
<errno.h> included).


# 41151 14-Nov-1998 dg

Added a -v (verbose) option and hid multi-job file banner generation
behind it.


# 38520 24-Aug-1998 cracauer

When exiting on SIGINT, exit with signal status


# 36621 04-Jun-1998 bde

Don't forget to pretend that `make -n -jN' makes the targets that it
says it pretends to make.

This bug was apparently harmless except for normal cases involving
.ORDER statements when it made debugging of -jN using -n very
confusing. E.g., for:

.ORDER: beforedepend .depend
depend: beforedepend .depend

where beforedepend depends on something so that it is not initially
up to date, `make [-n] -j2 depend' causes `make' to wait for itself
to make beforedepend. This works fine without -n. The job to make
beforedepend has normally been started, and beforedepend is marked
as made when the job completes. However, with -n, the pseudo-job
for making beforedepend has normally completed, and in any case
there was no chance of beforedepend being marked as made. `make'
actually exited almost immediately with status 0 instead of waiting
forever.


# 35483 28-Apr-1998 imp

Use historically correct error message in some cases, optionally.


# 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