petscconf.h contains a definition of PETSC_DIR which is set by the configure scripts to the value specified at configure time. If I read config/PETSc/options/petscdir.py, the value of PETSC_DIR given at configure time needs to be the build dir (the current directory).
But petscconf.h is also included in the final installation, and its value of PETSC_DIR is not updated. This means in the installation, petscconf.h sets PETSC_DIR to the builddir rather than the installdir.
So I think the value of PETSC_DIR in petscconf.h should be reset at install time.
I've worked around it in the debian installation by manually using sed to update petscconf.h after installation.
I've reported the analogous problem for SLEPc at https://bitbucket.org/slepc/slepc/issues/11/slepcconfh-leaves-slepc_dir-set-to