]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcpp/include/mkdeps.h
v850.c (v850_use_dfa_pipeline_interface): New.
[thirdparty/gcc.git] / libcpp / include / mkdeps.h
CommitLineData
49e6c08e 1/* Dependency generator for Makefile fragments.
0c20a65f 2 Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
49e6c08e
ZW
3 Contributed by Zack Weinberg, Mar 2000
4
5This program is free software; you can redistribute it and/or modify it
6under the terms of the GNU General Public License as published by the
7Free Software Foundation; either version 2, or (at your option) any
8later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 In other words, you are welcome to use, share and improve this program.
20 You are forbidden to forbid anyone else to use, share and improve
21 what you give them. Help stamp out software-hoarding! */
22
4f4e53dd
PB
23#ifndef LIBCPP_MKDEPS_H
24#define LIBCPP_MKDEPS_H
49e6c08e
ZW
25
26/* This is the data structure used by all the functions in mkdeps.c.
27 It's quite straightforward, but should be treated as opaque. */
28
03b9ab42 29struct deps;
49e6c08e
ZW
30
31/* Create a deps buffer. */
0c20a65f 32extern struct deps *deps_init (void);
49e6c08e
ZW
33
34/* Destroy a deps buffer. */
0c20a65f 35extern void deps_free (struct deps *);
49e6c08e 36
a5a4ce3c
NB
37/* Add a target (appears on left side of the colon) to the deps list. Takes
38 a boolean indicating whether to quote the target for MAKE. */
0c20a65f 39extern void deps_add_target (struct deps *, const char *, int);
49e6c08e 40
03b9ab42 41/* Sets the default target if none has been given already. An empty
48c4721e 42 string as the default target is interpreted as stdin. */
0c20a65f 43extern void deps_add_default_target (struct deps *, const char *);
49e6c08e
ZW
44
45/* Add a dependency (appears on the right side of the colon) to the
46 deps list. Dependencies will be printed in the order that they
47 were entered with this function. By convention, the first
48 dependency entered should be the primary source file. */
0c20a65f 49extern void deps_add_dep (struct deps *, const char *);
49e6c08e
ZW
50
51/* Write out a deps buffer to a specified file. The third argument
52 is the number of columns to word-wrap at (0 means don't wrap). */
0c20a65f 53extern void deps_write (const struct deps *, FILE *, unsigned int);
49e6c08e 54
17211ab5
GK
55/* Write out a deps buffer to a file, in a form that can be read back
56 with deps_restore. Returns nonzero on error, in which case the
57 error number will be in errno. */
0c20a65f 58extern int deps_save (struct deps *, FILE *);
17211ab5
GK
59
60/* Read back dependency information written with deps_save into
61 the deps buffer. The third argument may be NULL, in which case
62 the dependency information is just skipped, or it may be a filename,
63 in which case that filename is skipped. */
0c20a65f 64extern int deps_restore (struct deps *, FILE *, const char *);
17211ab5 65
49e6c08e
ZW
66/* For each dependency *except the first*, emit a dummy rule for that
67 file, causing it to depend on nothing. This is used to work around
68 the intermediate-file deletion misfeature in Make, in some
69 automatic dependency schemes. */
0c20a65f 70extern void deps_phony_targets (const struct deps *, FILE *);
49e6c08e 71
4f4e53dd 72#endif /* ! LIBCPP_MKDEPS_H */