Clean up crc module

Use better names, remove quite a bit of dead code.
Change `><` to a name that's actually descriptive.
This commit is contained in:
Flaviu Tamas 2015-05-23 12:59:15 -04:00
commit 188bba2b3c
5 changed files with 30 additions and 76 deletions

View file

@ -572,13 +572,13 @@ proc getCompileCFileCmd*(cfilename: string, isExternal = false): string =
"nim", quoteShell(getPrefixDir()),
"lib", quoteShell(libpath)])
proc footprint(filename: string): TCrc32 =
# note, '><' further modifies a crc value with a string.
result = crcFromFile(filename) ><
platform.OS[targetOS].name ><
platform.CPU[targetCPU].name ><
extccomp.CC[extccomp.cCompiler].name ><
getCompileCFileCmd(filename, true)
proc footprint(filename: string): SecureHash =
result = secureHash(
$secureHashFile(filename) &
platform.OS[targetOS].name &
platform.CPU[targetCPU].name &
extccomp.CC[extccomp.cCompiler].name &
getCompileCFileCmd(filename, true))
proc externalFileChanged(filename: string): bool =
if gCmd notin {cmdCompileToC, cmdCompileToCpp, cmdCompileToOC, cmdCompileToLLVM}: