All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Stanislav Fomichev <sdf@google.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	pabeni@redhat.com
Subject: Re: [PATCH net-next 3/4] ynl: regenerate all headers
Date: Wed, 26 Jul 2023 17:22:47 -0700	[thread overview]
Message-ID: <20230726172247.021045e7@kernel.org> (raw)
In-Reply-To: <CAKH8qBvix3YLwrFjMspk3Wttc=CfYW5xJgQt86x2Jg98v2Y55w@mail.gmail.com>

On Wed, 26 Jul 2023 16:55:07 -0700 Stanislav Fomichev wrote:
> Oh, didn't know about this. Something like this maybe? Ugly?
> 
> diff --git a/tools/net/ynl/Makefile b/tools/net/ynl/Makefile
> index d664b36deb5b..c36380bf1536 100644
> --- a/tools/net/ynl/Makefile
> +++ b/tools/net/ynl/Makefile
> @@ -3,6 +3,7 @@
>  SUBDIRS = lib generated samples
> 
>  all: $(SUBDIRS)
> +       (cd ../../../ && ./tools/net/ynl/ynl-regen.sh -f)

Hm, I thought the script itself would handle this. I guess I did a
stupid. How about we extend the script to default to the full tree:

diff --git a/tools/net/ynl/ynl-regen.sh b/tools/net/ynl/ynl-regen.sh
index 8d4ca6a50582..bdba24066cf1 100755
--- a/tools/net/ynl/ynl-regen.sh
+++ b/tools/net/ynl/ynl-regen.sh
@@ -4,15 +4,18 @@
 TOOL=$(dirname $(realpath $0))/ynl-gen-c.py
 
 force=
+search=
 
 while [ ! -z "$1" ]; do
   case "$1" in
     -f ) force=yes; shift ;;
+    -p ) search=$2; shift 2 ;;
     * )  echo "Unrecognized option '$1'"; exit 1 ;;
   esac
 done
 
 KDIR=$(dirname $(dirname $(dirname $(dirname $(realpath $0)))))
+pushd ${search:-$KDIR} >>/dev/null
 
 files=$(git grep --files-with-matches '^/\* YNL-GEN \(kernel\|uapi\|user\)')
 for f in $files; do
@@ -30,3 +33,5 @@ for f in $files; do
     $TOOL --mode ${params[2]} --${params[3]} --spec $KDIR/${params[0]} \
 	  $args -o $f
 done
+
+popd >>/dev/null

>  $(SUBDIRS):
>         @if [ -f "$@/Makefile" ] ; then \
> 
> Or, now that I know about the script I can actually run it manually.
> But with a makefile imo a bit easier to discover..

Yea, agreed.

  reply	other threads:[~2023-07-27  0:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25 23:35 [PATCH net-next 0/4] ynl: couple of unrelated fixes Stanislav Fomichev
2023-07-25 23:35 ` [PATCH net-next 1/4] ynl: expose xdp-zc-max-segs Stanislav Fomichev
2023-07-25 23:35 ` [PATCH net-next 2/4] ynl: mark max/mask as private for kdoc Stanislav Fomichev
2023-07-26 23:33   ` Jakub Kicinski
2023-07-26 23:35     ` Stanislav Fomichev
2023-07-25 23:35 ` [PATCH net-next 3/4] ynl: regenerate all headers Stanislav Fomichev
2023-07-26 23:37   ` Jakub Kicinski
2023-07-26 23:55     ` Stanislav Fomichev
2023-07-27  0:22       ` Jakub Kicinski [this message]
2023-07-25 23:35 ` [PATCH net-next 4/4] ynl: print xdp-zc-max-segs in the sample Stanislav Fomichev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230726172247.021045e7@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.