summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3a17b0c)
raw | patch | inline | side by side (parent: 3a17b0c)
author | ishmal <ishmal@users.sourceforge.net> | |
Fri, 2 May 2008 15:32:07 +0000 (15:32 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Fri, 2 May 2008 15:32:07 +0000 (15:32 +0000) |
build.xml | patch | blob | history | |
buildtool.cpp | patch | blob | history |
diff --git a/build.xml b/build.xml
index 91b6eb007693a83aed317c0b3a8e625e3a17c5f9..8d032e22c27f23477d058e85a56eb8fb7435a560 100644 (file)
--- a/build.xml
+++ b/build.xml
* 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
<!-- set global properties for this build -->
<property environment="env"/>
- <property name="version" value="0.46+devel"/>
- <property name="src" location="src"/>
- <property name="lib" location="lib"/>
- <property name="build" location="build"/>
- <property name="dist" location="inkscape"/>
+ <property name="version" value="0.46+devel"/>
+ <property name="src" location="src"/>
+ <property name="lib" location="lib"/>
+ <property name="build" location="build"/>
+ <property name="dist" location="inkscape"/>
<!-- Use these settings for the native compiler -->
<!-- -->
- <property name="arch" value="mingw32-"/>
- <property name="archutil" value=""/>
- <property name="gtk" location="c:/devlibs"/>
+ <property name="arch" value="mingw32-"/>
+ <property name="archutil" value=""/>
+ <property name="gtk" location="c:/devlibs"/>
<!-- -->
<!-- Use these settings for the cross compiler -->
<!--
- <property name="arch" value="i686-pc-mingw32-"/>
- <property name="archutil" value="${arch}"/>
- <property name="gtk" location="/target"/>
+ <property name="arch" value="i686-pc-mingw32-"/>
+ <property name="archutil" value="${arch}"/>
+ <property name="gtk" location="/target"/>
-->
+ <!-- Extra properties -->
+ <property name="refresh" value="false"/>
<!--
<!-- Compile from source to build -->
<cc cc="${arch}gcc" cxx="${arch}g++"
destdir="${build}/obj"
- continueOnError="false">
+ continueOnError="false"
+ refreshCache="${refresh}">
<fileset dir="${src}">
<!-- THINGS TO EXCLUDE -->
<exclude name="2geom/chebyshev.cpp"/>
diff --git a/buildtool.cpp b/buildtool.cpp
index ead2e8da0fb414ba30211202c245d127531b603e..9ee051f1aae903472cd3f146781f195ef5d8019e 100644 (file)
--- a/buildtool.cpp
+++ b/buildtool.cpp
*
*/
-#define BUILDTOOL_VERSION "BuildTool v0.8.2, 2007-2008 Bob Jamison"
+#define BUILDTOOL_VERSION "BuildTool v0.8.3"
#include <stdio.h>
#include <fcntl.h>
{
for (iter = includes.begin() ; iter != includes.end() ; iter++)
{
- String pattern = *iter;
+ String &pattern = *iter;
std::vector<String>::iterator siter;
for (siter = fileList.begin() ; siter != fileList.end() ; siter++)
{
std::vector<String>::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());
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);
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;
defines = "";
includes = "";
continueOnError = false;
+ refreshCache = false;
fileSet.clear();
excludeInc.clear();
}
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;
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<Element *> children = elem->getChildren();
for (unsigned int i=0 ; i<children.size() ; i++)
String defines;
String includes;
bool continueOnError;
+ bool refreshCache;
FileSet fileSet;
FileList excludeInc;