12 #include <QCoreApplication>
17 int main(
int argc,
char *argv[])
19 QCoreApplication a(argc, argv);
22 std::cout <<
"it would be cool if you gave me makefile path" << std::endl;
26 QFile *file =
new QFile(f);
27 if (!file->open(QIODevice::ReadWrite | QIODevice::Text))
29 std::cout <<
"unable to open a file" << std::endl;
32 QString value(file->readAll());
36 if (!file->open(QIODevice::ReadWrite | QIODevice::Truncate))
38 std::cout <<
"unable to open a file" << std::endl;
42 if (value.contains(
"install:"))
44 value = value.mid(0, value.indexOf(
"install:"));
45 value += QString(
"\n") + QString(
"install:\n\t ./build/install\nuninstall:\n\t ./build/uninstall\n\nFORCE:\n");
46 file->write(value.toUtf8());