We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
另外,在自定义构建命令时,能不能加入自定义依赖文件,然后在执行时获取当前依赖的文件有哪些,哪些修改了呢?
The text was updated successfully, but these errors were encountered:
你是指哪方面的自定义构建? 基于 on_build还是基于2.1.9的自定义rule构建。。?
on_build
on_build相当于重写整个target构建过程,那么处理依赖也需要完全自己处理。也就没有加入依赖文件这一说,因为都是自己全部控制来自定义的。。
rule的基于文件类型的自定义构建,其实也是一样,构建规则都是自己处理了,需要处理的依赖话,也是自己处理。。
rule
还是你说的只是自定义after_build, on_run这类的其他阶段脚本?
after_build
on_run
Sorry, something went wrong.
就是有没有处理文件修改的接口呢? 比如我on_build里面要处理好几个文件,但是每次只想处理修改过的...
这个是自己的逻辑需求吧,没有直接接口,但是你可以用os.mtime(file)获取当前文件的修改时间戳,用io.load和io.save保存和读取状态,自己维护判断是否被修改了,xmake在build的时候,内部也是这么处理的。。
os.mtime(file)
io.load
io.save
你可以参考下 object.lua里面_is_modified 的实现,就是用了os.mtime接口来判断文件是否被修改。。
_is_modified
os.mtime
No branches or pull requests
另外,在自定义构建命令时,能不能加入自定义依赖文件,然后在执行时获取当前依赖的文件有哪些,哪些修改了呢?
The text was updated successfully, but these errors were encountered: