When compiling geant4_vmc 2.15a against Root 5.34.20 I get this error:
Making g4root ...
Makefile:38: /wizard/02/pamela_software/simulation/install/ROOT_5.34.20/etc/vmc/Makefile.linux: No such file or directory
Makefile:51: /wizard/02/pamela_software/simulation/install/ROOT_5.34.20/etc/vmc/MakeRules: No such file or directory
Makefile:124: /wizard/02/pamela_software/simulation/install/ROOT_5.34.20/etc/vmc/MakeMacros: No such file or directory
and lots of similar ones. The directories searched by make are indeed wrong, since I installed Root outside the build directory so the files are inside a "root" subfolder:
$ root-config --etcdir
It seems to me that the problem is in how the Makefiles determine the Root installation folders. For example, in g4root/Makefile:
ROOT_INCDIR := $(shell root-config --incdir)
ROOT_BINDIR := $(shell root-config --bindir)
ROOT_ETCDIR := $(shell root-config --etcdir)/vmc
ROOT_INCDIR = $(ROOTSYS)/include
ROOT_BINDIR = $(ROOTSYS)/bin
ROOT_ETCDIR = $(ROOTSYS)/etc/vmc
ROOTSYS is defined by thisroot.sh which I source before compiling geant4_vmc, so the "else" part of the conditional is executed and wrong folders are set.
A possible fix would be to always rely on root-config by telling the user to source thisroot.sh before compiling.