help-make
[Top][All Lists]
Advanced

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

Re: Change Makefile


From: Oleksandr Gavenko
Subject: Re: Change Makefile
Date: Wed, 27 Apr 2011 18:18:10 +0300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9

On 27.04.2011 18:09, Ajay Jain wrote:
Hi,

I expect that if the Makefile is newer than the targets, all the
targets (&dependencies) should just rebuild.
i.e. if I do a touch Makefile&  then a make, I should see EVERYTHING
getting rebuilt. This does not happen. Is there a way to enforce it?

I usually use such pattern:

%.o: %.c $(MAKEFILE_LIST)
        $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<

Read about MAKEFILE_LIST variable in manual ('info make').

--
С уважением, Александр Гавенко.



reply via email to

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