make文件中需要帮助

Jee*_*tel 0 c linux makefile

我只想实现以下声明

"if bin folder is not available in current directory then make new bin folder & 
if bin folder is available then its do nothing" 
Run Code Online (Sandbox Code Playgroud)

任何人都可以告诉我我该怎么做?

编辑:我不想要任何错误

mkdir: cannot create directory `./bin `./bin': File exists
Run Code Online (Sandbox Code Playgroud)

Pau*_*l R 5

你可以这样做:

-mkdir ./bin
Run Code Online (Sandbox Code Playgroud)

如果./bin已经存在,则将mkdir以静默方式失败,否则将创建该目录.

  • @ Mr.32:注意行尾的`-`,很重要. (3认同)