Forgot to say that in order to mimic “make install” behavior, I think you only need INSTALL_LOCATION, so you can do something like this
INSTALL_LOCATION=/usr/lib/epics make
But again you need to have permissions on that directory, or use “sudo”.
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Abdalla Ahmad via Tech-talk
Sent: Monday, October 9, 2023 2:50 PM
To: Lucas Russo <lerwys at gmail.com>
Cc: tech-talk at aps.anl.gov
Subject: RE: How to use INSTALL_LOCATION with system directories
Hello Lucas
You are right about the behavior of INSTALL_LOCATION, by default it is set to $(TOP), then the build creates directories in INSTALL_LOCATION. This variable is
used for staged build along with FINAL_LOCATION, where INSTALL_LOCATION is a temporary build location and FINAL_LOCATION points to the “final” location. I found some notes about these two variables
here, you can see a practical use for these two
here and here. The EPICS build system is not standard “autotools” based system where you can do stuff like “./configure”, “make” and “make install”.
Best Regards,
Abdalla.
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Lucas Russo via Tech-talk
Sent: Monday, October 9, 2023 12:46 PM
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Subject: How to use INSTALL_LOCATION with system directories
Hi all,
Maybe this has already been answered, but I couldn't find this exact question.
I have an example support module created with:
makeBaseApp.pl -t ioc testInstallLocation
makeBaseApp.pl -i -t ioc testInstallLocation
with its configure/CONFIG_SITE file with:
INSTALL_LOCATION=/opt/test
My expectation was that I would be able to do "make" to compile everything and
"make install" to install the bin, lib, etc, folders to where INSTALL_LOCATION points to,
but that was not the case.
With INSTALL_LOCATION different than $(TOP) it tries to create the destination directories
before compiling anything, thus failing because /opt is owned by root. And doing "sudo make" seems wrong.
Is there any better way to do this or to change this behavior? Or is my expectation wrong about the usage of INSTALL_LOCATION?