aboutsummaryrefslogtreecommitdiff
path: root/contrib/bmake/meta.c
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2013-08-02 06:25:28 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2013-08-02 06:25:28 +0000
commit51ee2c1cc61f98298ca7996a3b6ae3a0d6953aa0 (patch)
tree8ceaf694b47a0d2b1022393bf58a564bda1b20a2 /contrib/bmake/meta.c
parentba41ec4848c8ad344b1a0de2f247208b06266524 (diff)
parente0f69e1d23f496f590728b9bb0cf0778e4df1210 (diff)
downloadsrc-51ee2c1cc61f98298ca7996a3b6ae3a0d6953aa0.tar.gz
src-51ee2c1cc61f98298ca7996a3b6ae3a0d6953aa0.zip
Merge bmake-20130730
Main feature of interest is .MAKE.JOB.PREFIX= to suppress --- job --- tokens.
Notes
Notes: svn path=/head/; revision=253883
Diffstat (limited to 'contrib/bmake/meta.c')
-rw-r--r--contrib/bmake/meta.c41
1 files changed, 26 insertions, 15 deletions
diff --git a/contrib/bmake/meta.c b/contrib/bmake/meta.c
index 3aec19a78907..e7c7597a3af3 100644
--- a/contrib/bmake/meta.c
+++ b/contrib/bmake/meta.c
@@ -1,4 +1,4 @@
-/* $NetBSD: meta.c,v 1.30 2013/05/16 21:56:56 sjg Exp $ */
+/* $NetBSD: meta.c,v 1.32 2013/06/25 00:20:54 sjg Exp $ */
/*
* Implement 'meta' mode.
@@ -55,7 +55,12 @@
#endif
static BuildMon Mybm; /* for compat */
-static Lst metaBailiwick; /* our scope of control */
+static Lst metaBailiwick; /* our scope of control */
+static Lst metaIgnorePaths; /* paths we deliberately ignore */
+
+#ifndef MAKE_META_IGNORE_PATHS
+#define MAKE_META_IGNORE_PATHS ".MAKE.META.IGNORE_PATHS"
+#endif
Boolean useMeta = FALSE;
static Boolean useFilemon = FALSE;
@@ -607,6 +612,17 @@ meta_mode_init(const char *make_mode)
if (cp) {
str2Lst_Append(metaBailiwick, cp, NULL);
}
+ /*
+ * We ignore any paths that start with ${.MAKE.META.IGNORE_PATHS}
+ */
+ metaIgnorePaths = Lst_Init(FALSE);
+ Var_Append(MAKE_META_IGNORE_PATHS,
+ "/dev /etc /proc /tmp /var/run /var/tmp ${TMPDIR}", VAR_GLOBAL);
+ cp = Var_Subst(NULL,
+ "${" MAKE_META_IGNORE_PATHS ":O:u:tA}", VAR_GLOBAL, 0);
+ if (cp) {
+ str2Lst_Append(metaIgnorePaths, cp, NULL);
+ }
}
/*
@@ -1110,20 +1126,15 @@ meta_oodate(GNode *gn, Boolean oodate)
* be part of the dependencies because
* they are _expected_ to change.
*/
- if (strncmp(p, "/tmp/", 5) == 0 ||
- (tmplen > 0 && strncmp(p, tmpdir, tmplen) == 0))
- break;
-
- if (strncmp(p, "/var/", 5) == 0)
- break;
-
- /* Ignore device files. */
- if (strncmp(p, "/dev/", 5) == 0)
- break;
-
- /* Ignore /etc/ files. */
- if (strncmp(p, "/etc/", 5) == 0)
+ if (*p == '/' &&
+ Lst_ForEach(metaIgnorePaths, prefix_match, p)) {
+#ifdef DEBUG_META_MODE
+ if (DEBUG(META))
+ fprintf(debug_file, "meta_oodate: ignoring: %s\n",
+ p);
+#endif
break;
+ }
if ((cp = strrchr(p, '/'))) {
cp++;