Skip to content
New issue

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

xmake 使用上的问题(clean,auto rebuild,os.run) #13

Open
chenyanzz opened this issue Dec 2, 2017 · 2 comments
Open

xmake 使用上的问题(clean,auto rebuild,os.run) #13

chenyanzz opened this issue Dec 2, 2017 · 2 comments

Comments

@chenyanzz
Copy link

  • xmake clean是怎么用的?为什么不会把build目录删除呢?
  • 而且为什么有的时候修改了代码文件再build不会重新编译呢?
  • 建议on_run等等设置的函数执行前在命令行上打印输出(making target xxx)
    并且在-v模式下os.run自定义命令本身显示出来
@waruqi
Copy link
Member

waruqi commented Dec 2, 2017

xmake clean是怎么用的?为什么不会把build目录删除呢?

xmake clean仅用于删除构建过程中xmake生成的各种文件,但不会直接把整个目录删掉,也不会删掉一些生成的配置文件,因为build目录下也许还有其他非xmake创建的文件,或者build被设置到了一个已有文件的目录,如果整个全删,会误删用户的其他重要文件

或者可以使用xmake clean --all删除全部xmake生成的文件,如果这个目录下只有xmake创建的文件,那么会把build也删掉,如果还有其他文件存在,build目录会继续保留。

而且为什么有的时候修改了代码文件再build不会重新编译呢?

理论上修改了,肯定会被编译,如果确实存在问题,最好提供详细信息,我好分析问题,可以给个case,或者能重现的demo或者场景,我好调试下看看,具体什么原因,还有提供下系统版本信息等。。

另外这种问题,最好独立提到xmake git/issues里面去。

建议on_run等等设置的函数执行前在命令行上打印输出(making target xxx)

这种需求,每个用户需求都不同,如果我加了类似的输出,其他用户反而不习惯,也是有可能的,既然都提供了on_run等自定义脚本,可以让用户完全自己控制了,为什么不根据自己的特殊需求,自己往里面加print呢?

target("test")
    on_run(function (target)
         print("makeing target %s", target:name())
    end)

并且在-v模式下os.run自定义命令本身显示出来

你用os.vrun就行了,在-v下会打印自身命令。。

@chenyanzz
Copy link
Author

好的谢谢~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants