Use new tail-calling mechanism on ARM.
[official-gcc.git] / gcc / mkdeps.h
blob7a2c130af8af659fcf9e7fe995159ca24454dd8e
1 /* Dependency generator for Makefile fragments.
2 Copyright (C) 2000 Free Software Foundation, Inc.
3 Contributed by Zack Weinberg, Mar 2000
5 This program is free software; you can redistribute it and/or modify it
6 under the terms of the GNU General Public License as published by the
7 Free Software Foundation; either version 2, or (at your option) any
8 later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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! */
23 #ifndef __GCC_MKDEPS__
24 #define __GCC_MKDEPS__
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. */
29 struct deps
31 const char **targetv;
32 unsigned int ntargets; /* number of slots actually occupied */
33 unsigned int targets_size; /* amt of allocated space - in words */
35 const char **depv;
36 unsigned int ndeps;
37 unsigned int deps_size;
40 /* Create a deps buffer. */
41 extern struct deps *deps_init PARAMS ((void));
43 /* Destroy a deps buffer. */
44 extern void deps_free PARAMS ((struct deps *));
46 /* Add a target (appears on left side of the colon) to the deps list. */
47 extern void deps_add_target PARAMS ((struct deps *, const char *));
49 /* Given the name of the primary source file, calculate and add the
50 name of the target. This is done by locating and stripping the
51 file extension (if any) and adding .o (OBJECT_SUFFIX). In addition,
52 any directory components of the path are discarded. */
53 extern void deps_calc_target PARAMS ((struct deps *, const char *));
55 /* Add a dependency (appears on the right side of the colon) to the
56 deps list. Dependencies will be printed in the order that they
57 were entered with this function. By convention, the first
58 dependency entered should be the primary source file. */
59 extern void deps_add_dep PARAMS ((struct deps *, const char *));
61 /* Write out a deps buffer to a specified file. The third argument
62 is the number of columns to word-wrap at (0 means don't wrap). */
63 extern void deps_write PARAMS ((const struct deps *, FILE *,
64 unsigned int));
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. */
70 extern void deps_dummy_targets PARAMS ((const struct deps *, FILE *));
72 #endif