00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00025 #include "Conditional.h"
00026
00027 namespace makefile
00028 {
00029
00030 string Conditional::toString()
00031 {
00032 string str = printif();
00033 std::vector<MakefileItem*>::iterator i;
00034 for(i = ifblock.begin(); i != ifblock.end(); i++)
00035 str.append((*i)->toString());
00036 str.append(cstr("\n"));
00037
00038
00039 if(!elseblock.empty())
00040 {
00041 str.append(cstr("else\n"));
00042 for(i = elseblock.begin(); i != elseblock.end(); i++)
00043 str.append((*i)->toString());
00044 str.append(cstr("\n"));
00045 }
00046 str.append(cstr("endif\n"));
00047 return str;
00048 }
00049
00050 }