The previous coding failed in various scenarios possibly including vpath builds and doing make install without preceding make all.