If built with filemon support, set .MAKE.PATH_FILEMON to _PATH_FILEMON
so that makefiles can test for it.
This commit is contained in:
parent
a577c98aa7
commit
03ce90ebea
@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\
|
||||
#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 @@ MakeMode(const char *mode)
|
||||
}
|
||||
#if USE_META
|
||||
if (strstr(mode, "meta"))
|
||||
meta_init(mode);
|
||||
meta_mode_init(mode);
|
||||
#endif
|
||||
}
|
||||
if (mp)
|
||||
@ -951,6 +951,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
|
||||
|
@ -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 @@ 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 .
|
||||
|
@ -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 @@ boolValue(char *s)
|
||||
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;
|
||||
|
@ -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 @@ 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);
|
||||
|
Loading…
Reference in New Issue
Block a user