tools: ynl: auto-gen for all genetlink families
authorJakub Kicinski <kuba@kernel.org>
Fri, 2 Feb 2024 00:49:26 +0000 (16:49 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 3 Feb 2024 05:16:38 +0000 (21:16 -0800)
Instead of listing the genetlink families that we want to codegen
for, always codegen for everyone. We can add an opt-out later but
it seems like most families are not causing any issues, and yet
folks forget to add them to the Makefile.

Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20240202004926.447803-4-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/generated/Makefile

index 3b9f738c61b84ddf5a08b594656d1c17cb2bd1a9..7135028cb44935fca21ebf816e31344ab1dccb02 100644 (file)
@@ -14,7 +14,10 @@ YNL_GEN_ARG_ethtool:=--user-header linux/ethtool_netlink.h \
 
 TOOL:=../ynl-gen-c.py
 
-GENS:=ethtool devlink dpll handshake fou mptcp_pm netdev nfsd ovs_datapath ovs_vport ovs_flow
+GENS_PATHS=$(shell grep -nrI --files-without-match \
+               'protocol: netlink' \
+               ../../../../Documentation/netlink/specs/)
+GENS=$(patsubst ../../../../Documentation/netlink/specs/%.yaml,%,${GENS_PATHS})
 SRCS=$(patsubst %,%-user.c,${GENS})
 HDRS=$(patsubst %,%-user.h,${GENS})
 OBJS=$(patsubst %,%-user.o,${GENS})