Skip to content

Commit

Permalink
make-build.tscript: Lets see if we can make a simpler build script wi…
Browse files Browse the repository at this point in the history
…th minitscript / 6
  • Loading branch information
andreasdr committed Jan 7, 2025
1 parent d6833bd commit 35a1ff5
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions make-build.tscript
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function: buildLibrary($name, $ldFlags, $files)
$commands = []
$compilationUnits = ""
forEach($file in $files)
#
$fileObjectPath = filesystem.getPathName($file)

# create file object path
Expand Down Expand Up @@ -161,6 +162,15 @@ function: buildExecutables($ldFlags, $files)
# compile each executable
$commands = []
forEach($file in $files)
#
$sourceFile = $file

#
if ($file->startsWith("src/") == true)
# FIXME: $file->substring("src/"->getSize()) does not work here!
$file = $file->substring(String("src/")->getSize())
end

$fileObjectPath = filesystem.getPathName($file)

# create file object path
Expand All @@ -173,10 +183,10 @@ function: buildExecutables($ldFlags, $files)
#
$timeStampFile = 0
$timeStampCompilationUnit = 0;
if (filesystem.exists($file) == true)
if (filesystem.exists($sourceFile) == true)
$timeStampFile = filesystem.getFileTimeStamp(
filesystem.getPathName($file),
filesystem.getFileName($file)
filesystem.getPathName($sourceFile),
filesystem.getFileName($sourceFile)
)
end
if (filesystem.exists($executableFile) == true)
Expand All @@ -202,7 +212,7 @@ function: buildExecutables($ldFlags, $files)
"-o " +
$executableFile +
" " +
$file +
$sourceFile +
" " +
$ldFlags
console.printLine($command)
Expand Down

0 comments on commit 35a1ff5

Please sign in to comment.