Create describe-json target to get a JSON-compliant representation of the
ports tree.
It can be invoked from a single port directory, a category directory or from the
ports tree top directory.
It supports FLAVORS. E.g. It is possible to execute the following:
cd math/qalculate-qt && make describe-json-qt6
Performance-wise it is a bit slower than a simple make describe although it
offers a more complete vision of the port in an easily parseable format.
Maybe just say the type of the 3rd arg depends on the operation (and document the type for each operation that takes the third arg) instead of trying to assume it's a single type? In CheriBSD we have a wrapper in libc to deal with this and have fcntl() as a truly var-args function. On existing platforms var-args is close enough to work for passing syscall arguments, but not all ABIs require this. (var-args are passed as a block in a bounded pointer on CHERI platforms and not just a continuation of register arguments).