diff mbox series

[net-next,v2,03/11] doc/netlink: Regenerate netlink .rst files if ynl-gen-rst changes

Message ID 20231211164039.83034-4-donald.hunter@gmail.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series tools/net/ynl: Add 'sub-message' support to ynl | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl fail Generated files up to date; build failed; build has 25 warnings/errors; GEN HAS DIFF 12 files changed, 26838 deletions(-);
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/cc_maintainers success CCed 2 of 2 maintainers
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 15 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Donald Hunter Dec. 11, 2023, 4:40 p.m. UTC
Add ynl-gen-rst.py to the dependencies for the netlink .rst files in the
doc Makefile so that the docs get regenerated if the ynl-gen-rst.py
script is modified.

Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
---
 Documentation/Makefile | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Jakub Kicinski Dec. 11, 2023, 11:30 p.m. UTC | #1
On Mon, 11 Dec 2023 16:40:31 +0000 Donald Hunter wrote:
> Add ynl-gen-rst.py to the dependencies for the netlink .rst files in the
> doc Makefile so that the docs get regenerated if the ynl-gen-rst.py
> script is modified.

Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Breno Leitao Dec. 12, 2023, 8:39 p.m. UTC | #2
On Mon, Dec 11, 2023 at 04:40:31PM +0000, Donald Hunter wrote:
> Add ynl-gen-rst.py to the dependencies for the netlink .rst files in the
> doc Makefile so that the docs get regenerated if the ynl-gen-rst.py
> script is modified.
> 
> Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
> ---
>  Documentation/Makefile | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/Makefile b/Documentation/Makefile
> index 5c156fbb6cdf..9a31625ea1ff 100644
> --- a/Documentation/Makefile
> +++ b/Documentation/Makefile
> @@ -105,11 +105,12 @@ YNL_TOOL:=$(srctree)/tools/net/ynl/ynl-gen-rst.py
>  YNL_RST_FILES_TMP := $(patsubst %.yaml,%.rst,$(wildcard $(YNL_YAML_DIR)/*.yaml))
>  YNL_RST_FILES := $(patsubst $(YNL_YAML_DIR)%,$(YNL_RST_DIR)%, $(YNL_RST_FILES_TMP))
>  
> -$(YNL_INDEX): $(YNL_RST_FILES)
> +$(YNL_INDEX): $(YNL_RST_FILES) $(YNL_TOOL)
>  	@$(YNL_TOOL) -o $@ -x
>  
> -$(YNL_RST_DIR)/%.rst: $(YNL_YAML_DIR)/%.yaml
> -	@$(YNL_TOOL) -i $< -o $@

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

Why do you need both lines here? Isn't the last line enough?

	$(YNL_RST_DIR)/%.rst: $(YNL_YAML_DIR)/%.yaml $(YNL_TOOL)
Donald Hunter Dec. 12, 2023, 9:48 p.m. UTC | #3
On Tue, 12 Dec 2023 at 20:39, Breno Leitao <leitao@debian.org> wrote:
>
> > +$(YNL_RST_DIR)/%.rst: $(YNL_TOOL)
> > +$(YNL_RST_DIR)/%.rst: $(YNL_YAML_DIR)/%.yaml $(YNL_TOOL)
> > +     $(YNL_TOOL) -i $< -o $@
>
> Why do you need both lines here? Isn't the last line enough?
>
>         $(YNL_RST_DIR)/%.rst: $(YNL_YAML_DIR)/%.yaml $(YNL_TOOL)

Good catch. I didn't intend to leave that first line in.

Thanks!
diff mbox series

Patch

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 5c156fbb6cdf..9a31625ea1ff 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -105,11 +105,12 @@  YNL_TOOL:=$(srctree)/tools/net/ynl/ynl-gen-rst.py
 YNL_RST_FILES_TMP := $(patsubst %.yaml,%.rst,$(wildcard $(YNL_YAML_DIR)/*.yaml))
 YNL_RST_FILES := $(patsubst $(YNL_YAML_DIR)%,$(YNL_RST_DIR)%, $(YNL_RST_FILES_TMP))
 
-$(YNL_INDEX): $(YNL_RST_FILES)
+$(YNL_INDEX): $(YNL_RST_FILES) $(YNL_TOOL)
 	@$(YNL_TOOL) -o $@ -x
 
-$(YNL_RST_DIR)/%.rst: $(YNL_YAML_DIR)/%.yaml
-	@$(YNL_TOOL) -i $< -o $@
+$(YNL_RST_DIR)/%.rst: $(YNL_TOOL)
+$(YNL_RST_DIR)/%.rst: $(YNL_YAML_DIR)/%.yaml $(YNL_TOOL)
+	$(YNL_TOOL) -i $< -o $@
 
 htmldocs: $(YNL_INDEX)
 	@$(srctree)/scripts/sphinx-pre-install --version-check