lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZVvE36Sq1LD++Eb9@gmail.com>
Date:   Mon, 20 Nov 2023 12:43:11 -0800
From:   Breno Leitao <leitao@...ian.org>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     leit@...a.com, Jonathan Corbet <corbet@....net>,
        netdev@...r.kernel.org, donald.hunter@...il.com,
        linux-doc@...r.kernel.org, pabeni@...hat.com, edumazet@...gle.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] Documentation: Document each netlink family

On Mon, Nov 20, 2023 at 12:07:06PM -0800, Jakub Kicinski wrote:
> On Mon, 20 Nov 2023 11:55:26 -0800 Breno Leitao wrote:
> > I am not planning to do it, since I would like to trust Make. Let me
> > know if you think this is important and I can do it also.
> 
> Makefile is good enough for me.
> 
> > +$(YNL_INDEX): $(YNL_RST_FILES)
> > +       $(YNL_TOOL) -x # Generate the index
> > +
> > +%.rst: $(YNL_YAMLS_FILES)
> > +       $(YNL_TOOL) -i $(patsubst %.rst,%.yaml, $(@F)) # generate individual rst files
> 
> IDK what @F means, can the tool take one file at a time and then
> we can make the rule a more usual:

'$(@F)' is the file-within-directory part of the file name of the
target. If the value of ‘$@’ is dir/foo.o then ‘$(@F)’ is foo.o. ‘$(@F)’
is equivalent to ‘$(notdir $@)’.

> %.rst: $(YNL_YAML_DIR)/%.yaml
> 	$(YNL_TOOL) -i $< -o $@

That is basically what it does now in the current implementation, but,
you don't need to pass the full path and no output file, since it knows
where to get the file and where to save it to.

If you are curious about the current python script, I've pushed it here:
https://github.com/leitao/linux/blob/netdev_discuss/tools/net/ynl/ynl-gen-rst.py

I can easily remove the paths inside the python file and only keep it in
the Makefile, so, we can use -i $< and -o $@.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ