I believe you should use project-external-roots for this.
In the context of autoconf or CMake srcdir!=builddir builds, I would suggest that you choose the builddir as the project-root based on Makefile, and use VPATH from the Makefile to get the srcdir in project-external-roots.
In your case, folder2 would be the project-root, and folder1 would be included in project-external-roots.
I believe you should use
project-external-roots
for this.In the context of autoconf or CMake srcdir!=builddir builds, I would suggest that you choose the builddir as the project-root based on Makefile, and use
VPATH
from the Makefile to get the srcdir inproject-external-roots
.In your case,
folder2
would be the project-root, andfolder1
would be included inproject-external-roots
.