summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1df3a36)
raw | patch | inline | side by side (parent: 1df3a36)
author | ishmal <ishmal@users.sourceforge.net> | |
Sat, 18 Nov 2006 02:06:29 +0000 (02:06 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Sat, 18 Nov 2006 02:06:29 +0000 (02:06 +0000) |
build.xml | patch | blob | history | |
buildtool.cpp | patch | blob | history |
diff --git a/build.xml b/build.xml
index 76ab1f66d83fda9a4d1260940a781e398e368885..e393c994894bc18ec1e4ba5fe25ffafbacfe7950 100644 (file)
--- a/build.xml
+++ b/build.xml
<target name="init">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
+ <mkdir dir="${dist}"/>
<makefile file="config.h">
#ifndef _CONFIG_H_
#define _CONFIG_H_
<exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
</fileset>
<flags>
- -Wall -O3
+ -Wall -g -O3
-mms-bitfields
</flags>
<defines>
diff --git a/buildtool.cpp b/buildtool.cpp
index 97c5a179d2d3f3631b7c803c31b02f31bf80d6c8..eba0dc865cc174a56da91c1b5c027f4458893876 100644 (file)
--- a/buildtool.cpp
+++ b/buildtool.cpp
struct stat finfo;
String nativeDir = getNativePath(dirname);
char *cnative = (char *) nativeDir.c_str();
- if (stat(dirname.c_str(), &finfo)==0)
+ if (stat(cnative, &finfo)==0)
{
if (!S_ISDIR(finfo.st_mode))
{
//## 2: pull off the last path segment, if any,
//## to make the dir 'above' this one, if necessary
unsigned int pos = dirname.find_last_of('/');
- if (pos != dirname.npos)
+ if (pos>0 && pos != dirname.npos)
{
String subpath = dirname.substr(0, pos);
+ //A letter root (c:) ?
if (!createDirectory(subpath))
return false;
}
//## 3: now make
if (mkdir(cnative)<0)
{
- error("cannot make directory %s", cnative);
+ error("cannot make directory '%s'", cnative);
return false;
}
error("<mkdir> requires 'dir=\"dirname\"' attribute");
return false;
}
- //trace("dirname:%s", dirName.c_str());
+ trace("dirname:%s", dirName.c_str());
return true;
}