diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2006-07-31 17:23:04 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2006-07-31 17:23:04 +0000 |
| commit | b672fa69c4c98509f8ee251b87300e3fcbe6bdc8 (patch) | |
| tree | 064212cec710fc5bfd5f2b75dd2a502ba9f66eba /src/command.cpp | |
| parent | 9139f1df4cda80b91ab68e5de27e85eaa4c54682 (diff) | |
| download | build-b672fa69c4c98509f8ee251b87300e3fcbe6bdc8.tar.gz build-b672fa69c4c98509f8ee251b87300e3fcbe6bdc8.tar.bz2 build-b672fa69c4c98509f8ee251b87300e3fcbe6bdc8.tar.xz build-b672fa69c4c98509f8ee251b87300e3fcbe6bdc8.zip | |
We're almost to rule/command generation, then only a couple of steps before it
will do it all!
Diffstat (limited to '')
| -rw-r--r-- | src/command.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/command.cpp b/src/command.cpp index 72f9a4c..ea5ade3 100644 --- a/src/command.cpp +++ b/src/command.cpp | |||
| @@ -1,4 +1,6 @@ | |||
| 1 | #include "command.h" | 1 | #include "command.h" |
| 2 | #include "builder.h" | ||
| 3 | #include "target.h" | ||
| 2 | 4 | ||
| 3 | Command::Command( CmdType cmd, const char *sTarget ) : | 5 | Command::Command( CmdType cmd, const char *sTarget ) : |
| 4 | nType( cmd ), | 6 | nType( cmd ), |
| @@ -16,3 +18,17 @@ void Command::debug() | |||
| 16 | printf(" command: %s %s\n", cmdt[ nType ], sTarget.getString() ); | 18 | printf(" command: %s %s\n", cmdt[ nType ], sTarget.getString() ); |
| 17 | } | 19 | } |
| 18 | 20 | ||
| 21 | void Command::execute( Builder &bld ) | ||
| 22 | { | ||
| 23 | switch( nType ) | ||
| 24 | { | ||
| 25 | case cmdCheck: | ||
| 26 | bld.getTarget( sTarget )->check( bld ); | ||
| 27 | break; | ||
| 28 | |||
| 29 | case cmdClean: | ||
| 30 | bld.getTarget( sTarget )->clean( bld ); | ||
| 31 | break; | ||
| 32 | } | ||
| 33 | } | ||
| 34 | |||
