From 650cda22ac9ef9a9073c06fe362634d8ed3c1bfb Mon Sep 17 00:00:00 2001 From: lemon-sherbet Date: Fri, 16 Nov 2018 16:54:37 +0100 Subject: [PATCH] shidding and fardding --- lcmk.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lcmk.lua b/lcmk.lua index b03519d..6d2c7d4 100644 --- a/lcmk.lua +++ b/lcmk.lua @@ -34,7 +34,7 @@ end function buildobj(o) local cmd = ("%s %s %s -c -o %s %s"):format(CC, CFLAGS, LINK, o.out, o.src) print("BUILDING OBJECT:\n"..cmd) - os.execute(cmd) + return os.execute(cmd) end function buildprog() @@ -44,7 +44,7 @@ function buildprog() end local cmd = ("%s %s %s -o %s %s"):format(CC, CFLAGS, LINK, PROG, objs) print("BUILDING PROGRAM:\n"..cmd) - os.execute(cmd) + return os.execute(cmd) end buildf() @@ -181,7 +181,10 @@ if _SHOWBUILD then end for _,o in ipairs(tobuild) do - buildobj(o) + if not buildobj(o) then + print("ERROR") + os.exit(1) + end end -buildprog() +return buildprog()