Thu 09 Jun 2011 06:14:55 AM UTC, original submission:
I am using 'Advanced Auto-Dependency Generation' described at http://make.paulandlesley.org/autodep.html together with VPATH.
When source file is moved from one location in VPATH into another one (usual situation in our project), make still try to use a source file in old location.
I created a script (attached) to illustrate a problem.
Output on my host:
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i686-pc-linux-gnu
-------------------------------------------- First build works
found src/a/foo.c, actual src/a/foo.c
cc -c -MD -o foo.o src/a/foo.c
cc -o foo foo.o
make: Nothing to be done for `all'.
-------------------------------------------- mv src/a/foo.c src/b/foo.c
-------------------------------------------- Second build fails
found src/a/foo.c, actual src/b/foo.c
cc -c -MD -o foo.o src/a/foo.c
cc: src/a/foo.c: No such file or directory
cc: no input files
make: *** [foo.o] Error 1
|