From f70c12fad52007c147190a9f37cc9374142b88e8 Mon Sep 17 00:00:00 2001 From: David Given Date: Thu, 30 Jun 2016 13:27:47 +0200 Subject: [PATCH] Allow headers which aren't .h files. --- first/build.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/first/build.lua b/first/build.lua index 762d279d0..1501500c8 100644 --- a/first/build.lua +++ b/first/build.lua @@ -54,9 +54,8 @@ definerule("cfile", end local hsrcs = filenamesof(e.srcs, "%.h$") - local hdeps = selectof(e.deps, "%.h$") local hdrpaths = {} - for _, t in pairs(hdeps) do + for _, t in pairs(e.deps) do hdrpaths[#hdrpaths+1] = "-I"..t.dir end hdrpaths = uniquify(hdrpaths) @@ -128,9 +127,6 @@ definerule("clibrary", }, function (e) local csrcs = filenamesof(e.srcs, "%.c$") - if (#csrcs < 1) then - error("you must supply at least one C source file") - end local hsrcs = filenamesof(e.srcs, "%.h$") @@ -149,7 +145,7 @@ definerule("clibrary", } end - local hdrs = filenamesof(e.hdrs, "%.h$") + local hdrs = filenamesof(e.hdrs) local commands = {} for _, s in ipairs(e.commands) do