tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: cmake/

Am 31.07.2022 um 17:34 schrieb Thomas Klausner:
The directories in CONFIGURE_DIRS and the other variables must be
relative to WRKSRC. Contrary to CONFIGURE_DIRS in other scenarios,
specifying absolute paths does not work here. This is new in pkgsrc but
shouldn't be a problem for any package.

I documented this now it as relative to WRKSRC. (I didn't know
absolute paths worked!?)

Some packages set 'CONFIGURE_DIRS = ${WRKSRC}/../other'. Pkglint already
remarks that the leading '${WRKSRC}/' is redundant. The implementation
of the default 'do-build' has 'cd ${WRKSRC} && cd ${dir}', which allows
both relative and absolute paths. It should never be necessary for a
package to specify absolute paths, though.

I can clean up the few remaining packages and then force these paths to
be relative to ${WRKSRC}.

When the API has stabilized, the file should get the usual documentation
header at the top (for 'make help') and the _VARGROUPS section at the
bottom (for 'make show-all-cmake').

I don't know anything about _VARGROUPS and didn't find any
documentation. Can you please tell me more about this and/or document

When you run 'make help topic=_vargroups', there is a single topic, but
that doesn't document anything about how to write a _VARGROUPS section.
The only hint is that this keyword is mentioned in mk/misc/ My
bad. I'll improve the documentation.

When I implemented the 'show-all' target in 2007, I only intended it to
be used from within mk/, but since there are several makefile fragments
outside mk/ now that are somewhat part of the infrastructure, having to
deal with variables whose names start with '_' doesn't seem right anymore.

Back then, I didn't want to pollute the public API namespace, so I chose
the names _VARGROUPS, _USR_VARS, _PKG_VARS, and so on. Maybe I will
make the names more relatable to the 'show-all' target.

New version attached.

Looks good to me.


Home | Main Index | Thread Index | Old Index