xref: /openbsd-src/usr.bin/make/parse.h (revision 50b7afb2c2c0993b0894d4e34bf857cb13ed9c80)
1 #ifndef PARSE_H
2 #define PARSE_H
3 /*	$OpenBSD: parse.h,v 1.6 2012/10/02 10:29:31 espie Exp $ */
4 /*
5  * Copyright (c) 2001 Marc Espie.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS
17  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  * A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OPENBSD
20  * PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 /* parse
30  *	Functions to parse Makefiles and fragments.
31  */
32 
33 extern void Parse_Init(void);
34 extern Lst	systemIncludePath;
35 extern Lst	userIncludePath;
36 
37 /* Parse_File(filename, filehandle);
38  *	Parses stream filehandle, use filename when reporting error
39  *	messages.  Builds a graph of GNode and Suffixes. This modules
40  *	acquires ownership of the filename and filehandle, and will
41  *	free/close them when it sees fit. */
42 extern void Parse_File(const char *, FILE *);
43 
44 /* Parse_AddIncludeDir(dir);
45  *	Adds directory dir to user include"" path (copy the string). */
46 extern void Parse_AddIncludeDir(const char *);
47 
48 /* Parse_MainName(lst);
49  *	Adds set of main targets to create to list lst. Errors out if no
50  *	target exists. */
51 extern void Parse_MainName(Lst);
52 
53 #endif
54