| 1 | /* Definitions of dependency data structures for GNU Make. | 
|---|
| 2 | Copyright (C) 1988, 1989, 1991, 1992, 1993, 1996 Free Software Foundation, Inc. | 
|---|
| 3 | This file is part of GNU Make. | 
|---|
| 4 |  | 
|---|
| 5 | GNU Make is free software; you can redistribute it and/or modify | 
|---|
| 6 | it under the terms of the GNU General Public License as published by | 
|---|
| 7 | the Free Software Foundation; either version 2, or (at your option) | 
|---|
| 8 | any later version. | 
|---|
| 9 |  | 
|---|
| 10 | GNU Make 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. | 
|---|
| 14 |  | 
|---|
| 15 | You should have received a copy of the GNU General Public License | 
|---|
| 16 | along with GNU Make; see the file COPYING.  If not, write to | 
|---|
| 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 
|---|
| 18 | Boston, MA 02111-1307, USA.  */ | 
|---|
| 19 |  | 
|---|
| 20 | /* Flag bits for the second argument to `read_makefile'. | 
|---|
| 21 | These flags are saved in the `changed' field of each | 
|---|
| 22 | `struct dep' in the chain returned by `read_all_makefiles'.  */ | 
|---|
| 23 |  | 
|---|
| 24 | #define RM_NO_DEFAULT_GOAL      (1 << 0) /* Do not set default goal.  */ | 
|---|
| 25 | #define RM_INCLUDED             (1 << 1) /* Search makefile search path.  */ | 
|---|
| 26 | #define RM_DONTCARE             (1 << 2) /* No error if it doesn't exist.  */ | 
|---|
| 27 | #define RM_NO_TILDE             (1 << 3) /* Don't expand ~ in file name.  */ | 
|---|
| 28 | #define RM_NOFLAG               0 | 
|---|
| 29 |  | 
|---|
| 30 | /* Structure representing one dependency of a file. | 
|---|
| 31 | Each struct file's `deps' points to a chain of these, | 
|---|
| 32 | chained through the `next'. | 
|---|
| 33 |  | 
|---|
| 34 | Note that the first two words of this match a struct nameseq.  */ | 
|---|
| 35 |  | 
|---|
| 36 | struct dep | 
|---|
| 37 | { | 
|---|
| 38 | struct dep *next; | 
|---|
| 39 | char *name; | 
|---|
| 40 | struct file *file; | 
|---|
| 41 | unsigned int changed : 8; | 
|---|
| 42 | unsigned int ignore_mtime : 1; | 
|---|
| 43 | }; | 
|---|
| 44 |  | 
|---|
| 45 |  | 
|---|
| 46 | /* Structure used in chains of names, for parsing and globbing.  */ | 
|---|
| 47 |  | 
|---|
| 48 | struct nameseq | 
|---|
| 49 | { | 
|---|
| 50 | struct nameseq *next; | 
|---|
| 51 | char *name; | 
|---|
| 52 | }; | 
|---|
| 53 |  | 
|---|
| 54 |  | 
|---|
| 55 | extern struct nameseq *multi_glob PARAMS ((struct nameseq *chain, unsigned int size)); | 
|---|
| 56 | #ifdef VMS | 
|---|
| 57 | extern struct nameseq *parse_file_seq (); | 
|---|
| 58 | #else | 
|---|
| 59 | extern struct nameseq *parse_file_seq PARAMS ((char **stringp, int stopchar, unsigned int size, int strip)); | 
|---|
| 60 | #endif | 
|---|
| 61 | extern char *tilde_expand PARAMS ((char *name)); | 
|---|
| 62 |  | 
|---|
| 63 | #ifndef NO_ARCHIVES | 
|---|
| 64 | extern struct nameseq *ar_glob PARAMS ((char *arname, char *member_pattern, unsigned int size)); | 
|---|
| 65 | #endif | 
|---|
| 66 |  | 
|---|
| 67 | #ifndef iAPX286 | 
|---|
| 68 | #define dep_name(d) ((d)->name == 0 ? (d)->file->name : (d)->name) | 
|---|
| 69 | #else | 
|---|
| 70 | /* Buggy compiler can't hack this.  */ | 
|---|
| 71 | extern char *dep_name (); | 
|---|
| 72 | #endif | 
|---|
| 73 |  | 
|---|
| 74 | extern struct dep *copy_dep_chain PARAMS ((struct dep *d)); | 
|---|
| 75 | extern struct dep *read_all_makefiles PARAMS ((char **makefiles)); | 
|---|
| 76 | extern int eval_buffer PARAMS ((char *buffer)); | 
|---|
| 77 | extern int update_goal_chain PARAMS ((struct dep *goals, int makefiles)); | 
|---|
| 78 | extern void uniquize_deps PARAMS ((struct dep *)); | 
|---|