Fix bug #11183.
[make/kirr.git] / dep.h
blobaafadb25d3b4c01f3f190fe0d71bc02d2f41b5b1
1 /* Definitions of dependency data structures for GNU Make.
2 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
4 Foundation, Inc.
5 This file is part of GNU Make.
7 GNU Make is free software; you can redistribute it and/or modify it under the
8 terms of the GNU General Public License as published by the Free Software
9 Foundation; either version 2, or (at your option) any later version.
11 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License along with
16 GNU Make; see the file COPYING. If not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
19 /* Flag bits for the second argument to `read_makefile'.
20 These flags are saved in the `changed' field of each
21 `struct dep' in the chain returned by `read_all_makefiles'. */
23 #define RM_NO_DEFAULT_GOAL (1 << 0) /* Do not set default goal. */
24 #define RM_INCLUDED (1 << 1) /* Search makefile search path. */
25 #define RM_DONTCARE (1 << 2) /* No error if it doesn't exist. */
26 #define RM_NO_TILDE (1 << 3) /* Don't expand ~ in file name. */
27 #define RM_NOFLAG 0
29 /* Structure representing one dependency of a file.
30 Each struct file's `deps' points to a chain of these,
31 chained through the `next'.
33 Note that the first two words of this match a struct nameseq. */
35 struct dep
37 struct dep *next;
38 char *name;
39 struct file *file;
40 unsigned int changed : 8;
41 unsigned int ignore_mtime : 1;
42 unsigned int staticpattern : 1;
43 unsigned int need_2nd_expansion : 1;
47 /* Structure used in chains of names, for parsing and globbing. */
49 struct nameseq
51 struct nameseq *next;
52 char *name;
56 extern struct nameseq *multi_glob PARAMS ((struct nameseq *chain, unsigned int size));
57 #ifdef VMS
58 extern struct nameseq *parse_file_seq ();
59 #else
60 extern struct nameseq *parse_file_seq PARAMS ((char **stringp, int stopchar, unsigned int size, int strip));
61 #endif
62 extern char *tilde_expand PARAMS ((char *name));
64 #ifndef NO_ARCHIVES
65 extern struct nameseq *ar_glob PARAMS ((char *arname, char *member_pattern, unsigned int size));
66 #endif
68 #ifndef iAPX286
69 #define dep_name(d) ((d)->name == 0 ? (d)->file->name : (d)->name)
70 #else
71 /* Buggy compiler can't hack this. */
72 extern char *dep_name ();
73 #endif
75 extern struct dep *copy_dep_chain PARAMS ((const struct dep *d));
76 extern void free_dep_chain PARAMS ((struct dep *d));
77 extern void free_ns_chain PARAMS ((struct nameseq *n));
78 extern struct dep *read_all_makefiles PARAMS ((char **makefiles));
79 extern int eval_buffer PARAMS ((char *buffer));
80 extern int update_goal_chain PARAMS ((struct dep *goals));
81 extern void uniquize_deps PARAMS ((struct dep *));