1. $$得到目标字符串.
测试用例(Makefile文件内容):
SUBDIRS = dir1 dir2 dir3
all:
for n in $(SUBDIRS); do echo $$n; done
for n in $(SUBDIRS); do cd $$n && echo `pwd` && cd ../; done
本文通过一个具体的Makefile示例,展示了如何遍历指定的子目录,并在每个目录中执行命令来获取当前工作目录的绝对路径。这个过程利用了Makefile的特性,包括使用变量和循环结构。
1. $$得到目标字符串.
测试用例(Makefile文件内容):
SUBDIRS = dir1 dir2 dir3
all:
for n in $(SUBDIRS); do echo $$n; done
for n in $(SUBDIRS); do cd $$n && echo `pwd` && cd ../; done
6557

被折叠的 条评论
为什么被折叠?