| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
-pedantic kind of requires -std=c99 here to avoid LL warnings)
okay miod@, millert@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
else, in some cases by adding extra temporary variables.
IMO, it's much better practice to do
void *a;
int *p = a;
*p = 42;
rather than
void *a;
*(int *)a = 42;
okay miod@... to be revisited for some possible const additions later.
|
|
|
|
|
|
| |
cast to unsigned chars.
okay deraadt@
|
|
|
|
| |
okay beck@
|
|
|
|
|
|
|
|
|
| |
this was yet another weirdness in our make that isn't shared by
other makes, and that isn't part of any standard.
This means end-of-line spaces in variables ARE significant (spaces
around the equal sign still aren't).
okay sthen@, "sounds fine" deraadt@
|
|
|
|
|
|
|
|
|
|
| |
- nodes for .POSIX and .SCCS_GET (which don't do anything)
- zap remaining suffix crud.
new scaffolding:
- groupling list and HELDBACK state to avoid races in engine.
- parser recognizes lists of targets that shoul be grouped together
- OP_DOUBLE to mark nodes that have multiple lists of commands
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- put back some job control, turns out it's necessary when we don't run a
shell.
- zap old #ifdef CLEANUP code... probably doesn't even compile.
- kill most of the OP_LIB code. Just keep a wee little bit for compatibility
(deprecated .LIBS and .INCLUDES, warns for weird dependencies instead of
erroring out).
- much improved debugging and -p output: sort variables, targets, rules,
output stuff in a nicer format mimicing input.
- better error message when no command is found, explain where the target comes from.
- sort final error list by file.
- show system files in errors as <bsd.prog.mk>
- reincorporate random delay, that was dropped
- optimize siginfo output by not regenerating the whole string each time.
- finish zapping old LocationInfo field that's no longer used.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of forking a "job" per target, and having that job further fork
separate commands, have make maintain a list of jobs, indexed by pid
of currently running commands, and handle process termination
continuation-style. This has lots of benefits:
- make is responsible for most printing, so we no longer need pipes nor
job control: make -j jobs see the tty.
- no more special-casing for jobs that don't really execute anything.
- unify code for make -jn and make -B, including signal handlers and
job waiting. So make -n, make -q, +cmd now run commands in the same
way in all cases.
- unified more accurate error-reporting, as make knows precisely which
command failed. Commands are tagged with their lines, and we display failing
commands in silent mode.
- fine-grained "expensive" command handling (recursion limiter). Do it
per-command instead of per-target.
Moreover, signal response is now simpler, as we just block the signals
in a small critical sections, test for events, and sigpause (thanks a lot
to guenther@ and millert@), so running make is now almost always paused
without any busy-waiting.
Thanks to everyone who tested and gave input.
|
| |
|
|
|
|
|
|
| |
be slightly more verbose and really explain what's going on.
okay millert@
|
|
|
|
|
|
| |
Sometimes they mess up, so add .CHEAP/.EXPENSIVE to explicitly tell make
'hey this is not THAT bad' or 'worse than you think'.
agreed by guenther@, millert@ (and some tweaks)
|
|
|
|
|
|
|
|
| |
recognize that and create a struct Location_ for it.
mostly from Jonathan Calmels, a few nits from me.
okay otto@
|
|
|
|
| |
okay miod@
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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).
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Store special targets in target hash, and use them for the parsing.
Use OP_DUMMY flag to mark targets that don't really exist yet, such
as interrupt and default nodes.
Also, .PATHxxx is special in suffixes.
Small tweaks to compat.c, so that run_commands does more stuff after
the fork() (and thus no need to free things).
Remove distinction between local and global jobs.
|
|
|
|
|
|
| |
on.
Start getting rid of globals by passing explicit parameters
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
two modules that do different things.
|
|
|
|
| |
probably not used that often.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we don't really know how to change Var_Subst and dependent functions,
we cheat, and copy the string to a buffer instead.
Clean-up the parser a bit: reorganize the include files lookup function:
introduce a resolve_include_filename function that figures out the full name
of the file, introduce a handle_include_file that does all the include file
handling, and rename the functions into handle_xxx_include, so that we
can remove most comments.
Rename ParseIsCond into handle_bsd_command, cut most of its code into
constituent functions.
Semantic changes:
- follow the rules that, if an optional construct does not parse correctly,
then it's not a real extension, and give the normal parser a chance to figure
it out. If the syntax checks out, semantic errors ARE real errors.
- allow variables to not be defined in include file names, no reason not to.
okay miod@
|
|
|
|
|
|
|
|
| |
VAR_GLOBAL context, so make it the common case: rename the basic functions
to Var_Set_with_ctxt/Var_Append_with_ctxt, define Var_Set and Var_Append
as macros that specify VAR_GLOBAL, and use these.
okay miod@
|
|
|
|
| |
okay miod@
|
|
|
|
|
|
|
|
|
|
| |
and keeping track of a length, we just advance the char *, and ditch
the length. We can still get the length at the end of the top-level
functions to satisfy existing interfaces.
Much simpler code, less error-prone.
Okay millert@
|
|
|
|
|
|
|
|
|
| |
get_expanded_value.
Extend the code a bit to be much more thorough in case of a recursive
expansion: shows exactly the cycle of variable names involved.
okay millert@
|
|
|
|
|
|
|
|
| |
length, simplifies code.
(warns a bit, symptom of some further issues to fix).
okay millert@
|
|
|
|
|
|
|
|
|
|
|
|
| |
- rename a few functions in var.c to names that make more sense.
- introduce Var_Deletei because it makes more sense.
- rewrite .for loops to use a local LoopVar construct to avoid looking up more
stuff.
- reformat var.c to near K&R
- rewrite most comments in var.c
shown to a few people. millert@ gave me his okay since it passes through
ports correctly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and matthieu@
This all revolves around putting ALL global variables into one single big
hash, and using flags. This removes some impossible to understand stuff,
like old varfind, and allows for some nice stuff.
- each time we reference a global variable, we create it, possibly as a dummy
variable.
- each time we go to the environment, we remember it, thus we no longer go
back to it.
Lists of dependant changes:
- isolate changes to oldVars and checkEnvFirst.
- remove VAR_CMD and VAR_GLOBAL contexts. The only distinction is in parsevar.
Split Parse_DoVar into Parse_DoVar and Parse_CmdlineVar
- rework var modules around obtain_global_var, observe flags in various
functions like Var_Value and Var_Seti.
- Var_Seti/Var_Appendi are almost the same code, use that internally.
- add magic to handle the very special SHELL variable.
- introduce Var_Definedi for the cases where we don't want the actual
value, to simplify tests.
- add keyword .poison, parse it and set global flags accordingly.
- do poison_checks where needed.
- document poison.
- in for loops, set variable temporarily, so that Var_SubstVar will also
substitute it in varmodifiers expressions.
|
|
|
|
| |
ok deraadt millert
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
should look in the current directory.
* refactor include files treatment to have a separate function to look
for an include.
* use both pieces to make sure system includes do not get looked up
in the current directory unless everything else fails.
This is != from the netbsd solution to the same problem, which stuffs
`magic' entries into filepaths to say whether dot should be looked at
first or last.
feature requested by matthieu@.
okay matthieu@
|
|
|
|
|
|
| |
more explicit/more consistent names.
okay otto@
|
|
|
|
| |
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the conditional recognition algorithm:
scan for a sequence of alphabetic characters, hash it, and compare it against
a small table (using ohash functions).
This makes Cond_Eval entry more logical, and allows for some shortcuts in
recognizing .include, .for, .undef.
This also means that conditionals must have an intervening blank between
the keyword and the actual test, e.g.,
.ifA
will no longer work.
(but no-one actually uses this, and it's highly obfuscated)
Okay miod@.
|
|
|
|
| |
initialize create in main.c.
|
| |
|
|
|
|
|
|
|
| |
pointers is simpler than calling a function.
Recognize purely static lst headers, which don't really need any
initialization.
ok miod@
|
|
|
|
|
| |
5% speed increase on a make build.
ok miod@
|