Allow headers which aren't .h files.
This commit is contained in:
parent
60edd08390
commit
f70c12fad5
|
@ -54,9 +54,8 @@ definerule("cfile",
|
||||||
end
|
end
|
||||||
|
|
||||||
local hsrcs = filenamesof(e.srcs, "%.h$")
|
local hsrcs = filenamesof(e.srcs, "%.h$")
|
||||||
local hdeps = selectof(e.deps, "%.h$")
|
|
||||||
local hdrpaths = {}
|
local hdrpaths = {}
|
||||||
for _, t in pairs(hdeps) do
|
for _, t in pairs(e.deps) do
|
||||||
hdrpaths[#hdrpaths+1] = "-I"..t.dir
|
hdrpaths[#hdrpaths+1] = "-I"..t.dir
|
||||||
end
|
end
|
||||||
hdrpaths = uniquify(hdrpaths)
|
hdrpaths = uniquify(hdrpaths)
|
||||||
|
@ -128,9 +127,6 @@ definerule("clibrary",
|
||||||
},
|
},
|
||||||
function (e)
|
function (e)
|
||||||
local csrcs = filenamesof(e.srcs, "%.c$")
|
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$")
|
local hsrcs = filenamesof(e.srcs, "%.h$")
|
||||||
|
|
||||||
|
@ -149,7 +145,7 @@ definerule("clibrary",
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
local hdrs = filenamesof(e.hdrs, "%.h$")
|
local hdrs = filenamesof(e.hdrs)
|
||||||
|
|
||||||
local commands = {}
|
local commands = {}
|
||||||
for _, s in ipairs(e.commands) do
|
for _, s in ipairs(e.commands) do
|
||||||
|
|
Loading…
Reference in a new issue