help-make
[Top][All Lists]
Advanced

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

Re: Recompile files for different parameters


From: Krzysztof Cieniuch
Subject: Re: Recompile files for different parameters
Date: Tue, 08 Mar 2011 10:09:24 +0000
User-agent: Thunderbird 2.0.0.24 (X11/20101213)

Matthias Fechner wrote:
Dear Mark,

On 07.03.11 15:18, Mark Galeck (CW) wrote:
MAKEFILE := $(lastword $(MAKEFILE_LIST))

sorry, maybe my explanation was not very well, here a very short example that shows the problem. I kicked out all the subdirectory stuff and tried to simplify it as far as possible.
I attached two small c files, a header file and the Makefile.

Copy it to a directory and execute:
make

then execute:
make debug

You see, it does not remake the hello.o, but it should because the code changes.
How can I teach make to rebuild the hello.o in this case?

Thanks,
Matthias
Had the same problem and someone pointed me to linux kernel Makefile system
they have solution for that. In short when you build object file (as well as any other target type) you should record in dependency file, command line that was used to build that target and then force build if command changed.
Search archives for mail  "Detecting Makefile changes in incremental builds"

Chris




reply via email to

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