Replies: 7 comments 8 replies
-
同理,rule 又该如何解决这个问题 |
Beta Was this translation helpful? Give feedback.
-
我有一个可能的解决办法,使用 rule 方案。 xmake 在编译时记录目标文件的的 mtime,下载编译是如果目标文件的 mtime 和源文件mtime 不匹配则触发编译 |
Beta Was this translation helpful? Give feedback.
-
https://github.com/xmake-io/xmake/blob/dev/xmake%2Frules%2Fc51%2Fxmake.lua#L34-L43 |
Beta Was this translation helpful? Give feedback.
-
整个逻辑非常简单,用 makefile 描述如下 file.c: %.a
生成 c 文件
%.a: %. data
生成 .a 文件 和xmake现在做的事是一样的。只是需要控制生成的文件和需要链接的目标文件/组合 |
Beta Was this translation helpful? Give feedback.
-
或许可以尝试 set_kind("object") 然后修改 target:objectfiles() |
Beta Was this translation helpful? Give feedback.
-
类似 bin2c? 参考下 https://github.com/xmake-io/xmake/blob/dev/xmake/rules/utils/bin2c/xmake.lua |
Beta Was this translation helpful? Give feedback.
-
还是自己写函数处理吧,给我整的头都大了 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
我需要将一个资源文件嵌入到 c 中。
目前是在主target 中,利用 before_build 和 before_link 函数分别生成目标文件和链接静态文件
问题是,如果我的资源文件发生变动,xmake 无法检测到。
如何让 xmake 检测资源文件的变动?
还有如果我想创建一个新的 target 并覆盖其 on_build 和 on_link。
又如何解决上述的问题
Beta Was this translation helpful? Give feedback.
All reactions