当前位置: 技术问答>linux和unix
makefile中的问题
来源: 互联网 发布时间:2016-06-03
本文导语: 在一个makefile文件中,遇到如下脚本,对“do make -C $$d $@;”中的“$$d $@”不理解,以及“make $@-here”不理解。 请大家帮助。 SUBDIR=xutils xinterf xsequencer xfetcher MAINOBJ=global.o main.o all clean dep crash: for d in ...
在一个makefile文件中,遇到如下脚本,对“do make -C $$d $@;”中的“$$d $@”不理解,以及“make $@-here”不理解。
请大家帮助。
SUBDIR=xutils xinterf xsequencer xfetcher
MAINOBJ=global.o main.o
all clean dep crash:
for d in $(SUBDIR); do make -C $$d $@; done
make $@-here
请大家帮助。
SUBDIR=xutils xinterf xsequencer xfetcher
MAINOBJ=global.o main.o
all clean dep crash:
for d in $(SUBDIR); do make -C $$d $@; done
make $@-here
|
“$@”是脚本文件后跟的参数。如:
Makefile myview.cpp
myview.cpp就代脚本中的“$@”
Makefile myview.cpp
myview.cpp就代脚本中的“$@”
|
4次。
假设
# make all
make -C xutils all
make -C xinterf all
...
...
假设
# make all
make -C xutils all
make -C xinterf all
...
...