aboutsummaryrefslogtreecommitdiff
path: root/src/builder.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-08-05 00:04:34 +0000
committerMike Buland <eichlan@xagasoft.com>2006-08-05 00:04:34 +0000
commit8dd79b7b5a0309f9bc1185019a4af16b3b52aece (patch)
treea703325cb9bc074179aeaf38f4851a4c38ebfd87 /src/builder.h
parent13bda5d4f77ca469bbbe0d9b1f268682a9f0ec71 (diff)
downloadbuild-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 'src/builder.h')
-rw-r--r--src/builder.h9
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
12subExceptionDecl( BuildException ) 13subExceptionDecl( BuildException )
13 14
@@ -17,6 +18,7 @@ class Command;
17class Rule; 18class Rule;
18class Target; 19class Target;
19class Viewer; 20class Viewer;
21class 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 )
22YY_DECL; 24YY_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
157void cleanList( std::list<std::string> &lst ); 164void cleanList( std::list<std::string> &lst );