Merge branch 'devel' into gogc

This commit is contained in:
Stefan Talpalaru 2015-06-15 08:44:02 +02:00
commit bdac85f2cf
212 changed files with 8304 additions and 7492 deletions

View file

@ -54,6 +54,7 @@ type # please make sure we have under 32 options
optSkipUserConfigFile, # skip the users's config file
optSkipParentConfigFiles, # skip parent dir's config files
optNoMain, # do not generate a "main" proc
optUseColors, # use colors for hints, warnings, and errors
optThreads, # support for multi-threading
optStdout, # output to stdout
optThreadAnalysis, # thread analysis pass
@ -145,6 +146,7 @@ const
var
gConfigVars* = newStringTable(modeStyleInsensitive)
gDllOverrides = newStringTable(modeCaseInsensitive)
gPrefixDir* = "" # Overrides the default prefix dir in getPrefixDir proc.
libpath* = ""
gProjectName* = "" # holds a name like 'nimrod'
gProjectPath* = "" # holds a path like /home/alice/projects/nimrod/compiler/
@ -183,8 +185,13 @@ proc getOutFile*(filename, ext: string): string =
else: result = changeFileExt(filename, ext)
proc getPrefixDir*(): string =
## gets the application directory
result = splitPath(getAppDir()).head
## Gets the prefix dir, usually the parent directory where the binary resides.
##
## This is overrided by some tools (namely nimsuggest) via the ``gPrefixDir``
## global.
if gPrefixDir != "": result = gPrefixDir
else:
result = splitPath(getAppDir()).head
proc canonicalizePath*(path: string): string =
when not FileSystemCaseSensitive: result = path.expandFilename.toLower