Fixed a number of documentation bugs, plus some build/install issues:
[make.git] / rule.h
blob91378f6fcc5c01a9a7beb5be5b4917d7af642d53
1 /* Definitions for using pattern rules in 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 /* Structure used for pattern rules. */
21 struct rule
23 struct rule *next;
24 char **targets; /* Targets of the rule. */
25 unsigned int *lens; /* Lengths of each target. */
26 char **suffixes; /* Suffixes (after `%') of each target. */
27 struct dep *deps; /* Dependencies of the rule. */
28 struct commands *cmds; /* Commands to execute. */
29 char terminal; /* If terminal (double-colon). */
30 char in_use; /* If in use by a parent pattern_search. */
33 /* For calling install_pattern_rule. */
34 struct pspec
36 char *target, *dep, *commands;
40 extern struct rule *pattern_rules;
41 extern struct rule *last_pattern_rule;
42 extern unsigned int num_pattern_rules;
44 extern unsigned int max_pattern_deps;
45 extern unsigned int max_pattern_targets;
46 extern unsigned int max_pattern_dep_length;
48 extern struct file *suffix_file;
49 extern unsigned int maxsuffix;
52 void install_pattern_rule (struct pspec *p, int terminal);
53 int new_pattern_rule (struct rule *rule, int override);
54 void count_implicit_rule_limits (void);
55 void convert_to_pattern (void);
56 void create_pattern_rule (char **targets, char **target_percents,
57 int terminal, struct dep *deps,
58 struct commands *commands, int override);