mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
Rename C sources dir to c_code.
This commit is contained in:
@@ -17,8 +17,8 @@ REM call the compiler:
|
||||
# var linkCmd = ""
|
||||
# for ff in items(c.cfiles[winIndex][cpuIndex]):
|
||||
# let f = ff.toWin
|
||||
ECHO %CC% %COMP_FLAGS% -Inimcache -c ?{f} -o ?{changeFileExt(f, "o")}
|
||||
%CC% %COMP_FLAGS% -Inimcache -c ?{f} -o ?{changeFileExt(f, "o")}
|
||||
ECHO %CC% %COMP_FLAGS% -Ic_code -c ?{f} -o ?{changeFileExt(f, "o")}
|
||||
%CC% %COMP_FLAGS% -Ic_code -c ?{f} -o ?{changeFileExt(f, "o")}
|
||||
# linkCmd.add(" " & changeFileExt(f, "o"))
|
||||
# end for
|
||||
|
||||
|
||||
@@ -128,8 +128,8 @@ case $myos in
|
||||
# var linkCmd = ""
|
||||
# for ff in items(c.cfiles[osA][cpuA]):
|
||||
# let f = ff.toUnix
|
||||
echo "$CC $COMP_FLAGS -Inimcache -c ?{f} -o ?{changeFileExt(f, "o")}"
|
||||
$CC $COMP_FLAGS -Inimcache -c ?{f} -o ?{changeFileExt(f, "o")}
|
||||
echo "$CC $COMP_FLAGS -Ic_code -c ?{f} -o ?{changeFileExt(f, "o")}"
|
||||
$CC $COMP_FLAGS -Ic_code -c ?{f} -o ?{changeFileExt(f, "o")}
|
||||
# add(linkCmd, " \\\n" & changeFileExt(f, "o"))
|
||||
# end for
|
||||
echo "$LINKER -o ?{"$binDir/" & toLower(c.name)} ?linkCmd $LINK_FLAGS"
|
||||
|
||||
@@ -392,7 +392,7 @@ proc readCFiles(c: var TConfigData, osA, cpuA: int) =
|
||||
quit("Cannot open: " & f)
|
||||
|
||||
proc buildDir(os, cpu: int): string =
|
||||
return "nimcache" / ($os & "_" & $cpu)
|
||||
return "c_code" / ($os & "_" & $cpu)
|
||||
|
||||
proc getOutputDir(c: var TConfigData): string =
|
||||
if c.outdir.len > 0: c.outdir else: "build"
|
||||
@@ -432,11 +432,11 @@ proc writeInstallScripts(c: var TConfigData) =
|
||||
writeFile(deinstallShFile, generateDeinstallScript(c), "\10")
|
||||
|
||||
proc srcdist(c: var TConfigData) =
|
||||
if not existsDir(getOutputDir(c) / "nimcache"):
|
||||
createDir(getOutputDir(c) / "nimcache")
|
||||
if not existsDir(getOutputDir(c) / "c_code"):
|
||||
createDir(getOutputDir(c) / "c_code")
|
||||
for x in walkFiles(c.libpath / "lib/*.h"):
|
||||
echo(getOutputDir(c) / "nimcache" / extractFilename(x))
|
||||
copyFile(dest=getOutputDir(c) / "nimcache" / extractFilename(x), source=x)
|
||||
echo(getOutputDir(c) / "c_code" / extractFilename(x))
|
||||
copyFile(dest=getOutputDir(c) / "c_code" / extractFilename(x), source=x)
|
||||
var winIndex = -1
|
||||
var intel32Index = -1
|
||||
var intel64Index = -1
|
||||
|
||||
Reference in New Issue
Block a user