| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: meta.c,v 1.136 2020/10/31 12:04:24 rillig Exp $ */ | | 1 | /* $NetBSD: meta.c,v 1.137 2020/11/04 13:27:00 rillig Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Implement 'meta' mode. | | 4 | * Implement 'meta' mode. |
5 | * Adapted from John Birrell's patches to FreeBSD make. | | 5 | * Adapted from John Birrell's patches to FreeBSD make. |
6 | * --sjg | | 6 | * --sjg |
7 | */ | | 7 | */ |
8 | /* | | 8 | /* |
9 | * Copyright (c) 2009-2016, Juniper Networks, Inc. | | 9 | * Copyright (c) 2009-2016, Juniper Networks, Inc. |
10 | * Portions Copyright (c) 2009, John Birrell. | | 10 | * Portions Copyright (c) 2009, John Birrell. |
11 | * | | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | | 12 | * Redistribution and use in source and binary forms, with or without |
13 | * modification, are permitted provided that the following conditions | | 13 | * modification, are permitted provided that the following conditions |
14 | * are met: | | 14 | * are met: |
| @@ -70,27 +70,26 @@ Boolean useMeta = FALSE; | | | @@ -70,27 +70,26 @@ Boolean useMeta = FALSE; |
70 | static Boolean useFilemon = FALSE; | | 70 | static Boolean useFilemon = FALSE; |
71 | static Boolean writeMeta = FALSE; | | 71 | static Boolean writeMeta = FALSE; |
72 | static Boolean metaMissing = FALSE; /* oodate if missing */ | | 72 | static Boolean metaMissing = FALSE; /* oodate if missing */ |
73 | static Boolean filemonMissing = FALSE; /* oodate if missing */ | | 73 | static Boolean filemonMissing = FALSE; /* oodate if missing */ |
74 | static Boolean metaEnv = FALSE; /* don't save env unless asked */ | | 74 | static Boolean metaEnv = FALSE; /* don't save env unless asked */ |
75 | static Boolean metaVerbose = FALSE; | | 75 | static Boolean metaVerbose = FALSE; |
76 | static Boolean metaIgnoreCMDs = FALSE; /* ignore CMDs in .meta files */ | | 76 | static Boolean metaIgnoreCMDs = FALSE; /* ignore CMDs in .meta files */ |
77 | static Boolean metaIgnorePatterns = FALSE; /* do we need to do pattern matches */ | | 77 | static Boolean metaIgnorePatterns = FALSE; /* do we need to do pattern matches */ |
78 | static Boolean metaIgnoreFilter = FALSE; /* do we have more complex filtering? */ | | 78 | static Boolean metaIgnoreFilter = FALSE; /* do we have more complex filtering? */ |
79 | static Boolean metaCurdirOk = FALSE; /* write .meta in .CURDIR Ok? */ | | 79 | static Boolean metaCurdirOk = FALSE; /* write .meta in .CURDIR Ok? */ |
80 | static Boolean metaSilent = FALSE; /* if we have a .meta be SILENT */ | | 80 | static Boolean metaSilent = FALSE; /* if we have a .meta be SILENT */ |
81 | | | 81 | |
82 | extern Boolean forceJobs; | | 82 | extern Boolean forceJobs; |
83 | extern Boolean comatMake; | | | |
84 | extern char **environ; | | 83 | extern char **environ; |
85 | | | 84 | |
86 | #define MAKE_META_PREFIX ".MAKE.META.PREFIX" | | 85 | #define MAKE_META_PREFIX ".MAKE.META.PREFIX" |
87 | | | 86 | |
88 | #ifndef N2U | | 87 | #ifndef N2U |
89 | # define N2U(n, u) (((n) + ((u) - 1)) / (u)) | | 88 | # define N2U(n, u) (((n) + ((u) - 1)) / (u)) |
90 | #endif | | 89 | #endif |
91 | #ifndef ROUNDUP | | 90 | #ifndef ROUNDUP |
92 | # define ROUNDUP(n, u) (N2U((n), (u)) * (u)) | | 91 | # define ROUNDUP(n, u) (N2U((n), (u)) * (u)) |
93 | #endif | | 92 | #endif |
94 | | | 93 | |
95 | #if !defined(HAVE_STRSEP) | | 94 | #if !defined(HAVE_STRSEP) |
96 | # define strsep(s, d) stresep((s), (d), 0) | | 95 | # define strsep(s, d) stresep((s), (d), 0) |