remake  4.3+dbg-1.5
rule.h
Go to the documentation of this file.
1 /* Definitions for using pattern rules in GNU Make.
2 Copyright (C) 1988-2020 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 it under the
6 terms of the GNU General Public License as published by the Free Software
7 Foundation; either version 3 of the License, or (at your option) any later
8 version.
9 
10 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13 
14 You should have received a copy of the GNU General Public License along with
15 this program. If not, see <http://www.gnu.org/licenses/>. */
16 
17 
18 /* Structure used for pattern (implicit) rules. */
19 
20 #ifndef _REMAKE_RULE_H
21 #define _REMAKE_RULE_H
22 #include "gnuremake.h"
23 #include "types.h"
24 
25 struct rule
26  {
27  struct rule *next;
28  const char **targets; /* Targets of the rule. */
29  unsigned int *lens; /* Lengths of each target. */
30  const char **suffixes; /* Suffixes (after '%') of each target. */
31  struct dep *deps; /* Dependencies of the rule. */
32  struct commands *cmds; /* Commands to execute. */
33  unsigned short num; /* Number of targets. */
34  char terminal; /* If terminal (double-colon). */
35  char in_use; /* If in use by a parent pattern_search. */
36  gmk_floc floc; /* Location of rule */
37  breakpoint_mask_t tracing; /* breakpoint status of target. */
38  };
39 
40 /* For calling install_pattern_rule. */
41 struct pspec
42  {
43  const char *target, *dep, *commands;
44  };
45 
46 
47 extern struct rule *pattern_rules;
48 extern struct rule *last_pattern_rule;
49 extern unsigned int num_pattern_rules;
50 
51 extern unsigned int max_pattern_deps;
52 extern unsigned int max_pattern_targets;
53 extern size_t max_pattern_dep_length;
54 
55 extern struct file *suffix_file;
56 
57 
58 void snap_implicit_rules (void);
59 void convert_to_pattern (void);
60 void install_pattern_rule (struct pspec *p, int terminal);
61 void create_pattern_rule (const char **targets, const char **target_percents,
62  unsigned short num, int terminal, struct dep *deps,
63  struct commands *commands, int override);
64 
66 extern void print_rule (rule_t *r, bool b_verbose);
67 extern void print_rule_data_base (bool b_verbose);
68 
69 #endif /*REMAKE_RULE_H*/
Miscellaneous types.
unsigned int max_pattern_deps
char terminal
Definition: rule.h:34
Definition: commands.h:27
struct dep * deps
Definition: rule.h:31
unsigned int * lens
Definition: rule.h:29
void create_pattern_rule(const char **targets, const char **target_percents, unsigned short num, int terminal, struct dep *deps, struct commands *commands, int override)
size_t max_pattern_dep_length
void convert_to_pattern(void)
unsigned short num
Definition: rule.h:33
Definition: rule.h:25
struct rule * pattern_rules
struct commands * cmds
Definition: rule.h:32
const char ** suffixes
Definition: rule.h:30
void print_rule(rule_t *r, bool b_verbose)
breakpoint_mask_t
Definition: types.h:55
gmk_floc floc
Definition: rule.h:36
const char * target
Definition: rule.h:43
breakpoint_mask_t tracing
Definition: rule.h:37
Definition: rule.h:41
void snap_implicit_rules(void)
struct rule * next
Definition: rule.h:27
struct rule * last_pattern_rule
Definition: gnuremake.h:23
void print_rule_data_base(bool b_verbose)
void install_pattern_rule(struct pspec *p, int terminal)
unsigned int max_pattern_targets
char in_use
Definition: rule.h:35
unsigned int num_pattern_rules
struct file * suffix_file
const char ** targets
Definition: rule.h:28
Definition: dep.h:60
Definition: filedef.h:34