- 论坛徽章:
- 0
|
引用shell变量要用两个美元符号$$。
#
# Makefile
#
.PHONE: all
all:
@echo "Creating so files"
-@rm -rf demo
-@mkdir demo
-@cp -rf /usr/lib/libXt*.so demo
-@for i in $$(find ./demo -name libX*.so); do echo $$i; done
|
运行结果是:
mymtom@fc6:src/csdn/misc$ make
Creating so files
./demo/libXtst.so
./demo/libXt.so
至于楼主遇到的问题,GNU MAKE有个-j参数也许有用,可以试试make --jobs=1或make -j1
-j [jobs], --jobs[=jobs]
Specifies the number of jobs (commands) to run simultaneously. If
there is more than one -j option, the last one is effective. If
the -j option is given without an argument, make will not limit
the number of jobs that can run simultaneously. |
|