[gtkada] Patch: Fix PRJDIR, libdir and exampledir.

Emmanuel Briot briot at adacore.com
Wed Jul 22 12:53:16 CEST 2015


> · projects/Makefile.in has the variable PRJDIR but the main makefile
> does not, so when I put project files in /usr/share/gpr the .lgpr files
> still end up under /usr/lib.

projects/Makefile* no longer exist, since we moved to gprinstall.
However, we were hard-coding "lib/gnat" as the path for project files,
so I have now put back a PRJDIR in the main makefile (which in your
case will be set to "share/gpr") so that this can be controlled by the
user.
Thanks for pointing out this omission.

> · Since libdir is hardcoded in configure I have to override it in "make
> install", but that's impossible when there are two different variables
> called "libdir" in different makefiles. One of them includes DESTDIR
> while the other is independent of DESTDIR, and I can only set one value
> for a single variable name in a single Make invocation.

In the development version, we now have a single makefile with libdir,
so that particular issue seems to be fixed already:

./internal/examples/Makefile:export ADA_PROJECT_PATH:=${libdir}/gnat${DIRSEP}${ADA_PROJECT_PATH}
./Makefile:libdir=${DESTDIR}${prefix}/lib
./Makefile.in:libdir=${DESTDIR}@libdir@

> · Fedora has no /usr/share/examples so I override exampledir to install
> the TestGTK sources under docdir. I shouldn't have to prepend the
> staging directory when I do this. exampledir should be independent of
> DESTDIR.

Things are done differently with gprinstall, but as part of the change, the
support for DESTDIR was broken. I think I fixed it.
Installing testgtk though seems to be hard-coded to "share/examples/gtkada/testgtk", so 
I will ask the person who did the change to improve his patch.

regards
Emmanuel


More information about the gtkada mailing list