From: ishmal Date: Fri, 2 May 2008 15:32:07 +0000 (+0000) Subject: Add new property to , refreshCache, to force recomp X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2c472af093c1b2f36497c25891fa7910c16acf7d;p=inkscape.git Add new property to , refreshCache, to force recomp --- diff --git a/build.xml b/build.xml index 91b6eb007..8d032e22c 100644 --- a/build.xml +++ b/build.xml @@ -7,7 +7,7 @@ * Bob Jamison * Others * - * Copyright (C) 2006-2007 Inkscape.org + * Copyright (C) 2006-2008 Inkscape.org * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -42,26 +42,28 @@ - - - - - + + + + + - - - + + + + + + continueOnError="false" + refreshCache="${refresh}"> diff --git a/buildtool.cpp b/buildtool.cpp index ead2e8da0..9ee051f1a 100644 --- a/buildtool.cpp +++ b/buildtool.cpp @@ -38,7 +38,7 @@ * */ -#define BUILDTOOL_VERSION "BuildTool v0.8.2, 2007-2008 Bob Jamison" +#define BUILDTOOL_VERSION "BuildTool v0.8.3" #include #include @@ -3919,7 +3919,7 @@ bool MakeBase::listFiles(MakeBase &propRef, FileSet &fileSet) { for (iter = includes.begin() ; iter != includes.end() ; iter++) { - String pattern = *iter; + String &pattern = *iter; std::vector::iterator siter; for (siter = fileList.begin() ; siter != fileList.end() ; siter++) { @@ -3942,7 +3942,7 @@ bool MakeBase::listFiles(MakeBase &propRef, FileSet &fileSet) std::vector::iterator siter; for (siter = excludes.begin() ; siter != excludes.end() ; siter++) { - String pattern = *siter; + String &pattern = *siter; if (regexMatch(s, pattern)) { //trace("EXCLUDED:%s", s.c_str()); @@ -5671,8 +5671,8 @@ bool DepTool::scanFile(const String &fname, FileRec *frec) String buf; while (!feof(f)) { - int len = fread(readBuf, 1, readBufSize, f); - readBuf[len] = '\0'; + int nrbytes = fread(readBuf, 1, readBufSize, f); + readBuf[nrbytes] = '\0'; buf.append(readBuf); } fclose(f); @@ -5791,7 +5791,7 @@ bool DepTool::generateDependencies() FileRec *include = iter->second; if (include->type == FileRec::CFILE) { - String cFileName = iter->first; + //String cFileName = iter->first; FileRec *ofile = new FileRec(FileRec::OFILE); ofile->path = include->path; ofile->baseName = include->baseName; @@ -6171,6 +6171,7 @@ public: defines = ""; includes = ""; continueOnError = false; + refreshCache = false; fileSet.clear(); excludeInc.clear(); } @@ -6197,9 +6198,9 @@ public: FILE *f = NULL; f = fopen("compile.lst", "w"); - bool refreshCache = false; + //refreshCache is probably false here, unless specified otherwise String fullName = parent.resolve("build.dep"); - if (isNewerThan(parent.getURI().getPath(), fullName)) + if (refreshCache || isNewerThan(parent.getURI().getPath(), fullName)) { taskstatus("regenerating C/C++ dependency cache"); refreshCache = true; @@ -6426,6 +6427,10 @@ public: return false; if (s=="true" || s=="yes") continueOnError = true; + if (!parent.getAttribute(elem, "refreshCache", s)) + return false; + if (s=="true" || s=="yes") + refreshCache = true; std::vector children = elem->getChildren(); for (unsigned int i=0 ; i