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