If the special target .MAKEFILEDEPS exists, then enable the
"remaking makefiles" feature. Otherwise, follow traditional Pmake behavior. (hash table will be regenerated and committed follow this commit)
This commit is contained in:
parent
a5625ae749
commit
ad9165a038
@ -78,6 +78,7 @@ extern Boolean beVerbose; /* True if should print extra cruft */
|
||||
extern Boolean noExecute; /* True if should execute nothing */
|
||||
extern Boolean allPrecious; /* True if every target is precious */
|
||||
extern Boolean is_posix; /* .POSIX target seen */
|
||||
extern Boolean mfAutoDeps; /* .MAKEFILEDEPS target seen */
|
||||
|
||||
/* True if should continue on unaffected portions of the graph
|
||||
* when have an error in one portion */
|
||||
|
@ -123,6 +123,7 @@ Lst create = Lst_Initializer(create);
|
||||
|
||||
Boolean allPrecious; /* .PRECIOUS given on line by itself */
|
||||
Boolean is_posix; /* .POSIX target seen */
|
||||
Boolean mfAutoDeps; /* .MAKEFILEDEPS target seen */
|
||||
Boolean beSilent; /* -s flag */
|
||||
Boolean beVerbose; /* -v flag */
|
||||
Boolean compatMake; /* -B argument */
|
||||
@ -1252,7 +1253,7 @@ main(int argc, char **argv)
|
||||
*/
|
||||
Lst targs = Lst_Initializer(targs);
|
||||
|
||||
if (!is_posix) {
|
||||
if (!is_posix && mfAutoDeps) {
|
||||
/*
|
||||
* Check if any of the makefiles are out-of-date.
|
||||
*/
|
||||
|
@ -1312,6 +1312,11 @@ explicitly, or implicitly when
|
||||
.Nm
|
||||
selects the default target, to give the user a way to refer to the default
|
||||
target on the command line.
|
||||
.It Ic .MAKEFILEDEPS
|
||||
Enable the
|
||||
.Dq Li Remaking Makefiles
|
||||
functionality.
|
||||
See below.
|
||||
.It Ic .MAKEFLAGS
|
||||
This target provides a way to specify flags for
|
||||
.Nm
|
||||
@ -1381,6 +1386,10 @@ Apply the
|
||||
attribute to any specified sources.
|
||||
Targets with this attribute are always
|
||||
considered to be out of date.
|
||||
.It Ic .POSIX
|
||||
Adjust
|
||||
.Mn 's
|
||||
behavior to match the applicable POSIX specifications.
|
||||
.It Ic .PRECIOUS
|
||||
Apply the
|
||||
.Ic .PRECIOUS
|
||||
@ -1544,6 +1553,13 @@ Several flags can be specified on a single
|
||||
target by seperating them with blanks.
|
||||
.El
|
||||
.Sh REMAKING MAKEFILES
|
||||
If the special target
|
||||
.Ic .MAKEFILEDEPS
|
||||
exists in the Makefile,
|
||||
.Nm
|
||||
enables the
|
||||
.Dq Li Remaking Makefiles
|
||||
feature.
|
||||
After reading Makefile and all the files that are included using
|
||||
.Ic .include
|
||||
or
|
||||
|
@ -168,6 +168,7 @@ typedef enum {
|
||||
ExPath, /* .PATH */
|
||||
Phony, /* .PHONY */
|
||||
Posix, /* .POSIX */
|
||||
MakefileDeps, /* .MAKEFILEDEPS */
|
||||
Precious, /* .PRECIOUS */
|
||||
ExShell, /* .SHELL */
|
||||
Silent, /* .SILENT */
|
||||
@ -213,6 +214,7 @@ static const struct keyword {
|
||||
{ ".LIBS", Libs, 0 },
|
||||
{ ".MAIN", Main, 0 },
|
||||
{ ".MAKE", Attribute, OP_MAKE },
|
||||
{ ".MAKEFILEDEPS", MakefileDeps, 0 },
|
||||
{ ".MAKEFLAGS", MFlags, 0 },
|
||||
{ ".MFLAGS", MFlags, 0 },
|
||||
{ ".NOTMAIN", Attribute, OP_NOTMAIN },
|
||||
@ -1069,6 +1071,9 @@ ParseDoDependency(char *line)
|
||||
LST_FOREACH(ln, &paths)
|
||||
Path_Clear(Lst_Datum(ln));
|
||||
break;
|
||||
case MakefileDeps:
|
||||
mfAutoDeps = TRUE;
|
||||
break;
|
||||
case Posix:
|
||||
is_posix = TRUE;
|
||||
Var_Set("%POSIX", "1003.2", VAR_GLOBAL);
|
||||
|
Loading…
Reference in New Issue
Block a user