Closed onox closed 7 years ago
Hi. We are trying to understand your use case, can you perhaps elaborate? You say ...
This prevents tons of ALI files from different projects to get installed all in a common library folder
... but when you install different projects using gprinstall, their respective ALIs are placed in the directories <prefix>/lib/<project name>
, so you shouldn't ever end up having ALIs from different projects sharing the same dir?
That doesn't seem to be the case here. The lib
folder contains:
gnat
folder containing the generated .gpr
file (as expected).ali
files (unexpected)I used gprinstall from GPL 2015 as follows in a Makefile
:
gprinstall --relocate-build-tree -p --install-name='my-project' \
--sources-subdir=${includedir} \
--project-subdir=${gprdir} \
--lib-subdir=${libdir} \
--prefix=${PREFIX} \
-P my_project.gpr
gprinstall --help
doesn't show a --ali-subdir
.
Oh, I see, you are forcing your own sources and lib subdir. Normally the default behavior (i.e. if you only give prefix) is to install in <prefix>/lib/<project>
, but you are overriding it. Any reason not to use default gprinstall choices, or at least supply --lib-subdir=${libdir}/my_project
etc in your command line?
gprinstall --help doesn't show a --ali-subdir
Just to be clear - what you are really looking for is a command line interface to stage ALI files in their own location, aren't you?
but you are overriding it. Any reason not to use default gprinstall choices, or at least supply --lib-subdir=${libdir}/my_project etc in your command line?
The only reason is to simply allow customizing the locations via variables in the Makefile
. Using --lib-subdir=${libdir}/my_project
indeed installs the ALI files in that folder. I see gprinstall still creates a symlink in ${libdir}
. What is the logic that causes it to install in that folder instead of ${libdir}/my_project
?
Just to be clear - what you are really looking for is a command line interface to stage ALI files in their own location, aren't you?
Yes, what I am looking for is to be able to specify --ali-subdir=${alidir}
with alidir
defined somewhere in the Makefile
.
What is the logic that causes it to install in that folder instead of ${libdir}/my_project?
It's only done for .so's, the idea is to let you set LD_LIBRARY_PATH=${libdir} and nail them all, instead of having to point to every subdirectory separately.
Yes, what I am looking for is to be able to specify --ali-subdir=${alidir} with alidir defined somewhere in the Makefile.
Understood, we'll look into that.
This has been implemented.
Thank you! :+1:
A manually written
library project
.gpr
file provides the ability to specify the folder for.ali
files viaLibrary_ALI_Dir
. This prevents tons of ALI files from different projects to get installed all in a common library folder (if projects install files manually via aMakefile
).gprinstall
does not seem to provide a way to specify a folder for the ALI files, thus all these files get installed in the folder indicated byLibrary_Dir
(when inspecting the generated.gpr
file).For example, I would like
gprinstall
to be able to generate a.gpr
file containing: