Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make meta_oodate even when missing-meta is true, we ...
details: https://anonhg.NetBSD.org/src/rev/21802f91c2c8
branches: trunk
changeset: 345674:21802f91c2c8
user: sjg <sjg%NetBSD.org@localhost>
date: Sat Jun 04 22:17:14 2016 +0000
description:
meta_oodate even when missing-meta is true, we do not make a target in
.CURDIR out of date just because of a missing meta file.
Also we can only be missing filemon data if we had a meta file.
diffstat:
usr.bin/make/meta.c | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
diffs (45 lines):
diff -r 2a6089b80eb8 -r 21802f91c2c8 usr.bin/make/meta.c
--- a/usr.bin/make/meta.c Sat Jun 04 21:26:26 2016 +0000
+++ b/usr.bin/make/meta.c Sat Jun 04 22:17:14 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: meta.c,v 1.59 2016/06/03 01:21:59 sjg Exp $ */
+/* $NetBSD: meta.c,v 1.60 2016/06/04 22:17:14 sjg Exp $ */
/*
* Implement 'meta' mode.
@@ -1451,18 +1451,27 @@
fname, (char *)Lst_Datum(Lst_First(missingFiles)));
oodate = TRUE;
}
- } else {
- if (writeMeta && metaMissing) {
+ if (!oodate && !have_filemon && filemonMissing) {
if (DEBUG(META))
- fprintf(debug_file, "%s: required but missing\n", fname);
+ fprintf(debug_file, "%s: missing filemon data\n", fname);
oodate = TRUE;
}
- }
+ } else {
+ if (writeMeta && metaMissing) {
+ cp = NULL;
- if (!oodate && !have_filemon && filemonMissing) {
- if (DEBUG(META))
- fprintf(debug_file, "%s: missing filemon data\n", fname);
- oodate = TRUE;
+ /* if target is in .CURDIR we do not need a meta file */
+ if (gn->path && (cp = strrchr(gn->path, '/')) && cp > gn->path) {
+ if (strncmp(curdir, gn->path, (cp - gn->path)) != 0) {
+ cp = NULL; /* not in .CURDIR */
+ }
+ }
+ if (!cp) {
+ if (DEBUG(META))
+ fprintf(debug_file, "%s: required but missing\n", fname);
+ oodate = TRUE;
+ }
+ }
}
Lst_Destroy(missingFiles, (FreeProc *)free);
Home |
Main Index |
Thread Index |
Old Index