make嵌套调用
来源:互联网 发布:编程语言实现模式 代码 编辑:程序博客网 时间:2024/05/22 16:06
创建目录makefile_example以及三个子目录a,b,c
~/makefile_example$ ls
a b c Makefile
其中makefile_example下的Makefile文件内容如下:
#** now you should to know why do we put two $ before entry **
#** because entry is a var in shell, while $$ stands for $ in makefile **
#** just like \\ stands for \ in c, $$entry will be translated into $entry in shell **
SUBDIRS := `ls .`
CURDIR := `pwd`
.PHONY : all clean
all :
@for entry in $(SUBDIRS);\
do\
if test -d $(CURDIR)/$$entry; then\
cd $$entry;\
make -w;\
cd ../;\
fi;\
done
clean :
@for entry in $(SUBDIRS);\
do\
if test -d $(CURDIR)/$$entry; then\
cd $$entry;\
make -w clean;\
cd ../;\
fi;\
done
a,b,c三个目录下的Makefile内容如下:
.PHONY : all clean
all :
@echo `pwd` "make"
clean :
@echo `pwd` "clean"
然后分别在makefile_example目录下执行make和make clean看效果吧:
~/makefile_example$ make
~/makefile_example$ make clean
- make嵌套调用
- $(MAKE) 嵌套执行make
- 嵌套执行make
- 嵌套执行make
- 嵌套执行make
- 嵌套执行MAKE $(MAKE) -C subdir
- 嵌套方法调用
- JS嵌套调用
- smarty 文件嵌套调用
- buffalo 嵌套调用
- Dll嵌套调用
- C++嵌套调用函数
- Makfile的嵌套调用
- activity嵌套调用问题
- JAVA中的嵌套调用
- Spring AOP嵌套调用
- Dll嵌套调用
- dos嵌套调用
- FlashBuilder中Flex/AIR SDK 更新方法
- 设计模式六大原则(4):接口隔离原则
- hdu 2426 Interesting Housing Problem
- Travelling Tom
- 在OGRE中使用Cal3D
- make嵌套调用
- linux用户所在组修改
- 新时尚Windows8开发(6):资源 & 本地化
- spring mvc 处理流程图
- 正则表达式匹配规则
- poj 1797 Heavy Transportation 用的dp的思想
- Flex通用克隆(clone)方法
- typedef 函数指针较好的示例
- linux获取目录下文件大小的问题