2021-04-11 16:35:56 +03:00
|
|
|
/* $NetBSD: nonints.h,v 1.213 2021/04/11 13:35:56 rillig Exp $ */
|
1995-06-14 19:18:37 +04:00
|
|
|
|
2021-01-19 23:51:46 +03:00
|
|
|
/*
|
1996-11-06 20:58:58 +03:00
|
|
|
* Copyright (c) 1988, 1989, 1990, 1993
|
|
|
|
* The Regents of the University of California. All rights reserved.
|
2003-08-07 15:13:06 +04:00
|
|
|
*
|
|
|
|
* This code is derived from software contributed to Berkeley by
|
|
|
|
* Adam de Boor.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. Neither the name of the University nor the names of its contributors
|
|
|
|
* may be used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
* from: @(#)nonints.h 8.3 (Berkeley) 3/19/94
|
|
|
|
*/
|
|
|
|
|
2021-01-19 23:51:46 +03:00
|
|
|
/*
|
1993-03-21 12:45:37 +03:00
|
|
|
* Copyright (c) 1989 by Berkeley Softworks
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This code is derived from software contributed to Berkeley by
|
|
|
|
* Adam de Boor.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
|
|
* must display the following acknowledgement:
|
|
|
|
* This product includes software developed by the University of
|
|
|
|
* California, Berkeley and its contributors.
|
|
|
|
* 4. Neither the name of the University nor the names of its contributors
|
|
|
|
* may be used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
1996-11-06 20:58:58 +03:00
|
|
|
* from: @(#)nonints.h 8.3 (Berkeley) 3/19/94
|
1993-03-21 12:45:37 +03:00
|
|
|
*/
|
|
|
|
|
1994-03-05 03:34:29 +03:00
|
|
|
/* arch.c */
|
2020-10-18 00:32:30 +03:00
|
|
|
void Arch_Init(void);
|
|
|
|
void Arch_End(void);
|
|
|
|
|
2021-04-03 14:08:40 +03:00
|
|
|
bool Arch_ParseArchive(char **, GNodeList *, GNode *);
|
2002-06-15 22:24:55 +04:00
|
|
|
void Arch_Touch(GNode *);
|
|
|
|
void Arch_TouchLib(GNode *);
|
2020-11-08 12:15:19 +03:00
|
|
|
void Arch_UpdateMTime(GNode *gn);
|
2020-11-08 12:06:22 +03:00
|
|
|
void Arch_UpdateMemberMTime(GNode *gn);
|
2020-09-22 07:05:41 +03:00
|
|
|
void Arch_FindLib(GNode *, SearchPath *);
|
2021-04-03 14:08:40 +03:00
|
|
|
bool Arch_LibOODate(GNode *);
|
|
|
|
bool Arch_IsLib(GNode *);
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1994-03-05 03:34:29 +03:00
|
|
|
/* compat.c */
|
2020-12-21 00:07:32 +03:00
|
|
|
int Compat_RunCommand(const char *, GNode *, StringListNode *);
|
2020-09-22 07:05:41 +03:00
|
|
|
void Compat_Run(GNodeList *);
|
2020-09-26 19:41:42 +03:00
|
|
|
void Compat_Make(GNode *, GNode *);
|
1994-03-05 03:34:29 +03:00
|
|
|
|
|
|
|
/* cond.c */
|
2021-04-03 14:08:40 +03:00
|
|
|
CondEvalResult Cond_EvalCondition(const char *, bool *);
|
2020-09-13 16:50:27 +03:00
|
|
|
CondEvalResult Cond_EvalLine(const char *);
|
2007-02-04 22:23:49 +03:00
|
|
|
void Cond_restore_depth(unsigned int);
|
|
|
|
unsigned int Cond_save_depth(void);
|
1994-03-05 03:34:29 +03:00
|
|
|
|
2020-11-29 01:56:01 +03:00
|
|
|
/* dir.c; see also dir.h */
|
|
|
|
|
2020-12-13 23:14:48 +03:00
|
|
|
MAKE_INLINE const char *
|
|
|
|
str_basename(const char *pathname)
|
|
|
|
{
|
|
|
|
const char *lastSlash = strrchr(pathname, '/');
|
|
|
|
return lastSlash != NULL ? lastSlash + 1 : pathname;
|
|
|
|
}
|
|
|
|
|
2020-11-29 01:56:01 +03:00
|
|
|
MAKE_INLINE SearchPath *
|
|
|
|
SearchPath_New(void)
|
2021-01-24 23:11:55 +03:00
|
|
|
{
|
|
|
|
SearchPath *path = bmake_malloc(sizeof *path);
|
|
|
|
Lst_Init(&path->dirs);
|
|
|
|
return path;
|
|
|
|
}
|
2020-11-29 01:56:01 +03:00
|
|
|
|
|
|
|
void SearchPath_Free(SearchPath *);
|
|
|
|
|
1994-03-05 03:34:29 +03:00
|
|
|
/* for.c */
|
2020-09-06 22:30:53 +03:00
|
|
|
int For_Eval(const char *);
|
2021-04-03 14:08:40 +03:00
|
|
|
bool For_Accum(const char *);
|
2004-03-06 06:57:07 +03:00
|
|
|
void For_Run(int);
|
1994-03-05 03:34:29 +03:00
|
|
|
|
2010-08-07 10:44:08 +04:00
|
|
|
/* job.c */
|
2021-04-03 14:08:40 +03:00
|
|
|
void JobReapChild(pid_t, int, bool);
|
2010-08-07 10:44:08 +04:00
|
|
|
|
1994-03-05 03:34:29 +03:00
|
|
|
/* main.c */
|
2009-01-13 21:22:34 +03:00
|
|
|
void Main_ParseArgLine(const char *);
|
2003-07-14 22:19:11 +04:00
|
|
|
char *Cmd_Exec(const char *, const char **);
|
2012-06-12 23:21:50 +04:00
|
|
|
void Error(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2);
|
|
|
|
void Fatal(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2) MAKE_ATTR_DEAD;
|
|
|
|
void Punt(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2) MAKE_ATTR_DEAD;
|
|
|
|
void DieHorribly(void) MAKE_ATTR_DEAD;
|
|
|
|
void Finish(int) MAKE_ATTR_DEAD;
|
2002-06-15 22:24:55 +04:00
|
|
|
int eunlink(const char *);
|
2020-10-18 10:46:04 +03:00
|
|
|
void execDie(const char *, const char *);
|
2010-12-10 01:30:16 +03:00
|
|
|
char *getTmpdir(void);
|
2021-04-03 14:08:40 +03:00
|
|
|
bool ParseBoolean(const char *, bool);
|
2016-06-03 04:21:59 +03:00
|
|
|
char *cached_realpath(const char *, char *);
|
1994-03-05 03:34:29 +03:00
|
|
|
|
|
|
|
/* parse.c */
|
2020-10-18 00:32:30 +03:00
|
|
|
void Parse_Init(void);
|
|
|
|
void Parse_End(void);
|
2020-10-05 22:27:47 +03:00
|
|
|
|
|
|
|
typedef enum VarAssignOp {
|
2020-12-15 23:39:15 +03:00
|
|
|
VAR_NORMAL, /* = */
|
|
|
|
VAR_SUBST, /* := */
|
|
|
|
VAR_SHELL, /* != or :sh= */
|
|
|
|
VAR_APPEND, /* += */
|
|
|
|
VAR_DEFAULT /* ?= */
|
2020-10-05 22:27:47 +03:00
|
|
|
} VarAssignOp;
|
|
|
|
|
|
|
|
typedef struct VarAssign {
|
2020-12-15 23:39:15 +03:00
|
|
|
char *varname; /* unexpanded */
|
|
|
|
VarAssignOp op;
|
|
|
|
const char *value; /* unexpanded */
|
2020-10-05 22:27:47 +03:00
|
|
|
} VarAssign;
|
|
|
|
|
2020-12-06 23:09:01 +03:00
|
|
|
typedef char *(*ReadMoreProc)(void *, size_t *);
|
2020-10-20 02:43:55 +03:00
|
|
|
|
2020-10-23 23:04:56 +03:00
|
|
|
void Parse_Error(ParseErrorLevel, const char *, ...) MAKE_ATTR_PRINTFLIKE(2, 3);
|
2021-04-03 14:08:40 +03:00
|
|
|
bool Parse_IsVar(const char *, VarAssign *out_var);
|
2021-04-04 13:13:09 +03:00
|
|
|
void Parse_Var(VarAssign *, GNode *);
|
2020-10-02 02:44:36 +03:00
|
|
|
void Parse_AddIncludeDir(const char *);
|
2006-12-16 11:59:29 +03:00
|
|
|
void Parse_File(const char *, int);
|
2020-12-06 23:09:01 +03:00
|
|
|
void Parse_SetInput(const char *, int, int, ReadMoreProc, void *);
|
2020-11-29 03:04:22 +03:00
|
|
|
void Parse_MainName(GNodeList *);
|
2020-11-01 03:24:57 +03:00
|
|
|
int Parse_GetFatals(void);
|
1994-03-05 03:34:29 +03:00
|
|
|
|
|
|
|
|
|
|
|
/* suff.c */
|
2020-10-18 00:32:30 +03:00
|
|
|
void Suff_Init(void);
|
|
|
|
void Suff_End(void);
|
|
|
|
|
2002-06-15 22:24:55 +04:00
|
|
|
void Suff_ClearSuffixes(void);
|
2021-04-03 14:08:40 +03:00
|
|
|
bool Suff_IsTransform(const char *);
|
2020-09-25 22:50:04 +03:00
|
|
|
GNode *Suff_AddTransform(const char *);
|
2020-09-12 18:21:25 +03:00
|
|
|
void Suff_EndTransform(GNode *);
|
2020-08-29 15:01:46 +03:00
|
|
|
void Suff_AddSuffix(const char *, GNode **);
|
2020-09-25 22:50:04 +03:00
|
|
|
SearchPath *Suff_GetPath(const char *);
|
2021-04-04 13:05:08 +03:00
|
|
|
void Suff_ExtendPaths(void);
|
2020-09-25 22:50:04 +03:00
|
|
|
void Suff_AddInclude(const char *);
|
2020-08-29 15:01:46 +03:00
|
|
|
void Suff_AddLib(const char *);
|
2002-06-15 22:24:55 +04:00
|
|
|
void Suff_FindDeps(GNode *);
|
2020-09-22 07:05:41 +03:00
|
|
|
SearchPath *Suff_FindPath(GNode *);
|
2020-09-25 22:50:04 +03:00
|
|
|
void Suff_SetNull(const char *);
|
2002-06-15 22:24:55 +04:00
|
|
|
void Suff_PrintAll(void);
|
1994-03-05 03:34:29 +03:00
|
|
|
|
|
|
|
/* targ.c */
|
2002-06-15 22:24:55 +04:00
|
|
|
void Targ_Init(void);
|
|
|
|
void Targ_End(void);
|
2020-10-18 00:32:30 +03:00
|
|
|
|
2020-07-20 21:12:48 +03:00
|
|
|
void Targ_Stats(void);
|
2020-09-22 07:05:41 +03:00
|
|
|
GNodeList *Targ_List(void);
|
2020-11-17 00:39:22 +03:00
|
|
|
GNode *GNode_New(const char *);
|
2020-09-26 19:00:12 +03:00
|
|
|
GNode *Targ_FindNode(const char *);
|
|
|
|
GNode *Targ_GetNode(const char *);
|
|
|
|
GNode *Targ_NewInternalNode(const char *);
|
2020-09-23 06:06:38 +03:00
|
|
|
GNode *Targ_GetEndNode(void);
|
2020-11-29 03:04:22 +03:00
|
|
|
void Targ_FindList(GNodeList *, StringList *);
|
2021-04-03 14:08:40 +03:00
|
|
|
bool Targ_Precious(const GNode *);
|
2002-06-15 22:24:55 +04:00
|
|
|
void Targ_SetMain(GNode *);
|
2020-09-12 19:13:48 +03:00
|
|
|
void Targ_PrintCmds(GNode *);
|
2020-09-12 19:38:19 +03:00
|
|
|
void Targ_PrintNode(GNode *, int);
|
2020-09-22 07:05:41 +03:00
|
|
|
void Targ_PrintNodes(GNodeList *, int);
|
2020-12-18 17:36:46 +03:00
|
|
|
const char *Targ_FmtTime(time_t);
|
2008-02-16 00:29:50 +03:00
|
|
|
void Targ_PrintType(int);
|
2002-06-15 22:24:55 +04:00
|
|
|
void Targ_PrintGraph(int);
|
|
|
|
void Targ_Propagate(void);
|
2021-02-02 20:56:31 +03:00
|
|
|
const char *GNodeMade_Name(GNodeMade);
|
1994-03-05 03:34:29 +03:00
|
|
|
|
|
|
|
/* var.c */
|
2020-10-18 00:32:30 +03:00
|
|
|
void Var_Init(void);
|
|
|
|
void Var_End(void);
|
2020-07-02 18:14:38 +03:00
|
|
|
|
2021-04-04 14:56:43 +03:00
|
|
|
typedef enum VarEvalMode {
|
2020-12-15 23:39:15 +03:00
|
|
|
|
2021-02-02 00:38:20 +03:00
|
|
|
/*
|
2021-04-04 14:56:43 +03:00
|
|
|
* Only parse the expression but don't evaluate any part of it.
|
2020-12-15 23:39:15 +03:00
|
|
|
*
|
2021-04-04 14:56:43 +03:00
|
|
|
* TODO: Document what Var_Parse and Var_Subst return in this mode.
|
|
|
|
* As of 2021-03-15, they return unspecified, inconsistent results.
|
2021-02-02 00:38:20 +03:00
|
|
|
*/
|
2021-04-04 14:56:43 +03:00
|
|
|
VARE_PARSE_ONLY,
|
|
|
|
|
|
|
|
/* Parse and evaluate the expression. */
|
|
|
|
VARE_WANTRES,
|
2020-12-15 23:39:15 +03:00
|
|
|
|
2021-02-02 00:38:20 +03:00
|
|
|
/*
|
2021-04-04 14:56:43 +03:00
|
|
|
* Parse and evaluate the expression. It is an error if a
|
|
|
|
* subexpression evaluates to undefined.
|
2021-02-02 00:38:20 +03:00
|
|
|
*/
|
2021-04-04 14:56:43 +03:00
|
|
|
VARE_UNDEFERR,
|
2020-12-15 23:39:15 +03:00
|
|
|
|
2021-02-02 00:38:20 +03:00
|
|
|
/*
|
2021-04-04 14:56:43 +03:00
|
|
|
* Parse and evaluate the expression. Keep '$$' as '$$' instead of
|
|
|
|
* reducing it to a single '$'. Subexpressions that evaluate to
|
|
|
|
* undefined expand to an empty string.
|
2020-12-15 23:39:15 +03:00
|
|
|
*
|
|
|
|
* Used in variable assignments using the ':=' operator. It allows
|
|
|
|
* multiple such assignments to be chained without accidentally
|
|
|
|
* expanding '$$file' to '$file' in the first assignment and
|
|
|
|
* interpreting it as '${f}' followed by 'ile' in the next assignment.
|
2021-02-02 00:38:20 +03:00
|
|
|
*/
|
2021-04-04 14:56:43 +03:00
|
|
|
VARE_EVAL_KEEP_DOLLAR,
|
2020-12-28 03:46:24 +03:00
|
|
|
|
|
|
|
/*
|
2021-04-04 14:56:43 +03:00
|
|
|
* Parse and evaluate the expression. Keep undefined variables as-is
|
|
|
|
* instead of expanding them to an empty string.
|
2020-12-28 03:46:24 +03:00
|
|
|
*
|
|
|
|
* Example for a ':=' assignment:
|
|
|
|
* CFLAGS = $(.INCLUDES)
|
|
|
|
* CFLAGS := -I.. $(CFLAGS)
|
|
|
|
* # If .INCLUDES (an undocumented special variable, by the
|
|
|
|
* # way) is still undefined, the updated CFLAGS becomes
|
|
|
|
* # "-I.. $(.INCLUDES)".
|
|
|
|
*/
|
2021-04-04 14:56:43 +03:00
|
|
|
VARE_EVAL_KEEP_UNDEF,
|
2021-03-15 15:15:03 +03:00
|
|
|
|
|
|
|
/*
|
2021-04-04 14:56:43 +03:00
|
|
|
* Parse and evaluate the expression. Keep '$$' as '$$' and preserve
|
|
|
|
* undefined subexpressions.
|
2021-03-15 15:15:03 +03:00
|
|
|
*/
|
2021-04-04 14:56:43 +03:00
|
|
|
VARE_KEEP_DOLLAR_UNDEF
|
|
|
|
} VarEvalMode;
|
2021-03-15 15:15:03 +03:00
|
|
|
|
2020-11-08 00:31:07 +03:00
|
|
|
typedef enum VarSetFlags {
|
2020-12-15 23:39:15 +03:00
|
|
|
VAR_SET_NONE = 0,
|
2020-11-08 00:31:07 +03:00
|
|
|
|
2020-12-15 23:39:15 +03:00
|
|
|
/* do not export */
|
|
|
|
VAR_SET_NO_EXPORT = 1 << 0,
|
2020-11-07 13:16:18 +03:00
|
|
|
|
2020-12-15 23:39:15 +03:00
|
|
|
/* Make the variable read-only. No further modification is possible,
|
|
|
|
* except for another call to Var_Set with the same flag. */
|
|
|
|
VAR_SET_READONLY = 1 << 1
|
2020-11-07 03:02:54 +03:00
|
|
|
} VarSetFlags;
|
2020-08-22 22:30:58 +03:00
|
|
|
|
2020-12-27 13:53:23 +03:00
|
|
|
/* The state of error handling returned by Var_Parse. */
|
2020-10-18 20:19:54 +03:00
|
|
|
typedef enum VarParseResult {
|
2020-09-13 21:27:39 +03:00
|
|
|
|
2020-12-15 23:39:15 +03:00
|
|
|
/* Both parsing and evaluation succeeded. */
|
2020-12-27 13:53:23 +03:00
|
|
|
VPR_OK,
|
2020-12-15 23:39:15 +03:00
|
|
|
|
2020-12-27 13:53:23 +03:00
|
|
|
/* Parsing or evaluating failed, with an error message. */
|
|
|
|
VPR_ERR,
|
2020-12-15 23:39:15 +03:00
|
|
|
|
|
|
|
/*
|
2020-12-27 13:53:23 +03:00
|
|
|
* Parsing succeeded, undefined expressions are allowed and the
|
|
|
|
* expression was still undefined after applying all modifiers.
|
|
|
|
* No error message is printed in this case.
|
|
|
|
*
|
|
|
|
* Some callers handle this case differently, so return this
|
|
|
|
* information to them, for now.
|
|
|
|
*
|
2021-03-15 15:15:03 +03:00
|
|
|
* TODO: Instead of having this special return value, rather ensure
|
2021-04-11 16:35:56 +03:00
|
|
|
* that VARE_EVAL_KEEP_UNDEF is processed properly.
|
2020-12-15 23:39:15 +03:00
|
|
|
*/
|
2020-12-27 13:53:23 +03:00
|
|
|
VPR_UNDEF
|
2020-12-15 23:39:15 +03:00
|
|
|
|
2020-09-22 09:06:18 +03:00
|
|
|
} VarParseResult;
|
2020-08-22 22:30:58 +03:00
|
|
|
|
2020-12-13 04:41:12 +03:00
|
|
|
typedef enum VarExportMode {
|
|
|
|
/* .export-env */
|
2020-12-27 08:06:17 +03:00
|
|
|
VEM_ENV,
|
2020-12-13 04:41:12 +03:00
|
|
|
/* .export: Initial export or update an already exported variable. */
|
2020-12-27 08:06:17 +03:00
|
|
|
VEM_PLAIN,
|
2020-12-13 04:41:12 +03:00
|
|
|
/* .export-literal: Do not expand the variable value. */
|
|
|
|
VEM_LITERAL
|
|
|
|
} VarExportMode;
|
|
|
|
|
2021-02-05 08:15:12 +03:00
|
|
|
void Var_Delete(GNode *, const char *);
|
|
|
|
void Var_DeleteExpand(GNode *, const char *);
|
2020-12-22 23:10:21 +03:00
|
|
|
void Var_Undef(const char *);
|
2021-02-05 08:15:12 +03:00
|
|
|
void Var_Set(GNode *, const char *, const char *);
|
|
|
|
void Var_SetExpand(GNode *, const char *, const char *);
|
|
|
|
void Var_SetWithFlags(GNode *, const char *, const char *, VarSetFlags);
|
|
|
|
void Var_SetExpandWithFlags(GNode *, const char *, const char *, VarSetFlags);
|
|
|
|
void Var_Append(GNode *, const char *, const char *);
|
|
|
|
void Var_AppendExpand(GNode *, const char *, const char *);
|
2021-04-03 14:08:40 +03:00
|
|
|
bool Var_Exists(GNode *, const char *);
|
|
|
|
bool Var_ExistsExpand(GNode *, const char *);
|
2021-02-05 08:15:12 +03:00
|
|
|
FStr Var_Value(GNode *, const char *);
|
2021-02-05 00:50:39 +03:00
|
|
|
const char *GNode_ValueDirect(GNode *, const char *);
|
2021-04-04 14:56:43 +03:00
|
|
|
VarParseResult Var_Parse(const char **, GNode *, VarEvalMode, FStr *);
|
|
|
|
VarParseResult Var_Subst(const char *, GNode *, VarEvalMode, char **);
|
2020-07-20 21:12:48 +03:00
|
|
|
void Var_Stats(void);
|
2002-06-15 22:24:55 +04:00
|
|
|
void Var_Dump(GNode *);
|
2020-12-12 21:53:53 +03:00
|
|
|
void Var_ReexportVars(void);
|
2020-12-13 04:41:12 +03:00
|
|
|
void Var_Export(VarExportMode, const char *);
|
2020-12-13 00:20:30 +03:00
|
|
|
void Var_ExportVars(const char *);
|
2021-04-03 14:08:40 +03:00
|
|
|
void Var_UnExport(bool, const char *);
|
2010-06-03 19:40:15 +04:00
|
|
|
|
2021-02-04 23:14:33 +03:00
|
|
|
void Global_Set(const char *, const char *);
|
|
|
|
void Global_SetExpand(const char *, const char *);
|
|
|
|
void Global_Append(const char *, const char *);
|
2021-02-05 07:41:17 +03:00
|
|
|
void Global_Delete(const char *);
|
2021-02-04 23:14:33 +03:00
|
|
|
|
2010-06-03 19:40:15 +04:00
|
|
|
/* util.c */
|
2020-09-12 19:46:24 +03:00
|
|
|
typedef void (*SignalProc)(int);
|
|
|
|
SignalProc bmake_signal(int, SignalProc);
|