1 /* $Id: file.h,v 1.11 2006/03/30 05:01:49 rockyb Exp $ 2 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997, 3 2002, 2004, 2005 Free Software Foundation, Inc. 4 This file is part of GNU Make. 5 6 GNU Make is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 GNU Make is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with GNU Make; see the file COPYING. If not, write to 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 Boston, MA 02111-1307, USA. */ 20 21 /** \file file.h 22 * 23 * \brief Definition of target file data structures for GNU Make. 24 */ 25 26 #ifndef FILE_H 27 #define FILE_H 28 29 #include "make.h" 30 #include "types.h" 31 #include "hash.h" 32 33 extern struct hash_table files; 34 35 /*! Free memory associated with p_file. */ 36 void free_file (file_t *p_file); 37 38 /*! 39 Remove all nonprecious intermediate files. 40 41 @param sig if is nonzero, this was caused by a fatal signal, 42 meaning that a different message will be printed, and 43 the message will go to stderr rather than stdout. 44 */ 45 void remove_intermediates (int sig); 46 47 void init_hash_files (void); 48 49 char *build_target_list (char *old_list); 50 51 /*! Thing of the below as a bit mask rather than an enumeration and 52 use print_target_mask; 53 The enumeration is created be helpful in debuggers where wants just to 54 refer to the PRINT_TARGET_ names and get something. 55 */ 56 typedef enum 57 { 58 PRINT_TARGET_NONORDER = 0x001, 59 PRINT_TARGET_ORDER = 0x002, 60 PRINT_TARGET_ATTRS = 0x004, 61 PRINT_TARGET_TIME = 0x008, 62 PRINT_TARGET_STATE = 0x010, 63 PRINT_TARGET_VARS = 0x020, 64 PRINT_TARGET_VARS_HASH = 0x040, 65 PRINT_TARGET_CMDS = 0x080, 66 PRINT_TARGET_PREV = 0x100, 67 PRINT_TARGET_CMDS_EXP = 0x200, 68 PRINT_TARGET_DEPEND = (PRINT_TARGET_ORDER|PRINT_TARGET_NONORDER), 69 PRINT_TARGET_ALL = 0x0FF, 70 } print_target_mask_t; 71 72 /* The below variable is to make sure the enumerations are accessible 73 in a debugger. */ 74 extern print_target_mask_t debugger_enum_mask; 75 76 /*! Print the data base of files. */ 77 extern void print_target (const void *item); 78 79 /*! Print some or all properties of the data base of files. */ 80 extern void print_target_props (file_t *p_target, print_target_mask_t i_mask); 81 82 /*! Expand and parse each dependency line. */ 83 extern void expand_deps (file_t *f); 84 85 /*! For each dependency of each file, make the 'struct dep' point 86 at the appropriate 'struct file' (which may have to be created). 87 88 Also mark the files depended on by .PRECIOUS, .PHONY, .SILENT, 89 and various other special targets. */ 90 extern void snap_deps (void); 91 92 #endif /*FILE_H*/ 93