aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/fileinfo.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-19 20:29:24 +0000
committermarha <marha@users.sourceforge.net>2011-01-19 20:29:24 +0000
commitcbe6ed88f01b654241301539d8fa3f6111a0a6de (patch)
tree0fe25b7083dc4cc0c3e162fe18e9d427fcb712a5 /tools/mhmake/src/fileinfo.cpp
parentcdc60fdcddbe5666aac11af34c6c030d4a670b99 (diff)
downloadvcxsrv-cbe6ed88f01b654241301539d8fa3f6111a0a6de.tar.gz
vcxsrv-cbe6ed88f01b654241301539d8fa3f6111a0a6de.tar.bz2
vcxsrv-cbe6ed88f01b654241301539d8fa3f6111a0a6de.zip
Use bison instead of bison++
The += operator should also take the environment variables into account Solved problem when & in redirect operator on command line Solved syntax error when SPACE was follewed by SPACE Removed kdevelop3 project files Enable debug info in debug build on linux Added support for foreach function Fixed dependency problem for implicit rules with extra dependencies Increased gnu make compatibility: allow implicit rules without commands Solved wrong error message when it cannot build a target in mhmake_dbg On windows: when checking the extension of a command: make sure a / does not cause a wrong decision Added safety against recursive implicit rules. Fixed wrong check on failure to open makefiles. Make sure no message is printed when -include is used flex and bison generated files: make sure the #line statements have the correct line numbers for the debugger after having added one line in the beginning of the file after running the flex/bison. Make sure that the variable defined just before an error or message/info macro is defined when the message is generated. mhmake_dbg: print error message when a target cannot be build because the directory of the target does not exist (and no rule is defined for it) Reformatted message/info macro output Also print makefile and line number when using error and message macro Solved crash in mhmake_dbg when -C is specified on the command line Solved problem in macro expansion when 2 patsubst inside each other addprefix should not give an error when done on an empty string Use comspec when echo is followed by a pipe character (piping is not supported by the echo internal command of mhmake) Solved possible stack curruption (there was little chance that this was occuring)
Diffstat (limited to 'tools/mhmake/src/fileinfo.cpp')
-rw-r--r--tools/mhmake/src/fileinfo.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/mhmake/src/fileinfo.cpp b/tools/mhmake/src/fileinfo.cpp
index 7174c49a4..5ef044e41 100644
--- a/tools/mhmake/src/fileinfo.cpp
+++ b/tools/mhmake/src/fileinfo.cpp
@@ -23,7 +23,7 @@
#include "fileinfo.h"
#include "rule.h"
#include "util.h"
-#include "mhmakeparser.h"
+#include "mhmakefileparser.h"
#ifndef S_ISDIR
#define S_ISDIR(val) ((val)&_S_IFDIR)
@@ -242,13 +242,16 @@ string &NormalizePathName(string &Name)
while ((pPtr[0]=='\\' || pPtr[0]=='/') && pPtr[1]=='.' && pPtr[2]=='.')
{
pLastSlash--;
- while (*pLastSlash!='\\' && *pLastSlash!='/') pLastSlash--;
- if (pLastSlash<pBeg)
- pLastSlash=pBeg; // This is a fault in the file name, just put it back at the beginning
+ while (pLastSlash>pBeg && *pLastSlash!='\\' && *pLastSlash!='/') pLastSlash--; // Be dure to not go further then the beginning of the file name
pPtr+=3;
}
if (pLastSlash)
+ {
+ if (pLastSlash<pBeg)
+ pWr=(char*)pBeg;
+ else
pWr=(char*)pLastSlash;
+ }
}
else
{