Skip to content

how to pass a target:targetfile() to a configfile? #5685

Closed Answered by star-hengxing
Freed-Wu asked this question in Q&A
Discussion options

You must be logged in to vote
on_config(function (target)
    target:add("configfiles", "rime.tmux.in")
    target:set("configvar", "targetfile", target:targetfile())
end)

function _instance:filename()
-- no target file?
if self:is_object() or self:is_phony() or self:is_headeronly() or self:is_moduleonly() then
return
end
-- make the target file name and attempt to use the format of linker first
local targetkind = self:targetkind()
local filename = self:get("filename")
if not filename then
local prefixname = self:get("prefixname")
local suffixname = self:get("suffixname")
local e…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Freed-Wu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants