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

make clean 在Ubuntu系统中不能正确删除文件 #425

Closed
windrosecn opened this issue Aug 25, 2022 · 0 comments
Closed

make clean 在Ubuntu系统中不能正确删除文件 #425

windrosecn opened this issue Aug 25, 2022 · 0 comments

Comments

@windrosecn
Copy link

查了一下原因,应该是用了{},这是bash之类shell才有的特性。Makefile默认的shell是/bin/sh,然而ubuntu中/bin/sh默认指向了dash。在Makefile最前面加入 SHELL := /bin/bash 之后,make clean 正确删除了列出的文件。

参考: https://askubuntu.com/questions/1395676/using-braces-in-rm-in-makefiles
https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html#Choosing-the-Shell

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

1 participant