blob: ea5ade3695bb6970c7f28b82b8b0fe0f503c4ea8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#include "command.h"
#include "builder.h"
#include "target.h"
Command::Command( CmdType cmd, const char *sTarget ) :
nType( cmd ),
sTarget( sTarget )
{
}
Command::~Command()
{
}
void Command::debug()
{
static const char *cmdt[]={"Check", "Clean"};
printf(" command: %s %s\n", cmdt[ nType ], sTarget.getString() );
}
void Command::execute( Builder &bld )
{
switch( nType )
{
case cmdCheck:
bld.getTarget( sTarget )->check( bld );
break;
case cmdClean:
bld.getTarget( sTarget )->clean( bld );
break;
}
}
|