Re: [PATCH v3 4/4] tools: ynl: add main install target
From: Joe Damato
Date: Mon Dec 16 2024 - 17:59:06 EST
On Mon, Dec 16, 2024 at 11:41:44AM +0100, Jan Stancek wrote:
> This will install C library, specs, rsts and pyynl. The initial
> structure is:
>
> $ mkdir /tmp/myroot
> $ make DESTDIR=/tmp/myroot install
>
> /usr
> /usr/lib64
> /usr/lib64/libynl.a
> /usr/lib/python3.XX/site-packages/pyynl/*
> /usr/lib/python3.XX/site-packages/pyynl-0.0.1.dist-info/*
> /usr/bin
> /usr/bin/ynl
> /usr/bin/ynl-ethtool
> /usr/bin/ynl-gen-c
> /usr/bin/ynl-gen-rst
> /usr/include/ynl/*.h
[...]
Thanks for including the headers and doing all of this work.
I tested this on my machine using one of the sample C files and it
seemed to work:
mkdir -p /tmp/myroot/local-inc/linux
make DESTDIR=/tmp/myroot -C tools/net/ynl/ install
cp /usr/src/linux-headers-`uname -r`/include/uapi/linux/netdev.h \
/tmp/myroot/local-inc/linux
cp tools/net/ynl/samples/netdev.c /tmp/
cd /tmp
gcc -I./myroot/local-inc/ -I myroot/usr/include/ynl/ -o netdev netdev.c -L/tmp/myroot/usr/lib64/ -lynl
./netdev
Select ifc ($ifindex; or 0 = dump; or -2 ntf check):
Reviewed-by: Joe Damato <jdamato@xxxxxxxxxx>