diff options
author | Mike Buland <eichlan@xagasoft.com> | 2006-08-05 00:04:34 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2006-08-05 00:04:34 +0000 |
commit | 8dd79b7b5a0309f9bc1185019a4af16b3b52aece (patch) | |
tree | a703325cb9bc074179aeaf38f4851a4c38ebfd87 /src/builder.h | |
parent | 13bda5d4f77ca469bbbe0d9b1f268682a9f0ec71 (diff) | |
download | build-8dd79b7b5a0309f9bc1185019a4af16b3b52aece.tar.gz build-8dd79b7b5a0309f9bc1185019a4af16b3b52aece.tar.bz2 build-8dd79b7b5a0309f9bc1185019a4af16b3b52aece.tar.xz build-8dd79b7b5a0309f9bc1185019a4af16b3b52aece.zip |
Build now uses a cachefile for all of it's requires that are generated from
other means (running other programs). It's really fast, and seems to work
pretty well.
Diffstat (limited to '')
-rw-r--r-- | src/builder.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/builder.h b/src/builder.h index 06e84f3..56a7b07 100644 --- a/src/builder.h +++ b/src/builder.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include "exceptionbase.h" | 8 | #include "exceptionbase.h" |
9 | #include "staticstring.h" | 9 | #include "staticstring.h" |
10 | #include "regexp.h" | 10 | #include "regexp.h" |
11 | #include "cache.h" | ||
11 | 12 | ||
12 | subExceptionDecl( BuildException ) | 13 | subExceptionDecl( BuildException ) |
13 | 14 | ||
@@ -17,6 +18,7 @@ class Command; | |||
17 | class Rule; | 18 | class Rule; |
18 | class Target; | 19 | class Target; |
19 | class Viewer; | 20 | class Viewer; |
21 | class Cache; | ||
20 | 22 | ||
21 | #define YY_DECL int yylex( YYSTYPE *yylval_param, YYLTYPE *yylloc_param, Builder &bld ) | 23 | #define YY_DECL int yylex( YYSTYPE *yylval_param, YYLTYPE *yylloc_param, Builder &bld ) |
22 | YY_DECL; | 24 | YY_DECL; |
@@ -48,6 +50,8 @@ public: | |||
48 | { | 50 | { |
49 | return rView; | 51 | return rView; |
50 | } | 52 | } |
53 | |||
54 | void setCache( const std::string &sFile ); | ||
51 | void add( Action *pAct ); | 55 | void add( Action *pAct ); |
52 | void add( Command *pCmd ); | 56 | void add( Command *pCmd ); |
53 | void add( Rule *pRule ); | 57 | void add( Rule *pRule ); |
@@ -59,7 +63,7 @@ public: | |||
59 | void processRequires( std::list<std::string> &lInput ); | 63 | void processRequires( std::list<std::string> &lInput ); |
60 | void requires( const char *sBase, const char *sReq ); | 64 | void requires( const char *sBase, const char *sReq ); |
61 | void requiresFromCommand( const char *sBase, const char *sReq ); | 65 | void requiresFromCommand( const char *sBase, const char *sReq ); |
62 | void genRequiresFor( const char *sName ); | 66 | void genRequiresFor( const char *sName, time_t tNewTime ); |
63 | void requiresRegexp( bool on ) | 67 | void requiresRegexp( bool on ) |
64 | { | 68 | { |
65 | bReqRegexp = on; | 69 | bReqRegexp = on; |
@@ -152,6 +156,9 @@ private: | |||
152 | bool bReqRegexp; | 156 | bool bReqRegexp; |
153 | 157 | ||
154 | Viewer &rView; | 158 | Viewer &rView; |
159 | |||
160 | StaticString sCacheFile; | ||
161 | class Cache cRequires; | ||
155 | }; | 162 | }; |
156 | 163 | ||
157 | void cleanList( std::list<std::string> &lst ); | 164 | void cleanList( std::list<std::string> &lst ); |