diff options
| author | ruki <[email protected]> | 2022-05-22 19:34:26 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-05-22 19:34:26 +0800 |
| commit | bf34cd08b63a0a1c8314ca8b81c7fe04cc8531f1 (patch) | |
| tree | 300c07aa1807dbefabdbb3fa01dc3e3db86bf1c3 | |
| parent | e96506ac537795a441e27338f485564fc11fdf5c (diff) | |
improve more rules
| -rw-r--r-- | xmake/rules/capnproto/capnp.lua | 10 | ||||
| -rw-r--r-- | xmake/rules/platform/linux/bpf/xmake.lua | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/xmake/rules/capnproto/capnp.lua b/xmake/rules/capnproto/capnp.lua index 5b37b0956..747608755 100644 --- a/xmake/rules/capnproto/capnp.lua +++ b/xmake/rules/capnproto/capnp.lua @@ -70,15 +70,15 @@ function buildcmd(target, batchcmds, sourcefile_capnp, opt) local includes = capnproto:get("sysincludedirs") local argv = {"compile"} for _, value in ipairs(includes) do - table.insert(argv, "-I" .. value) + table.insert(argv, path(value, function (p) return "-I" .. p end)) end - table.insert(argv, "-I" .. (prefixdir and prefixdir or path.directory(sourcefile_capnp))) + table.insert(argv, path(prefixdir and prefixdir or path.directory(sourcefile_capnp), function (p) return "-I" .. p end)) if prefixdir then - table.insert(argv, "--src-prefix=" .. prefixdir) + table.insert(argv, path(prefixdir, function (p) return "--src-prefix=" .. p end)) end table.insert(argv, "-o") - table.insert(argv, "c++:" .. sourcefile_dir) - table.insert(argv, sourcefile_capnp) + table.insert(argv, path(sourcefile_dir, function (p) return "c++:" .. p end)) + table.insert(argv, path(sourcefile_capnp)) batchcmds:vrunv(capnp, argv) local configs = {includedirs = sourcefile_dir, languages = "c++14"} if target:is_plat("windows") then diff --git a/xmake/rules/platform/linux/bpf/xmake.lua b/xmake/rules/platform/linux/bpf/xmake.lua index d78693708..d4a48e70c 100644 --- a/xmake/rules/platform/linux/bpf/xmake.lua +++ b/xmake/rules/platform/linux/bpf/xmake.lua @@ -50,7 +50,7 @@ rule("platform.linux.bpf") batchcmds:mkdir(path.directory(objectfile)) batchcmds:compile(sourcefile, objectfile, {configs = {force = {cxflags = {"-target bpf", "-g", "-O2"}}, defines = targetarch}}) batchcmds:mkdir(path.directory(headerfile)) - batchcmds:execv("bpftool", {"gen", "skeleton", objectfile}, {stdout = headerfile}) + batchcmds:execv("bpftool", {"gen", "skeleton", path(objectfile)}, {stdout = headerfile}) batchcmds:add_depfiles(sourcefile) batchcmds:set_depmtime(os.mtime(headerfile)) batchcmds:set_depcache(target:dependfile(headerfile)) |
