[Bug 251191] Mk/Uses/ninja.mk: 'USES=cmake emacs' results in build error with ninja

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jan 24 23:08:39 GMT 2022


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251191

Adriaan de Groot <adridg at freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adridg at freebsd.org

--- Comment #8 from Adriaan de Groot <adridg at freebsd.org> ---
This is very much bogged down in the linked review. I wonder if it is worth
pursuing further, because it's *really hard* to get things right for multiple
build systems, even as yasu@ has demonstrated that it is possible to get ninja
and make straight.

To summarize, though:
- `USES=emacs` assumes that the build is going to use make, and sets
make-relevant variables,
- `USES=ninja`, or `USES=cmake` (which implies ninja), switch the build system
to ninja which does not understand the make-relevant variables,
- and some ports do convoluted things with special targets in the ports
Makefiles.

I wonder if it is feasible to split this into smaller steps?

- Introduce helpers that make it easier to switch build systems (make vs ninja)
for specific kinds of commands. I think those are called `DO_MAKE_INSTALL` in
the review, and similar.
- Avoid defining `do-*` targets in the files in Mk/Uses, to improve
interoperability and safety (but maybe this is going to come down to a
documentation issue).
- Then start switching over the problematic ports one-by-one.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the kde-freebsd mailing list