diff mbox series

[ovs-dev] python: regenerate dirs.py when Makefile is updated

Message ID e11a3ef39ac91bbca0074e06d694539db467036d.1648236842.git.tredaelli@redhat.com
State Changes Requested
Headers show
Series [ovs-dev] python: regenerate dirs.py when Makefile is updated | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test fail github build: failed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

Timothy Redaelli March 25, 2022, 7:34 p.m. UTC
Currently dirs.py is not generated when Makefile is updated, so if
prefix is changed dirs.py is not updated with the new prefix.

This patch adds a Makefile dependency on dirs.py, so it's regenerated
correctly when prefix is updated.

Fixes: 943c4a325045 ("python: set ovs.dirs variables with build system values")

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
---
 python/automake.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ilya Maximets March 28, 2022, 6:16 p.m. UTC | #1
On 3/25/22 20:34, Timothy Redaelli wrote:
> Currently dirs.py is not generated when Makefile is updated, so if
> prefix is changed dirs.py is not updated with the new prefix.
> 
> This patch adds a Makefile dependency on dirs.py, so it's regenerated
> correctly when prefix is updated.
> 
> Fixes: 943c4a325045 ("python: set ovs.dirs variables with build system values")
> 
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> ---
>  python/automake.mk | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

For the mail thread completeness, replying also here.
The patch causes the same build failure during distcheck
as described here:
  https://patchwork.ozlabs.org/project/openvswitch/patch/98261e51f50ced45e2071e1fd47e419e59f5e8fb.1648230990.git.tredaelli@redhat.com/#2865214 

Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/python/automake.mk b/python/automake.mk
index c32ac3b6a..e36094168 100644
--- a/python/automake.mk
+++ b/python/automake.mk
@@ -106,7 +106,7 @@  $(srcdir)/python/ovs/version.py: config.status
 	if cmp -s $(@F).tmp $@; then touch $@; rm $(@F).tmp; else mv $(@F).tmp $@; fi
 
 ALL_LOCAL += $(srcdir)/python/ovs/dirs.py
-$(srcdir)/python/ovs/dirs.py: python/ovs/dirs.py.template
+$(srcdir)/python/ovs/dirs.py: python/ovs/dirs.py.template Makefile
 	$(AM_V_GEN)sed \
 		-e '/^##/d' \
 		-e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \
@@ -115,7 +115,7 @@  $(srcdir)/python/ovs/dirs.py: python/ovs/dirs.py.template
 		-e 's,[@]bindir[@],$(bindir),g' \
 		-e 's,[@]sysconfdir[@],$(sysconfdir),g' \
 		-e 's,[@]DBDIR[@],$(sysconfdir)/openvswitch,g' \
-		< $? > $@.tmp && \
+		<  $(srcdir)/python/ovs/dirs.py.template > $@.tmp && \
 	mv $@.tmp $@
 EXTRA_DIST += python/ovs/dirs.py.template
 CLEANFILES += python/ovs/dirs.py