help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there some option to make all targets phony?


From: John Calcote
Subject: Re: Is there some option to make all targets phony?
Date: Mon, 17 Aug 2009 11:34:54 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.1) Gecko/20090715 Thunderbird/3.0b3

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").

Regards,
John





reply via email to

[Prev in Thread] Current Thread [Next in Thread]