pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: too stupid to code a codition for builtin libtirpc
Am Wed, 30 Apr 2025 13:57:52 +0100
schrieb Jonathan Perkin <jperkin%pkgsrc.org@localhost>:
> * On 2025-04-30 at 13:54 BST, Dr. Thomas Orgis wrote:
>
> >.if ${USE_BUILTIN.libtirpc:tl} == "yes"
> >CONFIGURE_ARGS+= --with-xdr-include=/usr/include/tirpc
> >.else
> >CONFIGURE_ARGS+= --with-xdr-include=${PREFIX}/include/tirpc
> >.endif
>
> You don't need to do any of this, just use BUILDLINK_PREFIX which will
> lazily evaluate to the correct location.
So you mean this?
CONFIGURE_ARGS+= --with-xdr-include=${BUILDLINK_PREFIX.libtirpc}/include/tirpc
This does resolve to /usr if USE_BUILTIN.libtirpc=yes … but I test
without PREFER_NATIVE+=libtirpc and see this:
$ bmake show-var VARNAME=USE_BUILTIN.libtirpc
no
$ bmake show-var VARNAME=BUILDLINK_PREFIX.libtirpc
This returned /usr before. Shouldn't it now give my pkgsrc install
prefix? Also, should
$ bmake show-var VARNAME=BUILDLINK_PREFIX.libtirpc USE_BUILTIN.libtirpc=$no_or_yes
instantly show me an effect? With clean in between? Apparently it's
more effective to set PREFER_NATIVE+=libtirpc instead (which isn't as
convenient for testing switching in both directions).
Generally, I think it is a strong point for the make-based build system
that it offers this kind of introspection … but subtleties about when
which variables have values and effect confuse me.
Anyhow, without libtirpc in PREFER_NATIVE, bmake installes libtirpc as
dependency, but then there is no buildlink prefix for it:
$ head config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by GRASS configure 0.3-2, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ ./configure --with-xdr-include=/include/tirpc
## --------- ##
## Platform. ##
What did I wrong?
> >But when I comment out the .if, I can do this:
> >
> >$ bmake show-var VARNAME=USE_BUILTIN.libtirpc
> >yes
>
> You cannot use lazy variables in any direct conditionals such as .if,
Oh. Is there an easy way to see which variables are lazily defined and
which not? Actually, is there a command to list all variables that one
could use? I guess -d $something could give hints, but doesn't look
that user friendly.
Alrighty then,
Thomas
--
Dr. Thomas Orgis
HPC @ Universität Hamburg
Home |
Main Index |
Thread Index |
Old Index