globals.h revision 144020
1141104Sharti/*-
2141104Sharti * Copyright (c) 1988, 1989, 1990, 1993
3141104Sharti *	The Regents of the University of California.  All rights reserved.
4141104Sharti * Copyright (c) 1989 by Berkeley Softworks
5141104Sharti * All rights reserved.
6141104Sharti *
7141104Sharti * This code is derived from software contributed to Berkeley by
8141104Sharti * Adam de Boor.
9141104Sharti *
10141104Sharti * Redistribution and use in source and binary forms, with or without
11141104Sharti * modification, are permitted provided that the following conditions
12141104Sharti * are met:
13141104Sharti * 1. Redistributions of source code must retain the above copyright
14141104Sharti *    notice, this list of conditions and the following disclaimer.
15141104Sharti * 2. Redistributions in binary form must reproduce the above copyright
16141104Sharti *    notice, this list of conditions and the following disclaimer in the
17141104Sharti *    documentation and/or other materials provided with the distribution.
18141104Sharti * 3. All advertising materials mentioning features or use of this software
19141104Sharti *    must display the following acknowledgement:
20141104Sharti *	This product includes software developed by the University of
21141104Sharti *	California, Berkeley and its contributors.
22141104Sharti * 4. Neither the name of the University nor the names of its contributors
23141104Sharti *    may be used to endorse or promote products derived from this software
24141104Sharti *    without specific prior written permission.
25141104Sharti *
26141104Sharti * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27141104Sharti * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28141104Sharti * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29141104Sharti * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30141104Sharti * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31141104Sharti * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32141104Sharti * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33141104Sharti * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34141104Sharti * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35141104Sharti * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36141104Sharti * SUCH DAMAGE.
37141104Sharti *
38141104Sharti * $FreeBSD: head/usr.bin/make/globals.h 144020 2005-03-23 12:56:15Z harti $
39141104Sharti */
40141104Sharti
41141104Sharti#ifndef globals_h_1c1edb96
42141104Sharti#define	globals_h_1c1edb96
43141104Sharti
44141104Sharti/*
45141104Sharti * Global Variables
46141104Sharti */
47141104Sharti
48141104Sharti#include <time.h>
49141104Sharti
50141104Sharti#include "lst.h"
51141104Sharti#include "sprite.h"
52141104Sharti
53141104Shartistruct GNode;
54141104Shartistruct IFile;
55144020Shartistruct Path;
56141104Sharti
57141104Sharti/*
58141104Sharti * The list of target names specified on the command line.
59141104Sharti * Used to resolve #if make(...) statements
60141104Sharti */
61141104Shartiextern Lst create;
62141104Sharti
63141104Sharti/* The list of directories to search when looking for targets */
64144020Shartiextern struct Path dirSearchPath;
65141104Sharti
66141104Shartiextern struct IFile curFile;	/* current makefile */
67141104Sharti
68141104Sharti/* The list of directories to search when looking for includes */
69144020Shartiextern struct Path parseIncPath;
70141104Sharti
71144020Sharti/* The system include path. */
72144020Shartiextern struct Path sysIncPath;
73144020Sharti
74141104Shartiextern Boolean	jobsRunning;	/* True if jobs are running */
75141104Shartiextern Boolean	compatMake;	/* True if we are make compatible */
76141104Shartiextern Boolean	ignoreErrors;	/* True if should ignore all errors */
77141104Shartiextern Boolean	beSilent;	/* True if should print no commands */
78141104Shartiextern Boolean	beVerbose;	/* True if should print extra cruft */
79141104Shartiextern Boolean	noExecute;	/* True if should execute nothing */
80141104Shartiextern Boolean	allPrecious;	/* True if every target is precious */
81141104Sharti
82141104Sharti/* True if should continue on unaffected portions of the graph
83141104Sharti * when have an error in one portion */
84141104Shartiextern Boolean	keepgoing;
85141104Sharti
86141104Sharti/* TRUE if targets should just be 'touched'if out of date. Set by the -t flag */
87141104Shartiextern Boolean	touchFlag;
88141104Sharti
89141104Sharti/* TRUE if should capture the output of subshells by means of pipes.
90141104Sharti * Otherwise it is routed to temporary files from which it is retrieved
91141104Sharti * when the shell exits */
92141104Shartiextern Boolean	usePipes;
93141104Sharti
94141104Sharti/* TRUE if we aren't supposed to really make anything, just see if the
95141104Sharti * targets are out-of-date */
96141104Shartiextern Boolean	queryFlag;
97141104Sharti
98141104Sharti/* TRUE if environment should be searched for all variables before
99141104Sharti * the global context */
100141104Shartiextern Boolean	checkEnvFirst;
101141104Sharti
102141104Sharti/* List of specific variables for which the environment should be
103141104Sharti * searched before the global context */
104141104Shartiextern Lst envFirstVars;
105141104Sharti
106141104Shartiextern struct GNode	*DEFAULT;	/* .DEFAULT rule */
107141104Sharti
108141104Sharti/* Variables defined in a global context, e.g in the Makefile itself */
109141104Shartiextern struct GNode	*VAR_GLOBAL;
110141104Sharti
111141104Sharti/* Variables defined on the command line */
112141104Shartiextern struct GNode	*VAR_CMD;
113141104Sharti
114141104Sharti/* Value returned by Var_Parse when an error is encountered.  It actually
115141104Sharti * points to an empty string, so naive callers needn't worry about it. */
116141104Shartiextern char	var_Error[];
117141104Sharti
118141104Sharti/* The time at the start of this whole process */
119141104Shartiextern time_t	now;
120141104Sharti
121141104Shartiextern Boolean	oldVars;	/* Do old-style variable substitution */
122141104Sharti
123141104Shartiextern int debug;
124141104Sharti
125141104Sharti#endif /* globals_h_1c1edb96 */
126