summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 65af4cd)
raw | patch | inline | side by side (parent: 65af4cd)
author | ishmal <ishmal@users.sourceforge.net> | |
Sat, 18 Nov 2006 21:01:31 +0000 (21:01 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Sat, 18 Nov 2006 21:01:31 +0000 (21:01 +0000) |
buildtool.cpp | patch | blob | history |
diff --git a/buildtool.cpp b/buildtool.cpp
index 90ccd69668671e6cbc2d9e5c1191f1a330bf10fd..25636f1547c87a2f97083c6c2f720dd2c42e08f9 100644 (file)
--- a/buildtool.cpp
+++ b/buildtool.cpp
struct stat finfo;
String nativeDir = getNativePath(dirname);
char *cnative = (char *) nativeDir.c_str();
+#ifdef __WIN32__
+ if (strlen(cnative)==2 && cnative[1]==':')
+ return true;
+#endif
if (stat(cnative, &finfo)==0)
{
if (!S_ISDIR(finfo.st_mode))
{
if (fileName.size()>0)
{
- status(" : %s", fileName.c_str());
+ status(" : %s to %s",
+ fileName.c_str(), toFileName.c_str());
String fullSource = parent.resolve(fileName);
String fullDest = parent.resolve(toFileName);
//trace("copy %s to file %s", fullSource.c_str(),
return false;
String fileSetDir = fileSet.getDirectory();
+ status(" : %s to %s",
+ fileSetDir.c_str(), toDirName.c_str());
+
int nrFiles = 0;
- status(" : %s", fileSetDir.c_str());
for (unsigned int i=0 ; i<fileSet.size() ; i++)
{
String fileName = fileSet[i];
{
//For file->dir we want only the basename of
//the source appended to the dest dir
- status(" : %s", fileName.c_str());
+ status(" : %s to %s",
+ fileName.c_str(), toDirName.c_str());
String baseName = fileName;
unsigned int pos = baseName.find_last_of('/');
if (pos!=baseName.npos && pos<baseName.size()-1)
continue;
//trace("key:'%s' val:'%s'", key.c_str(), val.c_str());
+ //See if we wanted to overload this property
+ std::map<String, String>::iterator iter =
+ specifiedProperties.find(key);
+ if (iter!=specifiedProperties.end())
+ {
+ val = iter->second;
+ status("overloading property '%s' = '%s'",
+ key.c_str(), val.c_str());
+ }
properties[key] = val;
}
fclose(f);
if (val.size() > 0)
{
properties[attrVal] = val;
- continue;
}
- if (!getAttribute(elem, "location", val))
- return false;
- if (val.size() > 0)
+ else
{
- //TODO: process a path relative to build.xml
+ if (!getAttribute(elem, "location", val))
+ return false;
+ if (val.size() > 0)
+ {
+ properties[attrVal] = val;
+ }
+ }
+ //See if we wanted to overload this property
+ std::map<String, String>::iterator iter =
+ specifiedProperties.find(attrVal);
+ if (iter != specifiedProperties.end())
+ {
+ val = iter->second;
+ status("overloading property '%s' = '%s'",
+ attrName.c_str(), val.c_str());
properties[attrVal] = val;
- continue;
}
}
else if (attrName == "file")
if (!parseFile())
return false;
- //Overload properties
- std::map<String, String>::iterator iter;
- for (iter = specifiedProperties.begin() ;
- iter!=specifiedProperties.end() ; iter++)
- {
- String name = iter->first;
- String value = iter->second;
- if (properties.find(name) == properties.end())
- {
- error("Overloading property:%s not found", name.c_str());
- return false;
- }
- properties[name] = value;
- }
-
if (!execute())
return false;
+
return true;
}