Module Name: othersrc
Committed By: dholland
Date: Sun Mar 24 00:03:14 UTC 2013
Modified Files:
othersrc/usr.bin/dholland-make2: main.c make.1 meta.c meta.h
Log Message:
Merge -r1.210 of main.c, -r1.212 of make.1, -r1.27 of meta.c, and
-r1.3 of meta.h from HEAD (committed by sjg):
If built with filemon support, set .MAKE.PATH_FILEMON to _PATH_FILEMON
so that makefiles can test for it.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 othersrc/usr.bin/dholland-make2/main.c
cvs rdiff -u -r1.2 -r1.3 othersrc/usr.bin/dholland-make2/make.1
cvs rdiff -u -r1.3 -r1.4 othersrc/usr.bin/dholland-make2/meta.c
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/usr.bin/dholland-make2/meta.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: othersrc/usr.bin/dholland-make2/main.c
diff -u othersrc/usr.bin/dholland-make2/main.c:1.11 othersrc/usr.bin/dholland-make2/main.c:1.12
--- othersrc/usr.bin/dholland-make2/main.c:1.11 Sat Mar 23 23:29:04 2013
+++ othersrc/usr.bin/dholland-make2/main.c Sun Mar 24 00:03:14 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.11 2013/03/23 23:29:04 dholland Exp $ */
+/* $NetBSD: main.c,v 1.12 2013/03/24 00:03:14 dholland Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -128,7 +128,7 @@
MAKE_COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\
The Regents of the University of California. All rights reserved.");
-MAKE_RCSID("$NetBSD: main.c,v 1.11 2013/03/23 23:29:04 dholland Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.12 2013/03/24 00:03:14 dholland Exp $");
#ifndef DEFMAXLOCAL
@@ -717,7 +717,7 @@ MakeMode(const char *mode)
}
#if USE_META
if (strstr(mode, "meta"))
- meta_init(mode);
+ meta_mode_init(mode);
#endif
}
if (mp)
@@ -929,6 +929,9 @@ main(int argc, char **argv)
}
Job_SetPrefix();
+#ifdef USE_META
+ meta_init();
+#endif
/*
* First snag any flags out of the MAKE environment variable.
* (Note this is *not* MAKEFLAGS since /bin/make uses that and it's
Index: othersrc/usr.bin/dholland-make2/make.1
diff -u othersrc/usr.bin/dholland-make2/make.1:1.2 othersrc/usr.bin/dholland-make2/make.1:1.3
--- othersrc/usr.bin/dholland-make2/make.1:1.2 Sat Mar 23 23:50:46 2013
+++ othersrc/usr.bin/dholland-make2/make.1 Sun Mar 24 00:03:14 2013
@@ -1,4 +1,4 @@
-.\" $NetBSD: make.1,v 1.2 2013/03/23 23:50:46 dholland Exp $
+.\" $NetBSD: make.1,v 1.3 2013/03/24 00:03:14 dholland Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" from: @(#)make.1 8.4 (Berkeley) 3/19/94
.\"
-.Dd March 5, 2013
+.Dd March 22, 2013
.Dt MAKE 1
.Os
.Sh NAME
@@ -874,6 +874,13 @@ by appending their names to
is re-exported whenever
.Ql Va .MAKEOVERRIDES
is modified.
+.It Va .MAKE.PATH_FILEMON
+If
+.Nm
+was built with
+.Xr filemon 4
+support, this is set to the path of the device node.
+This allows makefiles to test for this support.
.It Va .MAKE.PID
The process-id of
.Nm .
Index: othersrc/usr.bin/dholland-make2/meta.c
diff -u othersrc/usr.bin/dholland-make2/meta.c:1.3 othersrc/usr.bin/dholland-make2/meta.c:1.4
--- othersrc/usr.bin/dholland-make2/meta.c:1.3 Sat Mar 23 22:00:51 2013
+++ othersrc/usr.bin/dholland-make2/meta.c Sun Mar 24 00:03:14 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: meta.c,v 1.3 2013/03/23 22:00:51 dholland Exp $ */
+/* $NetBSD: meta.c,v 1.4 2013/03/24 00:03:14 dholland Exp $ */
/*
* Implement 'meta' mode.
@@ -54,7 +54,7 @@
# define USE_FILEMON
#endif
-MAKE_RCSID("$NetBSD: meta.c,v 1.3 2013/03/23 22:00:51 dholland Exp $");
+MAKE_RCSID("$NetBSD: meta.c,v 1.4 2013/03/24 00:03:14 dholland Exp $");
static BuildMon Mybm; /* for compat */
static struct stringarray metaBailiwick; /* our scope of control */
@@ -544,8 +544,24 @@ boolValue(char *s)
return TRUE;
}
+/*
+ * Initialization we need before reading makefiles.
+ */
+void
+meta_init(void)
+{
+#ifdef USE_FILEMON
+ /* this allows makefiles to test if we have filemon support */
+ Var_Set(".MAKE.PATH_FILEMON", _PATH_FILEMON, VAR_GLOBAL, 0);
+#endif
+}
+
+
+/*
+ * Initialization we need after reading makefiles.
+ */
void
-meta_init(const char *make_mode)
+meta_mode_init(const char *make_mode)
{
static int once = 0;
char *cp;
Index: othersrc/usr.bin/dholland-make2/meta.h
diff -u othersrc/usr.bin/dholland-make2/meta.h:1.1.1.1 othersrc/usr.bin/dholland-make2/meta.h:1.2
--- othersrc/usr.bin/dholland-make2/meta.h:1.1.1.1 Mon Feb 25 01:33:04 2013
+++ othersrc/usr.bin/dholland-make2/meta.h Sun Mar 24 00:03:14 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: meta.h,v 1.1.1.1 2013/02/25 01:33:04 dholland Exp $ */
+/* $NetBSD: meta.h,v 1.2 2013/03/24 00:03:14 dholland Exp $ */
/*
* Things needed for 'meta' mode.
@@ -41,7 +41,8 @@ typedef struct BuildMon {
extern Boolean useMeta;
struct Job; /* not defined yet */
-void meta_init(const char *);
+void meta_init(void);
+void meta_mode_init(const char *);
void meta_job_start(struct Job *, GNode *);
void meta_job_child(struct Job *);
void meta_job_error(struct Job *, GNode *, int, int);