diff options
author | sjg <sjg@FreeBSD.org> | 2013-08-02 06:25:28 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2013-08-02 06:25:28 +0000 |
commit | ff765cb371f120bb1d6e648a2418a7c9e3f223b2 (patch) | |
tree | 8ceaf694b47a0d2b1022393bf58a564bda1b20a2 /contrib/bmake/meta.c | |
parent | 1c55a6beb9a550795753418366eee2961aae82db (diff) | |
download | FreeBSD-src-ff765cb371f120bb1d6e648a2418a7c9e3f223b2.zip FreeBSD-src-ff765cb371f120bb1d6e648a2418a7c9e3f223b2.tar.gz |
Merge bmake-20130730
Main feature of interest is .MAKE.JOB.PREFIX=
to suppress --- job --- tokens.
Diffstat (limited to 'contrib/bmake/meta.c')
-rw-r--r-- | contrib/bmake/meta.c | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/contrib/bmake/meta.c b/contrib/bmake/meta.c index 3aec19a..e7c7597a 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++; |