summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/job.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove old fmake. It wasn't built by default for some time. Users thatimp2015-06-161-80/+0
| | | | | | | really need it can find it in the devel/fmake port or pkg install fmake. Note: This commit is orthogonal to the question 'can we fmake buildworld'. Differential Revision: https://reviews.freebsd.org/D2840
* 1. Add the ability to tweak the token output before targets in job mode.obrien2008-12-291-0/+1
| | | | | | | | | | | | 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
* Exit with error code 2 when run with -k (continue if errors) and build failed.fjoe2008-12-181-1/+1
|
* Implement "Remaking Makefiles" feature:fjoe2007-03-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | 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
* Factor out all the .SHELL parsing related stuff into its own file andharti2005-05-241-3/+0
| | | | | | | 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)
* Before doing any parsing parse the builtin shell specifications andharti2005-05-241-0/+2
| | | | | | | | | | | | | | | | | | | | 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.
* Get rid of global variables for argument vectors produced by brk_string()harti2005-05-181-1/+1
| | | | | | | | 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
* Get rid of the ReturnStatus obscuration that was anyway used onlyharti2005-05-181-1/+1
| | | | | | | in two places. While here don't bother returning anything from Lst_Replace - nobody ever checks the return code. Suggested by: jmallet
* Move the Boolean and ReturnStatus stuff from sprite.h to util.h andharti2005-05-131-1/+1
| | | | | | get rid of sprite.h. Obtained from: DragonFlyBSD
* Make Shell_Init() static - it's only used here.harti2005-05-131-1/+0
| | | | | | | | | 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.
* Cleanup main(). Move catching SIGCHLD into job.c. Move unsetenv("ENV")harti2005-05-121-0/+2
| | | | | | | | 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)
* Compat_RunCommand is used only in job.c so make it static there.harti2005-05-121-1/+0
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.234)
* Fix the fix for bin/72510 applied in job.c:1.70. Actually there haveharti2005-05-121-2/+0
| | | | | | | | | | 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
* Make shellPath and shellName static - they're used in job.c only.harti2005-05-101-2/+0
| | | | | | | Move definition of parsing error levels from make.h into parse.h. Patches: 7.202,7.203 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Move the defines for TMPPAT and KQUEUE from the public job.h into job.charti2005-05-101-12/+0
| | | | | | | since they are used only there. Patch: 7.200 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Merge compat.c into job.c. There is a lot in common between theseharti2005-05-101-1/+5
| | | | | | | files and we are going to factor this out. Patch: 7.199 (slightly changed) Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Move Cmd_Exec() from main.c to job.c and fix its prototype. Thisharti2005-05-101-0/+3
| | | | | | | results in a warning that will go away soon. Patch: 7.198 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Remove a forward declaration that isn't needed anymore.harti2005-04-011-1/+0
|
* Both struct Job and struct Shell are only used inside job.c so there isharti2005-04-011-160/+0
| | | | | no need to have them in a header file that is included by other modules. Move them both into the c-file.
* Clean up include files and file including. Split nonints.h into piecesharti2005-02-011-102/+127
| | | | | | | | | | | | | 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>
* Typedefs of pointers to structs are evil. Make Lst and LstNode typedef ofharti2004-12-071-1/+1
| | | | | | the structs itself not of pointers to them. This will simplify constification. Checked by: diff on the object files
* Stylification: missing spaces, extra space after function names, castsharti2004-11-301-2/+0
| | | | | | | | 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)
* Constify the array of predefined shells. It turns out that we need twoharti2004-11-301-24/+27
| | | | | | | 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.
* Add code to enforce the paralleism count (-j N) for the entire treephk2004-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | 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.
* Get rid of more local/remote leftoversphk2004-11-111-1/+1
|
* Now with the remote job support removed there can be no remote jobs andharti2004-11-051-7/+1
| | | | | no jobs that need to be remigrated. Remove the flags and the associated code.
* Remove the remote stuff from make. This actually never worked in our makeharti2004-11-041-22/+0
| | | | | | | | | | | | 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@
* Expand the scope of the .SHELL specification to also coverru2004-10-231-0/+4
| | | | | | | | | | 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)
* Change the select timeout from 100ms to 2 seconds now that SIGCHILD isscottl2003-12-191-2/+2
| | | | handled.
* Remove extern declarations from functions and source files where they wouldjmallett2002-10-091-0/+2
| | | | happily fit into headers.
* Give make(1) the ability to use KQUEUE to wait for worker processesphk2002-10-041-0/+2
| | | | | | | | | 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>
* Don't declare things as extern when they will be static.jmallett2002-09-261-1/+6
| | | | Sponsored by: Rachel Hestilow <rachel@jerkcity.com>
* #define<space> -> #define<tab>jmallett2002-09-171-19/+19
|
* The error functions take constant pointers to strings for their format.jmallett2002-06-121-1/+1
|
* Prefer BSDmakefile over makefile and Makefile.obrien2002-04-131-1/+1
| | | | | Submitted by: jmallett Obtained from: OpenBSD
* Fix copyrights, and undo SCS ID damage.obrien2002-04-131-2/+3
|
* remove __Pimp2002-03-221-13/+13
|
* There's no reason to use fancy forms of NULL. Replace all instanceswill2000-12-021-1/+1
| | | | | | of NIL, NILLST, NILLGNODE, etc. with NULL. Obtained from: OpenBSD
* Create tempfiles securely.kris2000-01-171-0/+2
| | | | Reviewed by: imp
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fix a temp file race occurring only when -j is used.hoek1999-08-221-3/+3
| | | | | Noticed by: ru Obtained from: OpenBSD
* In these XXX MHz days, waiting 500ms for a process to do something isphk1997-04-211-2/+2
| | | | | | 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...
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | 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.
* O' to be bitten by CVS. Cleanup after importsteve1996-10-081-0/+1
| | | | | | of Christos' version of make(1) and add Id's. Set straight by: Bruce Evans and Peter Wemm :)
* Merge in NetBSD's changes to make(1). Changes include:steve1996-10-061-1/+1
| | | | | | | | | | | | | | | | - 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
* Remove trailing whitespace.rgrimes1995-05-301-6/+6
|
* Bring in a number of changes from NetBSD's make, fixing quite a fewjkh1995-01-231-16/+16
| | | | | | | | | | | | 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)
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+233
OpenPOWER on IntegriCloud