summaryrefslogtreecommitdiff
path: root/usr.bin/make
AgeCommit message (Collapse)Author
2009-05-13fix loopvar debug prints. Issue reported by naddy@Marc Espie
2009-05-12zap double prototypeMarc Espie
2009-05-12fix obvious bug: .PHONY targets don't match files, so they're precious (weMarc Espie
don't even want to check for a matching file on the file system)
2009-05-10simple check for cvs conflicts, avoids some "duh" moments (some people likeMarc Espie
it, other don't care, it's cheap enough). Slightly tweaked patch that also guards against empty arrays (though it's unlikely to happen, I don't feel like proving the array is not empty).
2009-05-10simplify job handling a great deal: we don't care when jobs getMarc Espie
stopped/continued, as we won't try to start new jobs when other stuff is stopped. Redo signal handling so that most stuff can be done directly in the handler. This requires blocking/unblocking signals while creating new jobs, and creating a small list that only contains job's pids. Switch to pgrps for jobs, since that works. Add a clamping heuristic that avoids starting new jobs while an expensive job is running (expensive meaning "very likely to be a recursive make run"). This idea is mostly from Theo, through the implementation is mine.
2009-04-26move code around a bit, extract code from run_prepared_gnodeMarc Espie
into a run_gnode_parallel. That simplifies the control flow of that routine a bit, to allow for more tweaks in the parallel case. okay kettenis@, otto@
2009-02-10STANDARDS:Jason McIntyre
mark these utilities as being either optional (SD/FR/UP); or as being compliant only with XPG4 (XSI); strip.1 and talk.1 are tweaked purely for consistency; thanks otto for feedback
2009-02-08bump the posix reference in STANDARDS to IEEE Std 1003.1-2008, with a fewJason McIntyre
updates to follow;
2008-11-24fix a very old bug. Fix discovered in NetBSD by miod@Marc Espie
2008-11-11allocate job only when it's needed.Marc Espie
okay otto@
2008-11-10missing staticMarc Espie
2008-11-10adjust comment to reflect reality (CompatRunCommand is gone)Marc Espie
2008-11-09typo fixed (overriden -> overridden)Tobias Stoeckmann
ok espie, jmc
2008-11-04changes to get target equivalence to work better.Marc Espie
- add new file to create lists of equivalent targets (siblings) - use that for sequential mode to have much better VPATH support - separate checking commands from reporting error, for later. - zap DieHorribly accordingly - renumber existing flags - signal_running_jobs() is simpler than pass_signal_to_jobs() - new debug option -dn for name matching. Similar code to handle parallel make is still missing. thanks to Mark, Miod, Theo, Otto, Todd for tests and/or comments.
2008-09-01section headings do not need to be quoted; from Alan R. S. BuenoJason McIntyre
2008-08-01Document the MAKEFILE variable as unreliable.Alexander Bluhm
ok jmc espie
2008-03-24bye, bye recalloc. Bad interface for various reasons.Marc Espie
discussed with deraadt@ and otto@ and millert@
2008-03-03tweak previous;Jason McIntyre
2008-03-02document the two big bugs left that somewhat hinder parallel mode.Marc Espie
2008-01-29A few changes:Marc Espie
- expand commands earlier, so that we can eventually scan them to take smarter decisions. - clean up the select() mask code and rename variables to sensible things. - quite a few minor renames for readability - erecalloc - clean up wait status handling, do not try to rebuild wait status, but instead parse it early and deal with the parsed code. tested by lots of people, thanks guys!
2008-01-12better error reporting/job handling error:Marc Espie
- systematically reorder jobs based on who did output last, so that the last job to output is *first* to output again. - better reaction to errors: any job that outputs is checked for termination directly, and the Error message is printed right afterwards. - better error messages, giving more useful information in -j mode.
2008-01-12new function: lstRequeue, to be used by the job handlerMarc Espie
2008-01-10fix stupid typo in grouping, make PWD work correctly again.Marc Espie
Found out by Christian Ehrhardt.
2008-01-02fix obvious bug in .NODEFAULT handlingMarc Espie
2007-12-31if our node doesn't have a lineno/fname, inherit from `used' node.Marc Espie
This lets suffix rules finally print out where they come from...
2007-12-10zap field nothing uses.Marc Espie
2007-12-01zap trailing whitespace;Jason McIntyre
2007-12-01I was sure I had committed this already, grrrr.Marc Espie
Anyways, switch to a growable array for job to do. Allows us to randomize it. fix manpage. do not add delay if just one job to run.
2007-11-28grrrMarc Espie
2007-11-28debug scaffolding: allows the insertion of a random delay before firing upMarc Espie
jobs in parallel mode.
2007-11-28PHONY targets never correspond to real files.Marc Espie
2007-11-26keep unmade uptodate all the time, even for targets we're not making yet,Marc Espie
since we might want to make them later. okay millert@, beck@
2007-11-24more parallel make fixes.Marc Espie
Preparations to fix the engine: - new function has_been_built(gn), that tells you what's the status of a given node. Allows us to run Suff_FindDeps later, by updating the number of unmade children correctly. - take out the code that handles shell expansions in an expand_children* set of functions, called by Suff_FindDeps, among others. These must be called early in the engine to avoid creating bogus nodes. Engine fixes: - take the predecessor/successor special handling out, deal with it in separate functions. - don't count nodes. Explicitly track them all in a hash table (better way to deal with non-built issues). - don't run Suff_FindDeps at start, but just before building an actual node. This allows make to find all dependencies correctly, as in groff. Pfiou! now it works.
2007-11-18simplify, no sense to break just to do return afterwardsMarc Espie
2007-11-17simplify dynamic variable handling a great deal:Marc Espie
first remove all usage of Varq_Append by building the string directly. then replace `common' handling with specialized handling for dynamic strings (since they no longer need a buffer). Finally, identify the place where the variable value needs to be copied because it's going to be free'd or erased soon, and finally, use simple char* pointers. Shaves about 80 bytes off every gnode structure, and kills quite a few unnecessary malloc()s as well.
2007-11-17.PHONY targets should not look at files.Marc Espie
2007-11-17read only .depend if !make(depend)Marc Espie
On the basis that: - .depend is a bsd extension anyways, changing its semantics doesn't affect posix compliance. - it may allow regenerating broken .depend files without needing to remove them. approved by miod@, millert@, deraadt@.
2007-11-10UNMADE -> UNKNOWNMarc Espie
2007-11-10clearer debug codeMarc Espie
2007-11-10rename make -> must_make, made -> built_statusMarc Espie
to make them easier to find in source files.
2007-11-06bug-fix: try the empty suffix when we cannot find any transformation, notMarc Espie
when we cannot find any suffix. This allows Makefiles like: .SUFFIXES: .in .sh all: truc.sh truc.sh.in: echo "bonjour" >$@ .in: sed -e 's/a/b/' <$< >$@ to work (before that, the empty suffix would not be tried, since truc.sh matches the .sh suffix, even though there is NO transformation).
2007-11-06simplify the way we deal with implicit rules and handle $<.Marc Espie
Having an `iParents' field is actually backwards, it's ways simpler to store the pointer in the child, as an impliedsrc, and to set the variable just in time along with all the rest in DoAllVar. This is simpler, and it should allow us to call SuffFindDeps much later.
2007-11-06get make.c in a more readable state, by extracting code into separateMarc Espie
functions. Restore a big more debug: if DEBUG(JOB), print commands (unexpanded).
2007-11-04prevent gcc from complainingMarc Espie
2007-11-03fix some lint FALLTHROUGHTheo de Raadt
2007-11-03#ifdef stuff that is only used under #ifdef; ok espieTheo de Raadt
2007-11-03remove extraneous space;Jason McIntyre
2007-11-03simplify: Job_CheckCommands deals with silent and ignerr now, so there'sMarc Espie
no need to duplicate that info at the job level since we can just use the gn->type.
2007-11-03zap dead codeMarc Espie
2007-11-03token is a confusing name, rename to bannerMarc Espie