Hello, I have got two Makefiles: Makefile2: ------------ ./target1.out: ./test/Test.cc.o @echo linking
./%.cc.d: ../../src/target1/%.cc @echo making dep ./%.cc.o: ../../src/target1/%.cc @echo compiling -include ./test/Test.cc.d ------------ and Makefile2_working: ------------ dst/./target1.out: dst/test/Test.cc.o @echo linking dst/%.cc.d: ../../src/target1/%.cc @echo making dep dst/%.cc.o: ../../src/target1/%.cc @echo compiling -include dst/test/Test.cc.d ------------ Those two makefiles reside in the same folder and I tell make to use each with -f. Now the important part is that Test.cc is located in ../../src/target1/test (note the "test" folder at the end), the dependency .cc.d however is created (or should be created) by a rule that only knows the root directory of the source tree (../../src/target1) and a relative path from that directory to the actual file. What I basically want to do is switch the output directory. And know comes the strange part that I do not understand: The first makefile Makefile2 does not work (make: *** No rule to make target `test/Test.cc.o', needed by `target1.out'. Stop.), the second however does its job (it prints making dep, compiling, linking). What is the problem with the first one? I don't get it. All I did change is the destination folder, and if that is the current directory then the rule does not match, if it is another directory ("dst" in this case) it works. I've already had a look at the output of -d, and there it _seems_ to me as if it does try/find a wrong Stem (?). I've attached the whole source tree ready for "building" and also the two logs (inside; all created with --no-builtin-rules --no-builtin-variables -d [just to reduce pollution of log]). I am using GNU Make 3.81 (x86_64-pc-linux-gnu). Any help would be appreciated! Thank you very much in advance. trashmailer
make_project.tar.bz2
Description: BZip2 compressed data
_______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make