Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make If built with filemon support, set .MAKE.PATH_F...
details: https://anonhg.NetBSD.org/src/rev/e5d651a49bfd
branches: trunk
changeset: 785604:e5d651a49bfd
user: sjg <sjg%NetBSD.org@localhost>
date: Sat Mar 23 05:31:29 2013 +0000
description:
If built with filemon support, set .MAKE.PATH_FILEMON to _PATH_FILEMON
so that makefiles can test for it.
diffstat:
usr.bin/make/main.c | 11 +++++++----
usr.bin/make/make.1 | 11 +++++++++--
usr.bin/make/meta.c | 20 ++++++++++++++++++--
usr.bin/make/meta.h | 5 +++--
4 files changed, 37 insertions(+), 10 deletions(-)
diffs (132 lines):
diff -r 7e2a49a6f5df -r e5d651a49bfd usr.bin/make/main.c
--- a/usr.bin/make/main.c Fri Mar 22 16:36:46 2013 +0000
+++ b/usr.bin/make/main.c Sat Mar 23 05:31:29 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.209 2013/02/26 00:45:27 christos Exp $ */
+/* $NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.209 2013/02/26 00:45:27 christos Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
@@ -81,7 +81,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: main.c,v 1.209 2013/02/26 00:45:27 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $");
#endif
#endif /* not lint */
#endif
@@ -739,7 +739,7 @@
}
#if USE_META
if (strstr(mode, "meta"))
- meta_init(mode);
+ meta_mode_init(mode);
#endif
}
if (mp)
@@ -951,6 +951,9 @@
}
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
diff -r 7e2a49a6f5df -r e5d651a49bfd usr.bin/make/make.1
--- a/usr.bin/make/make.1 Fri Mar 22 16:36:46 2013 +0000
+++ b/usr.bin/make/make.1 Sat Mar 23 05:31:29 2013 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: make.1,v 1.211 2013/03/05 22:01:44 christos Exp $
+.\" $NetBSD: make.1,v 1.212 2013/03/23 05:31:29 sjg 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 @@
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 .
diff -r 7e2a49a6f5df -r e5d651a49bfd usr.bin/make/meta.c
--- a/usr.bin/make/meta.c Fri Mar 22 16:36:46 2013 +0000
+++ b/usr.bin/make/meta.c Sat Mar 23 05:31:29 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: meta.c,v 1.26 2013/01/19 04:23:37 sjg Exp $ */
+/* $NetBSD: meta.c,v 1.27 2013/03/23 05:31:29 sjg Exp $ */
/*
* Implement 'meta' mode.
@@ -539,8 +539,24 @@
return TRUE;
}
+/*
+ * Initialization we need before reading makefiles.
+ */
void
-meta_init(const char *make_mode)
+meta_init()
+{
+#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_mode_init(const char *make_mode)
{
static int once = 0;
char *cp;
diff -r 7e2a49a6f5df -r e5d651a49bfd usr.bin/make/meta.h
--- a/usr.bin/make/meta.h Fri Mar 22 16:36:46 2013 +0000
+++ b/usr.bin/make/meta.h Sat Mar 23 05:31:29 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: meta.h,v 1.2 2011/03/30 22:03:49 sjg Exp $ */
+/* $NetBSD: meta.h,v 1.3 2013/03/23 05:31:29 sjg Exp $ */
/*
* Things needed for 'meta' mode.
@@ -41,7 +41,8 @@
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);
Home |
Main Index |
Thread Index |
Old Index