diff --git a/first/ackbuilder.lua b/first/ackbuilder.lua index f66bcee1d..81e86b528 100644 --- a/first/ackbuilder.lua +++ b/first/ackbuilder.lua @@ -729,9 +729,10 @@ definerule("simplerule", definerule("installable", { map = { type="targets", default={} }, + deps = { type="targets", default={} }, }, function (e) - local deps = {} + local deps = filenamesof(e.deps) local commands = {} local srcs = {} local outs = {} diff --git a/first/build.lua b/first/build.lua index 3240f9f1a..85df519a8 100644 --- a/first/build.lua +++ b/first/build.lua @@ -226,6 +226,7 @@ definerule("cprogram", }, function (e) local libs = matching(filenamesof(e.deps), "%.a$") + local srcs = {} if (#e.srcs > 0) then for _, f in pairs( matching( @@ -240,7 +241,7 @@ definerule("cprogram", "%.a$" ) ) do - libs[#libs+1] = f + srcs[#srcs+1] = f end end @@ -248,7 +249,7 @@ definerule("cprogram", name = e.name, cwd = e.cwd, deps = e.deps, - ins = libs, + ins = { srcs, libs }, outleaves = { e.name }, commands = e.commands, } diff --git a/lang/basic/lib/error.c b/lang/basic/lib/error.c index b2d893adc..becc69d7a 100644 --- a/lang/basic/lib/error.c +++ b/lang/basic/lib/error.c @@ -1,6 +1,9 @@ #include #include +int _errsym; +int _erlsym; + /* error takes an error value in the range of 0-255 */ /* and generates a trap */ @@ -52,9 +55,6 @@ char *errortable[255]={ error(index) int index; { - extern int _errsym; - extern int _erlsym; - _setline(); if( index<0 || index >40 ) printf("LINE %d:ERROR %d: Unprintable error\n",_erlsym,index);