xref: /openbsd/usr.bin/make/engine.h (revision cae88e06)
1a6f1883eSespie #ifndef ENGINE_H
2a6f1883eSespie #define ENGINE_H
3*cae88e06Sespie /*	$OpenBSD: engine.h,v 1.4 2007/11/03 14:05:39 espie Exp $	*/
4a6f1883eSespie 
5a6f1883eSespie /*
6a6f1883eSespie  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
7a6f1883eSespie  * Copyright (c) 1988, 1989 by Adam de Boor
8a6f1883eSespie  * Copyright (c) 1989 by Berkeley Softworks
9a6f1883eSespie  * All rights reserved.
10a6f1883eSespie  *
11a6f1883eSespie  * This code is derived from software contributed to Berkeley by
12a6f1883eSespie  * Adam de Boor.
13a6f1883eSespie  *
14a6f1883eSespie  * Redistribution and use in source and binary forms, with or without
15a6f1883eSespie  * modification, are permitted provided that the following conditions
16a6f1883eSespie  * are met:
17a6f1883eSespie  * 1. Redistributions of source code must retain the above copyright
18a6f1883eSespie  *    notice, this list of conditions and the following disclaimer.
19a6f1883eSespie  * 2. Redistributions in binary form must reproduce the above copyright
20a6f1883eSespie  *    notice, this list of conditions and the following disclaimer in the
21a6f1883eSespie  *    documentation and/or other materials provided with the distribution.
22a6f1883eSespie  * 3. Neither the name of the University nor the names of its contributors
23a6f1883eSespie  *    may be used to endorse or promote products derived from this software
24a6f1883eSespie  *    without specific prior written permission.
25a6f1883eSespie  *
26a6f1883eSespie  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27a6f1883eSespie  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28a6f1883eSespie  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29a6f1883eSespie  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30a6f1883eSespie  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31a6f1883eSespie  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32a6f1883eSespie  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33a6f1883eSespie  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34a6f1883eSespie  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35a6f1883eSespie  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36a6f1883eSespie  * SUCH DAMAGE.
37a6f1883eSespie  *
38a6f1883eSespie  *	from: @(#)job.h 8.1 (Berkeley) 6/6/93
39a6f1883eSespie  */
40a6f1883eSespie 
41a6f1883eSespie /* ok = Job_CheckCommands(node, abort);
42a6f1883eSespie  *	verify the integrity of a node's commands, pulling stuff off
43a6f1883eSespie  * 	.DEFAULT and other places if necessary.
44a6f1883eSespie  */
45a6f1883eSespie extern bool Job_CheckCommands(GNode *, void (*abortProc)(char *, ...));
46*cae88e06Sespie /* Job_Touch(node);
47a6f1883eSespie  *	touch the path corresponding to a node or update the corresponding
48a6f1883eSespie  *	archive object.
49a6f1883eSespie  */
50*cae88e06Sespie extern void Job_Touch(GNode *);
51a6f1883eSespie /* Make_TimeStamp(parent, child);
52a6f1883eSespie  *	ensure parent is at least as recent as child.
53a6f1883eSespie  */
54a6f1883eSespie extern void Make_TimeStamp(GNode *, GNode *);
55a6f1883eSespie /* Make_HandleUse(user_node, usee_node);
56a6f1883eSespie  *	let user_node inherit the commands from usee_node
57a6f1883eSespie  */
58a6f1883eSespie extern void Make_HandleUse(GNode *, GNode *);
59a6f1883eSespie 
60a6f1883eSespie /* old = Make_OODate(node);
61a6f1883eSespie  *	check if a given node is out-of-date.
62a6f1883eSespie  */
63a6f1883eSespie extern bool Make_OODate(GNode *);
64a6f1883eSespie /* Make_DoAllVar(node);
65a6f1883eSespie  *	fill all dynamic variables for a node.
66a6f1883eSespie  */
67a6f1883eSespie extern void Make_DoAllVar(GNode *);
6832e144d7Sespie extern volatile sig_atomic_t got_signal;
6932e144d7Sespie 
7032e144d7Sespie extern volatile sig_atomic_t got_SIGINT, got_SIGHUP, got_SIGQUIT,
7132e144d7Sespie     got_SIGTERM, got_SIGTSTP, got_SIGTTOU, got_SIGTTIN, got_SIGWINCH;
7232e144d7Sespie 
7332e144d7Sespie extern void SigHandler(int);
7432e144d7Sespie extern int run_gnode(GNode *, int);
7532e144d7Sespie 
7632e144d7Sespie extern void setup_engine(void);
7732e144d7Sespie 
78a6f1883eSespie #endif
79