[libvirt] [PATCH] build: allow 'make syntax-check' on fresh checkout

For good or for bad, I did a fresh checkout, ./autogen.sh, then 'configure', then 'make syntax-check', and was surprised that it failed. Running 'make' before 'make syntax-check' cleaned up the issue, but this patch makes it work up front. * cfg.mk (sc_po_check): Add prerequisite. --- I debated about pushing this one, but couldn't quite bring myself to call it a build-breaker. However, if it gets an ACK, I see no negative effects to pushing before 0.9.3. cfg.mk | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/cfg.mk b/cfg.mk index 69f35a3..fa9ea1c 100644 --- a/cfg.mk +++ b/cfg.mk @@ -605,6 +605,11 @@ _autogen: # regenerate HACKING as part of the syntax-check syntax-check: $(top_srcdir)/HACKING +# sc_po_check can fail if generated files are not built first +sc_po_check: daemon/remote_dispatch.h +daemon/remote_dispatch.h: + $(MAKE) -C daemon remote_dispatch.h + # List all syntax-check exemptions: exclude_file_name_regexp--sc_avoid_strcase = ^tools/virsh\.c$$ -- 1.7.4.4

For good or for bad, I did a fresh checkout, ./autogen.sh, then 'configure', then 'make syntax-check', and was surprised that it failed. Running 'make' before 'make syntax-check' cleaned up the issue, but this patch makes it work up front. * cfg.mk (sc_po_check): Add prerequisite. ---
I debated about pushing this one, but couldn't quite bring myself to call it a build-breaker. However, if it gets an ACK, I see no negative effects to pushing before 0.9.3.
I'm glad I didn't push it yet - it didn't work for VPATH. cfg.mk | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/cfg.mk b/cfg.mk index 69f35a3..65832ae 100644 --- a/cfg.mk +++ b/cfg.mk @@ -605,6 +605,11 @@ _autogen: # regenerate HACKING as part of the syntax-check syntax-check: $(top_srcdir)/HACKING +# sc_po_check can fail if generated files are not built first +sc_po_check: $(srcdir)/daemon/remote_dispatch.h +$(srcdir)/daemon/remote_dispatch.h: + $(MAKE) -C daemon remote_dispatch.h + # List all syntax-check exemptions: exclude_file_name_regexp--sc_avoid_strcase = ^tools/virsh\.c$$ -- 1.7.4.4

For good or for bad, I did a fresh checkout, ./autogen.sh, then 'configure', then 'make syntax-check', and was surprised that it failed. Running 'make' before 'make syntax-check' cleaned up the issue, but this patch makes it work up front. * cfg.mk (sc_po_check): Add prerequisites. --- v3: also generate src/remote/remote_client_bodies.h Thanks Laine for pointing it out to me on IRC. cfg.mk | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/cfg.mk b/cfg.mk index 69f35a3..b00cda3 100644 --- a/cfg.mk +++ b/cfg.mk @@ -605,6 +605,14 @@ _autogen: # regenerate HACKING as part of the syntax-check syntax-check: $(top_srcdir)/HACKING +# sc_po_check can fail if generated files are not built first +sc_po_check: $(srcdir)/daemon/remote_dispatch.h \ + $(srcdir)/src/remote/remote_client_bodies.h +$(srcdir)/daemon/remote_dispatch.h: + $(MAKE) -C daemon remote_dispatch.h +$(srcdir)/src/remote/remote_client_bodies.h: + $(MAKE) -C src remote/remote_client_bodies.h + # List all syntax-check exemptions: exclude_file_name_regexp--sc_avoid_strcase = ^tools/virsh\.c$$ -- 1.7.4.4

On 06/30/2011 04:55 PM, Eric Blake wrote:
For good or for bad, I did a fresh checkout, ./autogen.sh, then 'configure', then 'make syntax-check', and was surprised that it failed. Running 'make' before 'make syntax-check' cleaned up the issue, but this patch makes it work up front.
* cfg.mk (sc_po_check): Add prerequisites. ---
v3: also generate src/remote/remote_client_bodies.h Thanks Laine for pointing it out to me on IRC.
cfg.mk | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
ACK.

On 06/30/2011 04:38 PM, Laine Stump wrote:
On 06/30/2011 04:55 PM, Eric Blake wrote:
For good or for bad, I did a fresh checkout, ./autogen.sh, then 'configure', then 'make syntax-check', and was surprised that it failed. Running 'make' before 'make syntax-check' cleaned up the issue, but this patch makes it work up front.
* cfg.mk (sc_po_check): Add prerequisites. ---
v3: also generate src/remote/remote_client_bodies.h Thanks Laine for pointing it out to me on IRC.
cfg.mk | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
ACK.
Thanks; pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
Laine Stump