[libvirt] [PATCH RESEND] Distribute only generated virkeymaps.h

We are distributing virkeymaps.h and all the tools needed to rebuild that file. On top of that, we are generating that file into the $(srcdir) and that sometimes fails for me when trying to do make dist in VPATH on rawhide fedora. And we don't clean the file when maintainer-clean make target is requested. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- No change since the first version, just rebased. There was a discussion about another way of doing it, but I figured that that's not the way to go and the discussion stopped there: https://www.redhat.com/archives/libvir-list/2015-September/msg00271.html src/Makefile.am | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 07d587904f54..8ac20f491e35 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -173,15 +173,13 @@ UTIL_SOURCES = \ $(NULL) -EXTRA_DIST += $(srcdir)/util/virkeymaps.h $(srcdir)/util/keymaps.csv \ - $(srcdir)/util/virkeycode-mapgen.py - BUILT_SOURCES += util/virkeymaps.h +MAINTAINERCLEANFILES += util/virkeymaps.h util/virkeymaps.h: $(srcdir)/util/keymaps.csv \ $(srcdir)/util/virkeycode-mapgen.py $(AM_V_GEN)$(PYTHON) $(srcdir)/util/virkeycode-mapgen.py \ - <$(srcdir)/util/keymaps.csv >$(srcdir)/util/virkeymaps.h + <$(srcdir)/util/keymaps.csv >util/virkeymaps.h # Internal generic driver infrastructure NODE_INFO_SOURCES = nodeinfo.h nodeinfo.c nodeinfopriv.h -- 2.6.0

On 01.10.2015 14:39, Martin Kletzander wrote:
We are distributing virkeymaps.h and all the tools needed to rebuild that file. On top of that, we are generating that file into the $(srcdir) and that sometimes fails for me when trying to do make dist in VPATH on rawhide fedora. And we don't clean the file when maintainer-clean make target is requested.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- No change since the first version, just rebased. There was a discussion about another way of doing it, but I figured that that's not the way to go and the discussion stopped there:
https://www.redhat.com/archives/libvir-list/2015-September/msg00271.html
src/Makefile.am | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am index 07d587904f54..8ac20f491e35 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -173,15 +173,13 @@ UTIL_SOURCES = \ $(NULL)
-EXTRA_DIST += $(srcdir)/util/virkeymaps.h $(srcdir)/util/keymaps.csv \ - $(srcdir)/util/virkeycode-mapgen.py -
I am afraid we can't do this. What if somebody wants to 'make dist' from unpacked .tar.gz? They must have both .csv and .py files. So you can't really drop them from here. What you can drop is .h file.
BUILT_SOURCES += util/virkeymaps.h +MAINTAINERCLEANFILES += util/virkeymaps.h
util/virkeymaps.h: $(srcdir)/util/keymaps.csv \ $(srcdir)/util/virkeycode-mapgen.py $(AM_V_GEN)$(PYTHON) $(srcdir)/util/virkeycode-mapgen.py \ - <$(srcdir)/util/keymaps.csv >$(srcdir)/util/virkeymaps.h + <$(srcdir)/util/keymaps.csv >util/virkeymaps.h
# Internal generic driver infrastructure NODE_INFO_SOURCES = nodeinfo.h nodeinfo.c nodeinfopriv.h
Otherwise looking good. ACK. Michal

On Mon, Oct 05, 2015 at 09:18:41AM +0200, Michal Privoznik wrote:
On 01.10.2015 14:39, Martin Kletzander wrote:
We are distributing virkeymaps.h and all the tools needed to rebuild that file. On top of that, we are generating that file into the $(srcdir) and that sometimes fails for me when trying to do make dist in VPATH on rawhide fedora. And we don't clean the file when maintainer-clean make target is requested.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- No change since the first version, just rebased. There was a discussion about another way of doing it, but I figured that that's not the way to go and the discussion stopped there:
https://www.redhat.com/archives/libvir-list/2015-September/msg00271.html
src/Makefile.am | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am index 07d587904f54..8ac20f491e35 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -173,15 +173,13 @@ UTIL_SOURCES = \ $(NULL)
-EXTRA_DIST += $(srcdir)/util/virkeymaps.h $(srcdir)/util/keymaps.csv \ - $(srcdir)/util/virkeycode-mapgen.py -
I am afraid we can't do this. What if somebody wants to 'make dist' from unpacked .tar.gz? They must have both .csv and .py files. So you can't really drop them from here. What you can drop is .h file.
Oh so that's probably what Daniel meant in the first proposition of this patch. I misunderstood that. OK, well, I think making dist from unpacked dist doesn't make much sense, but why would we block it, right? I'll drop only the .h file here and will re-test it to see if it fixes the problem.
BUILT_SOURCES += util/virkeymaps.h +MAINTAINERCLEANFILES += util/virkeymaps.h
util/virkeymaps.h: $(srcdir)/util/keymaps.csv \ $(srcdir)/util/virkeycode-mapgen.py $(AM_V_GEN)$(PYTHON) $(srcdir)/util/virkeycode-mapgen.py \ - <$(srcdir)/util/keymaps.csv >$(srcdir)/util/virkeymaps.h + <$(srcdir)/util/keymaps.csv >util/virkeymaps.h
# Internal generic driver infrastructure NODE_INFO_SOURCES = nodeinfo.h nodeinfo.c nodeinfopriv.h
Otherwise looking good. ACK.
So it's only a small clean-up then. Do you mean ACK with the s/$(srcdir// as well? As that's not needed any more, I guess.
Michal

On 05.10.2015 10:00, Martin Kletzander wrote:
On Mon, Oct 05, 2015 at 09:18:41AM +0200, Michal Privoznik wrote:
On 01.10.2015 14:39, Martin Kletzander wrote:
We are distributing virkeymaps.h and all the tools needed to rebuild that file. On top of that, we are generating that file into the $(srcdir) and that sometimes fails for me when trying to do make dist in VPATH on rawhide fedora. And we don't clean the file when maintainer-clean make target is requested.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- No change since the first version, just rebased. There was a discussion about another way of doing it, but I figured that that's not the way to go and the discussion stopped there:
https://www.redhat.com/archives/libvir-list/2015-September/msg00271.html
src/Makefile.am | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am index 07d587904f54..8ac20f491e35 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -173,15 +173,13 @@ UTIL_SOURCES = \ $(NULL)
-EXTRA_DIST += $(srcdir)/util/virkeymaps.h $(srcdir)/util/keymaps.csv \ - $(srcdir)/util/virkeycode-mapgen.py -
I am afraid we can't do this. What if somebody wants to 'make dist' from unpacked .tar.gz? They must have both .csv and .py files. So you can't really drop them from here. What you can drop is .h file.
Oh so that's probably what Daniel meant in the first proposition of this patch. I misunderstood that. OK, well, I think making dist from unpacked dist doesn't make much sense, but why would we block it, right?
I'll drop only the .h file here and will re-test it to see if it fixes the problem.
BUILT_SOURCES += util/virkeymaps.h +MAINTAINERCLEANFILES += util/virkeymaps.h
util/virkeymaps.h: $(srcdir)/util/keymaps.csv \ $(srcdir)/util/virkeycode-mapgen.py $(AM_V_GEN)$(PYTHON) $(srcdir)/util/virkeycode-mapgen.py \ - <$(srcdir)/util/keymaps.csv >$(srcdir)/util/virkeymaps.h + <$(srcdir)/util/keymaps.csv >util/virkeymaps.h
# Internal generic driver infrastructure NODE_INFO_SOURCES = nodeinfo.h nodeinfo.c nodeinfopriv.h
Otherwise looking good. ACK.
So it's only a small clean-up then. Do you mean ACK with the s/$(srcdir// as well? As that's not needed any more, I guess.
Yeah, that change seems correct to me. Michal

On 10/05/2015 02:00 AM, Martin Kletzander wrote:
On Mon, Oct 05, 2015 at 09:18:41AM +0200, Michal Privoznik wrote:
On 01.10.2015 14:39, Martin Kletzander wrote:
We are distributing virkeymaps.h and all the tools needed to rebuild that file. On top of that, we are generating that file into the $(srcdir) and that sometimes fails for me when trying to do make dist in VPATH on rawhide fedora. And we don't clean the file when maintainer-clean make target is requested.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> ---
-EXTRA_DIST += $(srcdir)/util/virkeymaps.h $(srcdir)/util/keymaps.csv \ - $(srcdir)/util/virkeycode-mapgen.py -
I am afraid we can't do this. What if somebody wants to 'make dist' from unpacked .tar.gz? They must have both .csv and .py files. So you can't really drop them from here. What you can drop is .h file.
Oh so that's probably what Daniel meant in the first proposition of this patch. I misunderstood that. OK, well, I think making dist from unpacked dist doesn't make much sense, but why would we block it, right?
In fact, 'make dist-check' does precisely that - it runs 'make dist' from an unpacked dist, to make sure you didn't forget any source files that were required to generate something that is not shipped pre-generated. So I agree that we have to ship the .csv and .py, and only omit the .h. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (3)
-
Eric Blake
-
Martin Kletzander
-
Michal Privoznik