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
_______________________________________________
Help-make mailing list
Help-make@gnu.org
http://lists.gnu.org/mailman/listinfo/help-make