summaryrefslogtreecommitdiff
path: root/rule.h
diff options
context:
space:
mode:
Diffstat (limited to 'rule.h')
-rw-r--r--rule.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/rule.h b/rule.h
index 91378f6..16b4d51 100644
--- a/rule.h
+++ b/rule.h
@@ -16,16 +16,18 @@ You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
-/* Structure used for pattern rules. */
+
+/* Structure used for pattern (implicit) rules. */
struct rule
{
struct rule *next;
- char **targets; /* Targets of the rule. */
+ const char **targets; /* Targets of the rule. */
unsigned int *lens; /* Lengths of each target. */
- char **suffixes; /* Suffixes (after `%') of each target. */
+ const char **suffixes; /* Suffixes (after `%') of each target. */
struct dep *deps; /* Dependencies of the rule. */
struct commands *cmds; /* Commands to execute. */
+ unsigned short num; /* Number of targets. */
char terminal; /* If terminal (double-colon). */
char in_use; /* If in use by a parent pattern_search. */
};
@@ -49,10 +51,9 @@ extern struct file *suffix_file;
extern unsigned int maxsuffix;
-void install_pattern_rule (struct pspec *p, int terminal);
-int new_pattern_rule (struct rule *rule, int override);
void count_implicit_rule_limits (void);
void convert_to_pattern (void);
-void create_pattern_rule (char **targets, char **target_percents,
- int terminal, struct dep *deps,
+void install_pattern_rule (struct pspec *p, int terminal);
+void create_pattern_rule (const char **targets, const char **target_percents,
+ unsigned int num, int terminal, struct dep *deps,
struct commands *commands, int override);