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

Björn Persson Bjorn at xn--rombobjrn-67a.se
Wed Jul 22 17:26:49 CEST 2015


Emmanuel Briot wrote:
> > · 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@

OK, but if it's defined like that I'll still have to write
"libdir=%{buildroot}%{_libdir}" instead of "libdir=%{_libdir}" in the
RPM spec. That can be made to work, provided that no directory variables
get substituted into any files during "make install", but it misses the
whole point of DESTDIR.

A makefile that doesn't have DESTDIR but is otherwise perfectly written
can be made to install into a staging directory by prepending the
staging directory to all of the directory variables in the installation
stage but not in the build stage. That method is an error-prone kludge
though, and having a separate variable for the staging directory is
supposed to be more reliable. That's the purpose of DESTDIR: To be
separate from the other directory variables.

And I don't know how internal that internal/examples/Makefile is, but
it looks like it should use PRJDIR, or maybe ${DESTDIR}${PRJDIR}
depending on what that exported variable is used for.

Björn Persson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signatur
URL: </pipermail/gtkada/attachments/20150722/4e7d963e/attachment.sig>


More information about the gtkada mailing list