Open exzombie opened 3 months ago
@simon-ess: BEWARE, HERE BE DRAGONS!
This is a long-known problem, if you have any interest or ideas about fixing it please take a look. My experience when developing the submodule builds feature was that the simple solutions to the cleanup of the generated modules/RELEASE.$(EPICS_HOST_ARCH).local
file were invariably incorrect, but I'd love to be proven wrong about that. That's the fundamental cause of @exzombie's complaint, if that file exists but the things it points to don't the build can't descend into any of the external submodules.
It isn't possible for make clean
or make distclean
to remove it because that would be run before make descends into the submodule directories, and they rely on that file to know where EPICS_BASE
and hence the build files are. There is a simple solution included in the configure/RULES_TOP
file (in the realuninstall
rule) which usually works for me, but apparently not for all cases. The manual fix is to delete that RELEASE.host.local
file.
Things which appear to exacerbate the problem: Setting INSTALL_LOCATION
, and especially setting it on the make
command-line. There are comments at the top of configure/RULES_MODULES
which explain some of the moving parts, and configure/RULES_TOP
also provides some of the implementation.
It should always be possible to get the source directory to a (reasonably) pristine state by running
make clean
ormake distclean
. As it stands, this is not possible if the build was made withINSTALL_LOCATION
that is not$(TOP)
and if that directory is subsequently removed. The reason is themodules/RELEASE.$(T_A).local
file that is generated during the build because it references build rules fromINSTALL_LOCATION
which do not exist any more. Thus,make clean
is broken and the only ways to recover are to delete that file (which approximately no one knows about), or to remove the entire source directory and clone again.