On Wed, Jun 24, 2020 at 5:12 AM Budi via Gcc-help <gcc-help@xxxxxxxxxxx> wrote: > Why g++ option -MM -MF <a_file> is not the same as -MM > <afile> if, > and only if, it's inside makefile with VPATH defined ? > The first has a_file incomplete. I tried a trivial testcase, and got identical results. So this might be a problem with your source code. Or it could be a problem with make or shell. Or it could be a g++ problem. But without enough info to reproduce the problem, or at least some clue about what the problem is (e.g. how exactly are the two files different?) there isn't anything we can do. > But how come the overall gcc build result is exactly the same i.e. > succeeds except the created a_file is different as said. Depends on what the "a_file" is used for. There are lots of ways for broken files to be created that don't stop a build. If it is only used for dependency info, then that means there is only be a problem on re build if one of the files changes, and this somehow interacts with the unexplained problem with a_file. There won't be any problem on the first build, or if no file changes after the first build. JIm