summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2008-06-27 14:26:43 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2008-06-27 14:26:43 +0000
commit1a2e6aa9ac682170b4a74c010d0c51a839521b88 (patch)
treea1288b6534ae59daa61bc99c1caa6a925bf67dc4
parent6bf209faa4fa9114f3e6bf492c5f40efcf230362 (diff)
Notes
-rw-r--r--usr.bin/make/globals.h1
-rw-r--r--usr.bin/make/hash_tables.c52
-rw-r--r--usr.bin/make/main.c3
-rw-r--r--usr.bin/make/make.125
-rw-r--r--usr.bin/make/parse.c5
5 files changed, 57 insertions, 29 deletions
diff --git a/usr.bin/make/globals.h b/usr.bin/make/globals.h
index 465c4f3d60982..04c7da9bb2d38 100644
--- a/usr.bin/make/globals.h
+++ b/usr.bin/make/globals.h
@@ -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 */
diff --git a/usr.bin/make/hash_tables.c b/usr.bin/make/hash_tables.c
index 27fdf2dd7678f..27909d0e2f8b2 100644
--- a/usr.bin/make/hash_tables.c
+++ b/usr.bin/make/hash_tables.c
@@ -1,7 +1,7 @@
/*
* DO NOT EDIT
* $FreeBSD$
- * auto-generated from FreeBSD: src/usr.bin/make/parse.c,v 1.108 2005/05/24 15:30:03 harti Exp
+ * auto-generated from FreeBSD: src/usr.bin/make/parse.c,v 1.114 2008/03/12 14:50:58 obrien Exp
* DO NOT EDIT
*/
#include <sys/types.h>
@@ -66,12 +66,12 @@ directive_hash(const u_char *key, size_t len)
}
/*
* d=2
- * n=72
- * m=34
+ * n=74
+ * m=35
* c=2.09
* maxlen=1
* minklen=4
- * maxklen=12
+ * maxklen=13
* minchar=46
* maxchar=95
* loop=0
@@ -80,30 +80,30 @@ directive_hash(const u_char *key, size_t len)
*/
static const signed char keyword_g[] = {
- 8, 15, -1, 25, 22, 20, -1, 33, 16, -1,
- 21, 31, 0, 0, 0, 29, 30, 8, -1, 0,
- -1, 21, -1, 0, -1, -1, -1, -1, -1, 4,
- -1, -1, 25, 28, -1, 27, 11, 23, 0, 0,
- 24, -1, -1, 0, 3, 0, -1, 24, 0, 0,
- -1, 28, 12, -1, 20, 13, -1, 5, -1, 1,
- 0, 0, -1, 0, 10, 19, 13, 9, -1, 2,
- -1, -1,
+ 12, 18, 7, 25, 30, 5, -1, -1, -1, 7,
+ -1, 0, 33, 0, 4, -1, -1, 13, 29, 0,
+ -1, 28, -1, 28, -1, 0, -1, 27, 4, 34,
+ -1, -1, -1, 30, 13, 10, -1, -1, 0, 10,
+ 24, -1, -1, -1, 0, 6, 0, 0, -1, 23,
+ -1, -1, -1, 0, -1, 23, -1, -1, 19, 4,
+ -1, 31, 12, 16, -1, 20, 22, 9, 0, -1,
+ -1, 9, 4, 0,
};
static const u_char keyword_T0[] = {
- 32, 10, 54, 61, 2, 35, 62, 50, 52, 53,
- 70, 7, 62, 18, 24, 30, 31, 66, 10, 61,
- 52, 71, 56, 56, 28, 6, 33, 67, 12, 41,
- 39, 45, 51, 21, 34, 53, 56, 40, 47, 52,
- 21, 61, 60, 12, 7, 28, 42, 38, 38, 52,
+ 34, 28, 50, 61, 14, 57, 48, 60, 20, 67,
+ 60, 63, 0, 24, 28, 2, 49, 64, 18, 23,
+ 36, 33, 40, 14, 38, 42, 71, 49, 2, 53,
+ 53, 37, 7, 29, 24, 21, 12, 50, 59, 10,
+ 43, 23, 0, 44, 47, 6, 46, 22, 48, 64,
};
static const u_char keyword_T1[] = {
- 0, 39, 65, 48, 13, 62, 46, 42, 5, 50,
- 69, 69, 69, 43, 2, 46, 12, 6, 11, 9,
- 24, 10, 25, 64, 68, 13, 57, 55, 17, 33,
- 1, 18, 0, 67, 10, 14, 57, 56, 0, 6,
- 50, 13, 3, 47, 56, 22, 37, 13, 28, 48,
+ 18, 67, 39, 60, 7, 70, 2, 26, 31, 18,
+ 73, 47, 61, 17, 38, 50, 22, 52, 13, 55,
+ 56, 32, 63, 4, 64, 55, 49, 21, 47, 67,
+ 33, 66, 60, 73, 30, 68, 69, 32, 72, 4,
+ 28, 49, 51, 15, 66, 68, 43, 67, 46, 56,
};
@@ -113,7 +113,7 @@ keyword_hash(const u_char *key, size_t len)
unsigned f0, f1;
const u_char *kp = key;
- if (len < 4 || len > 12)
+ if (len < 4 || len > 13)
return -1;
for (f0=f1=0; *kp; ++kp) {
@@ -123,8 +123,8 @@ keyword_hash(const u_char *key, size_t len)
f1 += keyword_T1[-46 + *kp];
}
- f0 %= 72;
- f1 %= 72;
+ f0 %= 74;
+ f1 %= 74;
- return (keyword_g[f0] + keyword_g[f1]) % 34;
+ return (keyword_g[f0] + keyword_g[f1]) % 35;
}
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c
index b683f8547cf69..18d2372aac3d2 100644
--- a/usr.bin/make/main.c
+++ b/usr.bin/make/main.c
@@ -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 */
@@ -1251,7 +1252,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.
*/
diff --git a/usr.bin/make/make.1 b/usr.bin/make/make.1
index b226f83e7e264..1d84d2ac5e1e5 100644
--- a/usr.bin/make/make.1
+++ b/usr.bin/make/make.1
@@ -32,7 +32,7 @@
.\" @(#)make.1 8.8 (Berkeley) 6/13/95
.\" $FreeBSD$
.\"
-.Dd April 8, 2006
+.Dd March 24, 2008
.Dt MAKE 1
.Os
.Sh NAME
@@ -1234,6 +1234,12 @@ 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 Remaking Makefiles
+functionality, as explained in the
+.Sx REMAKING MAKEFILES
+section below.
.It Ic .MAKEFLAGS
This target provides a way to specify flags for
.Nm
@@ -1303,6 +1309,12 @@ Apply the
attribute to any specified sources.
Targets with this attribute are always
considered to be out of date.
+.It Ic .POSIX
+Adjust
+.Nm Ap s
+behavior to match the applicable
+.Tn POSIX
+specifications.
.It Ic .PRECIOUS
Apply the
.Ic .PRECIOUS
@@ -1466,6 +1478,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 Remaking Makefiles
+feature.
After reading Makefile and all the files that are included using
.Ic .include
or
@@ -1555,7 +1574,9 @@ used
.Ev MAKE
instead of
.Ev MAKEFLAGS .
-This was removed for POSIX compatibility.
+This was removed for
+.Tn POSIX
+compatibility.
The internal variable
.Va MAKE
is set to the same value as
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 14ffe180cad4d..3e8cb93be2f8e 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -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);