From cb1abb78b4fb4bcd3fd5c5e8ea999d24e167c48f Mon Sep 17 00:00:00 2001 From: Jakub Kicinski Date: Thu, 14 Mar 2024 14:30:19 -0700 Subject: [PATCH] move ynl.h into include/ too Signed-off-by: Jakub Kicinski --- Makefile | 3 ++- generated/Makefile | 2 +- ynl-priv.h => include/ynl-c/ynl-priv.h | 0 ynl.h => include/ynl-c/ynl.h | 0 update-from-kernel.sh | 3 ++- 5 files changed, 5 insertions(+), 3 deletions(-) rename ynl-priv.h => include/ynl-c/ynl-priv.h (100%) rename ynl.h => include/ynl-c/ynl.h (100%) diff --git a/Makefile b/Makefile index 9d3bea3..cc64a58 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 CC=gcc -CFLAGS=-std=gnu11 -O2 -W -Wall -Wextra -Wno-unused-parameter -Wshadow +CFLAGS=-std=gnu11 -O2 -W -Wall -Wextra -Wno-unused-parameter -Wshadow \ + -Iinclude/ynl-c/ ifeq ("$(DEBUG)","1") CFLAGS += -g -fsanitize=address -fsanitize=leak -static-libasan endif diff --git a/generated/Makefile b/generated/Makefile index 472851a..55fd311 100644 --- a/generated/Makefile +++ b/generated/Makefile @@ -2,7 +2,7 @@ CC=gcc CFLAGS=-std=gnu11 -O2 -W -Wall -Wextra -Wno-unused-parameter -Wshadow \ - -I../ -idirafter $(UAPI_PATH) + -I../include/ynl-c -idirafter $(UAPI_PATH) ifeq ("$(DEBUG)","1") CFLAGS += -g -fsanitize=address -fsanitize=leak -static-libasan endif diff --git a/ynl-priv.h b/include/ynl-c/ynl-priv.h similarity index 100% rename from ynl-priv.h rename to include/ynl-c/ynl-priv.h diff --git a/ynl.h b/include/ynl-c/ynl.h similarity index 100% rename from ynl.h rename to include/ynl-c/ynl.h diff --git a/update-from-kernel.sh b/update-from-kernel.sh index 72a872a..a8fa1e0 100755 --- a/update-from-kernel.sh +++ b/update-from-kernel.sh @@ -22,12 +22,13 @@ for hdr in $(cat Makefile.deps | sed -n 's/.*,\([^,]*\.h\))/\1/p'); do done mkdir -p lib -cp -v ${KSRC}/tools/net/ynl/lib/*.{c,h} ./ +cp -v ${KSRC}/tools/net/ynl/lib/*.c ./ mkdir -p generated cp -v ${KSRC}/tools/net/ynl/generated/*.{c,h} ./generated/ mkdir -p include/ynl-c +cp -v ${KSRC}/tools/net/ynl/lib/*.h ./include/ynl-c/ for hdr in $(ls generated/ | grep -user.h); do mv -v generated/$hdr ./include/ynl-c/${hdr/-user/} (