X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fdeptool.cpp;h=45a01c4e7517e5e619dd9376fc605c700870d119;hb=b7d95f994b4858eeab9ce480b04933b5e94d40eb;hp=7abeb89250cfc1f82b0c5f8992ae4c81011a4025;hpb=58a1cf0d009c70ea1f9c3ae303469088dc3e49ab;p=inkscape.git diff --git a/src/deptool.cpp b/src/deptool.cpp index 7abeb8925..45a01c4e7 100644 --- a/src/deptool.cpp +++ b/src/deptool.cpp @@ -159,10 +159,14 @@ public: std::map files; + bool checked; + private: void init() { + type = UNKNOWN; + checked = false; } void assign(const FileRec &other) @@ -172,6 +176,7 @@ private: baseName = other.baseName; suffix = other.suffix; files = other.files; + checked = other.checked; } }; @@ -284,6 +289,11 @@ private: */ bool saveDepFile(bool doXml); + /** + * + */ + bool saveCmakeFile(); + /** * */ @@ -353,6 +363,9 @@ private: char *fileBuf; int fileSize; + + static const int readBufLen = 8192; + char readBuf[8193]; }; @@ -484,7 +497,7 @@ void DepTool::parseName(const String &fullname, if (fullname.size() < 2) return; - unsigned int pos = fullname.find_last_of('/'); + String::size_type pos = fullname.find_last_of('/'); if (pos != fullname.npos && pos::iterator oiter; + for (oiter=allFiles.begin() ; oiter!=allFiles.end() ; oiter++) + { + FileRec *frec = oiter->second; + if (frec->type == FileRec::CFILE) + { + //fprintf(f, " \\\n"); + String fname = frec->path; + if (fname.size()>0) + fname.append("/"); + fname.append(frec->baseName); + fname.append("."); + fname.append(frec->suffix); + fprintf(f, "%s\n", fname.c_str()); + } + } + fprintf(f, ")\n\n"); + + fprintf(f, "add_executable (inkscape ${INKSCAPE_SRCS})\n"); + + fprintf(f, "\n\n\n"); + fprintf(f, "########################################################\n"); + fprintf(f, "## E N D\n"); + fprintf(f, "########################################################\n"); + + fclose(f); + + return true; +} + +