我使用Makefiles.
我有一个目标run,它运行构建目标.简化后,它看起来如下:
prog: ....
...
run: prog
./prog
Run Code Online (Sandbox Code Playgroud)
坐下来.我知道这是巧妙的,但不需要起立鼓掌.
现在,我的问题是 - 有没有办法传递参数?以便
make run asdf --> ./prog asdf
make run the dog kicked the cat --> ./prog the dog kicked the cat
Run Code Online (Sandbox Code Playgroud)
谢谢!
在我的makefile中,我有一个变量'NDK_PROJECT_PATH',我的问题是如何在编译时将其打印出来?
我读了Make文件echo显示"$ PATH"字符串,我试过:
@echo $(NDK_PROJECT_PATH)
@echo $(value NDK_PROJECT_PATH)
Run Code Online (Sandbox Code Playgroud)
两个都给了我
"build-local.mk:102: *** missing separator. Stop."
Run Code Online (Sandbox Code Playgroud)
任何人都知道为什么它不适合我?
我想了解'gmake'和'make'之间的区别?
在我的linux盒子上,它们完全相同:
% gmake --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
% make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Run Code Online (Sandbox Code Playgroud)
我猜这在所有平台上都不一样?是否有充分的理由使用其中一个?
为什么有这两个名字有一些历史意义吗?