Annotation of src/usr.bin/make/targ.h, Revision 1.15
1.1 espie 1: #ifndef TARG_H
2: #define TARG_H
1.15 ! espie 3: /* $OpenBSD: targ.h,v 1.14 2020/01/13 13:50:41 espie Exp $ */
1.1 espie 4:
5: /*
6: * Copyright (c) 2001 Marc Espie.
7: *
8: * Redistribution and use in source and binary forms, with or without
9: * modification, are permitted provided that the following conditions
10: * are met:
11: * 1. Redistributions of source code must retain the above copyright
12: * notice, this list of conditions and the following disclaimer.
13: * 2. Redistributions in binary form must reproduce the above copyright
14: * notice, this list of conditions and the following disclaimer in the
15: * documentation and/or other materials provided with the distribution.
16: *
17: * THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS
18: * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBSD
21: * PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28: */
29:
1.13 espie 30: #include <sys/time.h>
1.1 espie 31: /*
32: * The TARG_ constants are used when calling the Targ_FindNode functions.
33: * They simply tell the function what to do if the desired node is not found.
34: * If the TARG_CREATE constant is given, a new, empty node will be created
35: * for the target, placed in the table of all targets and its address returned.
36: * If TARG_NOCREATE is given, a NULL pointer will be returned.
37: */
38: #define TARG_CREATE 0x01 /* create node if not found */
39: #define TARG_NOCREATE 0x00 /* don't create it */
40:
41: extern void Targ_Init(void);
42: extern GNode *Targ_NewGNi(const char *, const char *);
43: #define Targ_NewGN(n) Targ_NewGNi(n, NULL);
44: extern GNode *Targ_FindNodei(const char *, const char *, int);
45: #define Targ_FindNode(n, i) Targ_FindNodei(n, NULL, i)
1.3 espie 46:
47:
48:
1.14 espie 49: /* helper for constant nodes */
50: extern GNode *Targ_mk_special_node(const char *, size_t, uint32_t,
51: unsigned int, unsigned char, unsigned int);
1.11 espie 52:
1.1 espie 53: extern void Targ_FindList(Lst, Lst);
54: extern bool Targ_Ignore(GNode *);
55: extern bool Targ_Silent(GNode *);
56: extern bool Targ_Precious(GNode *);
57: extern void Targ_PrintCmd(void *);
58: extern void Targ_PrintType(int);
59: extern void Targ_PrintGraph(int);
1.15 ! espie 60: extern bool node_is_real(GNode *);
1.1 espie 61:
1.3 espie 62: extern GNode *begin_node, *end_node, *interrupt_node, *DEFAULT;
63: struct ohash_info;
64:
65: extern struct ohash_info gnode_info;
1.1 espie 66:
1.5 espie 67: extern void Targ_setdirs(const char *, const char *);
1.12 espie 68: extern const char *status_to_string(GNode *);
69: extern struct ohash *targets_hash(void);
1.1 espie 70: #endif