From: ishmal Date: Fri, 20 Apr 2007 16:28:08 +0000 (+0000) Subject: Fixed path in include file checks. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bfc6fc9bf9665e53b52cd99a6f5a6f8f9900331a;p=inkscape.git Fixed path in include file checks. --- diff --git a/build.xml b/build.xml index 4f7afe4ed..a3fe9f31c 100644 --- a/build.xml +++ b/build.xml @@ -125,6 +125,13 @@ #define RENDER_WITH_PANGO_CAIRO 1 #define HAVE_GTK_WINDOW_FULLSCREEN 1 + + /* internal interpreter */ + #define WITH_PYTHON 1 + + /* shared whiteboard */ + #define WITH_INKBOARD 1 + #define HAVE_SSL 1 #endif /* _CONFIG_H_ */ @@ -237,7 +244,6 @@ -DXP_WIN -D_INTL_REDIRECT_INLINE -DRELAYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }" - -DWITH_INKBOARD -DHAVE_SSL -I${gtk}/include @@ -388,7 +394,7 @@ - < include name="inkviewres.o"/ > + diff --git a/buildtool.cpp b/buildtool.cpp index 3dc7ed07e..67687af35 100644 --- a/buildtool.cpp +++ b/buildtool.cpp @@ -37,7 +37,7 @@ * */ -#define BUILDTOOL_VERSION "BuildTool v0.6.9, 2007 Bob Jamison" +#define BUILDTOOL_VERSION "BuildTool v0.6.10, 2007 Bob Jamison" #include #include @@ -5586,7 +5586,7 @@ std::vector DepTool::loadDepFile(const String &depFile) if (root->getChildren().size()==0 || root->getChildren()[0]->getName()!="dependencies") { - error("Main xml element should be "); + error("loadDepFile: main xml element should be "); delete root; return result; } @@ -5599,47 +5599,53 @@ std::vector DepTool::loadDepFile(const String &depFile) { Element *objectElem = objects[i]; String tagName = objectElem->getName(); - if (tagName == "object") - { - String objName = objectElem->getAttribute("name"); - //trace("object:%s", objName.c_str()); - DepRec depObject(objName); - depObject.path = objectElem->getAttribute("path"); - depObject.suffix = objectElem->getAttribute("suffix"); - //########## DESCRIPTION - std::vector depElems = objectElem->getChildren(); - for (unsigned int i=0 ; i should have only children"); + return result; + } + + String objName = objectElem->getAttribute("name"); + //trace("object:%s", objName.c_str()); + DepRec depObject(objName); + depObject.path = objectElem->getAttribute("path"); + depObject.suffix = objectElem->getAttribute("suffix"); + //########## DESCRIPTION + std::vector depElems = objectElem->getChildren(); + for (unsigned int i=0 ; igetName(); + if (tagName != "dep") { - Element *depElem = depElems[i]; - tagName = depElem->getName(); - if (tagName == "dep") - { - String depName = depElem->getAttribute("name"); - //trace(" dep:%s", depName.c_str()); - depObject.files.push_back(depName); - } + error("loadDepFile: should have only children"); + return result; } - //Insert into the result list, in a sorted manner - bool inserted = false; - std::vector::iterator iter; - for (iter = result.begin() ; iter != result.end() ; iter++) + String depName = depElem->getAttribute("name"); + //trace(" dep:%s", depName.c_str()); + depObject.files.push_back(depName); + } + + //Insert into the result list, in a sorted manner + bool inserted = false; + std::vector::iterator iter; + for (iter = result.begin() ; iter != result.end() ; iter++) + { + String vpath = iter->path; + vpath.append("/"); + vpath.append(iter->name); + String opath = depObject.path; + opath.append("/"); + opath.append(depObject.name); + if (vpath > opath) { - String vpath = iter->path; - vpath.append("/"); - vpath.append(iter->name); - String opath = depObject.path; - opath.append("/"); - opath.append(depObject.name); - if (vpath > opath) - { - inserted = true; - iter = result.insert(iter, depObject); - break; - } + inserted = true; + iter = result.insert(iter, depObject); + break; } - if (!inserted) - result.push_back(depObject); } + if (!inserted) + result.push_back(depObject); } delete root; @@ -5907,8 +5913,8 @@ public: //## Select command String sfx = dep.suffix; String command = ccCommand; - if (sfx == "cpp" || sfx == "c++" || sfx == "cc" - || sfx == "CC") + if (sfx == "cpp" || sfx == "cxx" || sfx == "c++" || + sfx == "cc" || sfx == "CC") command = cxxCommand; //## Make paths @@ -5946,6 +5952,7 @@ public: srcName.append(dep.suffix); String srcFullName = parent.resolve(srcName); bool compileMe = false; + //# First we check if the source is newer than the .o if (isNewerThan(srcFullName, destFullName)) { status(" : compile of %s required by %s", @@ -5954,17 +5961,22 @@ public: } else { + //# secondly, we check if any of the included dependencies + //# of the .c/.cpp is newer than the .o for (unsigned int i=0 ; i0) + if (source.size()>0) { - depName.append(srcPath); + depName.append(source); depName.append("/"); } depName.append(dep.files[i]); String depFullName = parent.resolve(depName); - if (isNewerThan(depFullName, destFullName)) + bool depRequires = isNewerThan(depFullName, destFullName); + //trace("%d %s %s\n", depRequires, + // destFullName.c_str(), depFullName.c_str()); + if (depRequires) { status(" : compile of %s required by %s", destFullName.c_str(), depFullName.c_str());