下面的Makefile规则 -
SUBDIRS = foo bar baz
subdirs:
for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir; \
done
中有选项-C。有人能告诉我这个选项的功能是什么吗?
谢谢!
答案 0 :(得分:0)
-C dir, --directory=dir
Change to directory dir before reading the makefiles or doing anything else. If multiple -C options are specified, each is interpreted relative to the previous one: -C / -C etc is
equivalent to -C /etc. This is typically used with recursive invocations of make.