Hi Pan,
On 8/17/2009 12:22 AM, Pan ruochen wrote:
Hi All,
Here is my Makefile:
--------------------------------------------------------
PHONY: api FW
all: api FW
api:
@make -C DIR1 -n api
@make -C DIR2 -n api
FW:
@make -C DIR1 -n clean depend all
@make -C DIR2 -n clean depend all
--------------------------------------------------------
I want to expand all the commands excuted by make. But there are some
problems since the target `clean' is not really executed.
If the immediate object files and the final target file (ELF
executable) are present, make checks nothing has been changed. So
make just
prints "Nothing to be done for `api' " instead of a series of
commands to get the final target.
Is there some option to force make regard all targets in the Makefile
phony, so that I can get the commands whithout cleaning
the immediate object files and the final target file.
Try using "make -B" or "make --always-make". Note you'll probably want
to modify your sub-make command lines to pass these flags on down to
lower level makes also (e.g., "@make -C DIR1 $(MAKEFLAGS) api").