main shinobi / src / gnu / pattern.h
 1#ifndef GNU_PATTERN_H
 2#define GNU_PATTERN_H
 3
 4#include "internal.h"
 5
 6struct PatRule {
 7	char *target;
 8	struct StrList prereqs;
 9	struct StrList order_only;
10	struct RecipeList recipes;
11	int builtin;
12};
13
14struct PatRules {
15	struct PatRule *v;
16	size_t n;
17};
18
19int ispat(const char *s);
20int patmatches(const char *pat, const char *name);
21char *patmatchstem(const char *pat, const char *name);
22char *patapplystem(const char *s, const char *stem);
23char *patexpandstem(const char *s, const char *stem);
24void collectpat(struct PatRules *rules, const struct RuleNode *rule, int builtin);
25int instpatrule(const struct PatRules *rules, const struct Graph *graph, struct Target *t, struct EvalCtx *ctx, int allow_builtin);
26void freepatrule(struct PatRules *rules);
27
28#endif