aboutsummaryrefslogtreecommitdiff
path: root/src/rule.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-07-31 08:07:12 +0000
committerMike Buland <eichlan@xagasoft.com>2006-07-31 08:07:12 +0000
commit9139f1df4cda80b91ab68e5de27e85eaa4c54682 (patch)
tree87fadb2618ee8228f7184aa14bfa2b21741e3f49 /src/rule.h
parent113fc467a7170a8a564049c64d1036dd10e6abac (diff)
downloadbuild-9139f1df4cda80b91ab68e5de27e85eaa4c54682.tar.gz
build-9139f1df4cda80b91ab68e5de27e85eaa4c54682.tar.bz2
build-9139f1df4cda80b91ab68e5de27e85eaa4c54682.tar.xz
build-9139f1df4cda80b91ab68e5de27e85eaa4c54682.zip
I still can't get the pymake file to auto-make the bison and flex .c files, but
besides that everything is looking great. There's only one thing left to parse and interpret before we can try actually building something.
Diffstat (limited to '')
-rw-r--r--src/rule.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/rule.h b/src/rule.h
new file mode 100644
index 0000000..64cdc9d
--- /dev/null
+++ b/src/rule.h
@@ -0,0 +1,49 @@
1#ifndef RULE_H
2#define RULE_H
3
4#include <stdint.h>
5#include <regex.h>
6#include "staticstring.h"
7
8class Rule
9{
10public:
11 enum Matches
12 {
13 matchOne,
14 matchAll
15 };
16
17 enum Perform
18 {
19 perfCommand
20 };
21
22public:
23 Rule( const char *sName );
24 virtual ~Rule();
25
26 const char *getName()
27 {
28 return sName;
29 }
30
31 void debug();
32
33 void setProduces( const char *sProduces );
34 void setMatches( Matches how, const char *sWhat );
35 void setPerforms( Perform pwhat, const char *sPerfCmd );
36
37private:
38 StaticString sName;
39 StaticString sProduces;
40
41 Matches mHow;
42 StaticString sWhat;
43 regex_t rWhat;
44
45 Perform pHow;
46 StaticString sPerfCmd;
47};
48
49#endif