In this mode, a .meta file is created for each target, capturing
the expanded commands used, any command output, and if filemon(9)
is available, a record of system calls which are of interest.
Not enabled unless USE_META=yes is set when building make.
Also, if FILEMON_H exists, meta.c will be compiled to use filemon(9).
If we encounter an error and run the .ERROR target, we may
reap a pid which jobs is waiting for. Ensure that we
cleanup so that make isn't left waiting for an already
deceased child.
realpath(3). Consider: touch Makefile; mkdir make; make. This will set $MAKE
to $PWD/make so further attempts to use ${MAKE} will try to execute the
directory. This needs $ORIGIN to be fixed properly, or alternatively one
can duplicate the logic for execvp(3) and search the path for the make
executable. Not worth it. It was working just fine before!
.error "message"
.warning "message"
based on FreeBSD implementation.
add .info while were at it.
.ERROR: a target to run on error.
We pass the failing GNode to PrintOnError so it can set
.ERROR_TARGET.
.MAKE.MAKEFILE_PREFERENCE
As a means to control make's list of prefered makefile names.
(Default: "makefile Makefile")
.MAKE.DEPENDFILE
Names the file to read dependencies from
(Default ".depend")
.MAKE.MODE
Processed after all makefiles are read.
Can put make into "compat" mode (more to come).
Fix:
compat.c: Error code should not be sent to debug_file.
Make_DoAllVar: use DONE_ALLSRC to avoid processing a node multiple times.
ReadMakefile: we can simply use doing_depend to control setting MAKEFILE.
Use .MAKE.LEVEL to track recursion.
The first instance of make will have .MAKE.LEVEL 0, which
can be handy for excluding rules which should not apply
in a sub-make.
gmake and freebsd's make have a similar mechanism, but each
uses a different variable to track it. Since we cannot be
compatible with both, we allow the makefiles to cope if they want
by handling the export of .MAKE.LEVEL+1 in Var_Set().
executable. Remove this so that different compiles can be binary
compared. rcsid's for all files are already embedded in the executable
so versions can be easily distinguished. (I didn't catch this on
previous passes because I did my builds on the same day.)
Note: there's a special rule for main.o in Makefile with a purpose I
can't actually discern -- I think it isn't needed, and I've flagged it
with a comment.
Saves having to malloc/free a fixed size structure.
Buf_Init() now takes ptr to Buffer to initialiase.
Change Buf_Destroy() to return ptr to string when not freed.
Remove large number of casts to (Byte) and (Byte *) - 'Byte' is 'char' here.
Buf_AddByte[s] guarantees that the data is 0 termininated, so never add '\0'.
Keep 'count' not 'left' and 'inPtr', code is simplier with only one update.
Fix fallou, no functional change.
is enabled but debugging output is not directed to stdout, then make
stdout line buffered.
Previously, the code to make debug output unbuffered applied only if
debugging to a file, not if debugging to stdout or stderr. Making
stdout line buffered when debugging was suggested by Steven Bellovin.
bmake_malloc and friends. Implement them via macros for the native case
and provide fallback implementations otherwise. Avoid polluting the
namespace by not defining enomem globally. Don't bother to provide
strdup and strndup, they were only used for the estrdup and estrndup
comapt code.
This addresses the presence of emalloc in system libraries on A/UX and
resulted strange issues as reported by Timothy E. Larson.