更新时间:2023-09-26 10:32:28
我不太清楚您要问的是什么,但是使用-f
命令行选项只是指定一个文件-它不会告诉make更改目录.如果要在另一个目录中进行工作,则需要cd
到目录:
I'm not really too clear what you are asking, but using the -f
command line option just specifies a file - it doesn't tell make to change directories. If you want to do the work in another directory, you need to cd
to the directory:
clean:
cd gtest-1.4.0 && $(MAKE) clean
请注意,Makefile
中的每一行都在单独的外壳程序中运行,因此无需将目录改回.
Note that each line in Makefile
runs in a separate shell, so there is no need to change the directory back.