]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: rename generated files to .h, for automake's sake
authorEric Blake <eblake@redhat.com>
Fri, 6 May 2011 19:54:32 +0000 (13:54 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 6 May 2011 21:11:36 +0000 (15:11 -0600)
In preparation for removing generated files, it is necessary
to tell automake that the generated files must be distributed
but not directly compiled (since they are included into the
body of a larger .c file that is compiled).  Hence, even though
these files are code and not headers in the strict sense of
the word, it is easier to rename them to .h for automake's sake.

* daemon/remote_client_bodies.c: Rename to .h.
* daemon/qemu_client_bodies.c: Likewise.
* src/remote/remote_client_bodies.c: Likewise.
* src/remote/qemu_client_bodies.c: Likewise.
* daemon/Makefile.am (remote_dispatch_bodies.c)
(qemu_dispatch_bodies.c): Rename to .h.
(remote.c, EXTRA_DIST): Reflect rename.
* daemon/remote.c: Likewise.
* daemon/remote_generator.pl: Likewise.
* src/Makefile.am (remote/remote_driver.c): Likewise.
* src/remote/remote_driver.c: Likewise.
* po/POTFILES.in: Likewise.
* cfg.mk (exclude_file_name_regexp--sc_require_config_h)
(exclude_file_name_regexp--sc_require_config_h_first)
(exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF):
Likewise.

cfg.mk
daemon/Makefile.am
daemon/qemu_dispatch_bodies.h [moved from daemon/qemu_dispatch_bodies.c with 100% similarity]
daemon/remote.c
daemon/remote_dispatch_bodies.h [moved from daemon/remote_dispatch_bodies.c with 100% similarity]
daemon/remote_generator.pl
po/POTFILES.in
src/Makefile.am
src/remote/qemu_client_bodies.h [moved from src/remote/qemu_client_bodies.c with 100% similarity]
src/remote/remote_client_bodies.h [moved from src/remote/remote_client_bodies.c with 100% similarity]
src/remote/remote_driver.c

diff --git a/cfg.mk b/cfg.mk
index d80f3d50fc1352e176c7711c060c2ebd8f1a2ea5..27ed9290ca149bbd78ded8fd20113984debe063a 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -614,7 +614,7 @@ exclude_file_name_regexp--sc_prohibit_close = \
 exclude_file_name_regexp--sc_prohibit_doubled_word = ^po/
 
 exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
-  (^docs/api_extension/|^tests/qemuhelpdata/|\.(gif|ico|png)$$|^daemon/.*_dispatch_bodies\.c$$|^src/remote/.*_client_bodies\.c$$)
+  (^docs/api_extension/|^tests/qemuhelpdata/|\.(gif|ico|png)$$|^daemon/.*_dispatch_bodies\.h$$|^src/remote/.*_client_bodies\.h$$)
 
 _src2=src/(util/util|libvirt|lxc/lxc_controller)
 exclude_file_name_regexp--sc_prohibit_fork_wrappers = \
@@ -639,11 +639,9 @@ exclude_file_name_regexp--sc_prohibit_strncpy = \
 
 exclude_file_name_regexp--sc_prohibit_xmlGetProp = ^src/util/xml\.c$$
 
-exclude_file_name_regexp--sc_require_config_h = \
-  ^(examples/|daemon/.*_dispatch_bodies\.c$$|src/remote/.*_client_bodies\.c$$)
+exclude_file_name_regexp--sc_require_config_h = ^examples/
 
-exclude_file_name_regexp--sc_require_config_h_first = \
-  ^(examples/|daemon/.*_dispatch_bodies\.c$$|src/remote/.*_client_bodies\.c$$)
+exclude_file_name_regexp--sc_require_config_h_first = ^examples/
 
 exclude_file_name_regexp--sc_trailing_blank = (^docs/|\.(fig|gif|ico|png)$$)
 
index 3dec18366023bcaf3dde38811b57303940ed8ac6..c6f4d29096bd75ba03796b2eff1625d1c5e0d4e0 100644 (file)
@@ -24,8 +24,8 @@ AVAHI_SOURCES =                                               \
 DISTCLEANFILES =
 EXTRA_DIST =                                           \
        remote_generator.pl                             \
-       remote_dispatch_bodies.c                        \
-       qemu_dispatch_bodies.c                          \
+       remote_dispatch_bodies.h                        \
+       qemu_dispatch_bodies.h                          \
        libvirtd.conf                                   \
        libvirtd.init.in                                \
        libvirtd.upstart                                \
@@ -206,10 +206,10 @@ endif
 remote.c: \
        remote_dispatch_prototypes.h \
        remote_dispatch_table.h \
-       remote_dispatch_bodies.c \
+       remote_dispatch_bodies.h \
        qemu_dispatch_prototypes.h \
        qemu_dispatch_table.h \
-       qemu_dispatch_bodies.c
+       qemu_dispatch_bodies.h
 
 remote.h: \
        remote_dispatch_args.h \
@@ -232,7 +232,7 @@ remote_dispatch_args.h: $(srcdir)/remote_generator.pl $(REMOTE_PROTOCOL)
 remote_dispatch_ret.h: $(srcdir)/remote_generator.pl $(REMOTE_PROTOCOL)
        $(AM_V_GEN)perl -w $(srcdir)/remote_generator.pl -c -r remote $(REMOTE_PROTOCOL) > $@
 
-remote_dispatch_bodies.c: $(srcdir)/remote_generator.pl $(REMOTE_PROTOCOL)
+remote_dispatch_bodies.h: $(srcdir)/remote_generator.pl $(REMOTE_PROTOCOL)
        $(AM_V_GEN)perl -w $(srcdir)/remote_generator.pl -c -b remote $(REMOTE_PROTOCOL) > $@
 
 qemu_dispatch_prototypes.h: $(srcdir)/remote_generator.pl $(QEMU_PROTOCOL)
@@ -247,7 +247,7 @@ qemu_dispatch_args.h: $(srcdir)/remote_generator.pl $(QEMU_PROTOCOL)
 qemu_dispatch_ret.h: $(srcdir)/remote_generator.pl $(QEMU_PROTOCOL)
        $(AM_V_GEN)perl -w $(srcdir)/remote_generator.pl -r qemu $(QEMU_PROTOCOL) > $@
 
-qemu_dispatch_bodies.c: $(srcdir)/remote_generator.pl $(QEMU_PROTOCOL)
+qemu_dispatch_bodies.h: $(srcdir)/remote_generator.pl $(QEMU_PROTOCOL)
        $(AM_V_GEN)perl -w $(srcdir)/remote_generator.pl -b qemu $(QEMU_PROTOCOL) > $@
 
 LOGROTATE_CONFS = libvirtd.qemu.logrotate libvirtd.lxc.logrotate \
index 883f18188ac4e6577f944d1e4a702bcfb5049195..2220655cb039979474153c57ca7da10c2a019e5b 100644 (file)
@@ -2985,8 +2985,8 @@ cleanup:
     return rv;
 }
 
-#include "remote_dispatch_bodies.c"
-#include "qemu_dispatch_bodies.c"
+#include "remote_dispatch_bodies.h"
+#include "qemu_dispatch_bodies.h"
 
 
 /*----- Helpers. -----*/
index bb1978f44ff4e1d0489c7293f9d3f6bdb29f1fce..062ccc15ce416025ffd694a2379b732abfbdc496 100755 (executable)
@@ -236,7 +236,7 @@ elsif ($opt_t) {
     }
 }
 
-# Bodies for dispatch functions ("remote_dispatch_bodies.c").
+# Bodies for dispatch functions ("remote_dispatch_bodies.h").
 elsif ($opt_b) {
     # list of functions that currently are not generatable
     my @ungeneratable;
@@ -726,7 +726,7 @@ elsif ($opt_b) {
     }
 }
 
-# Bodies for client functions ("remote_client_bodies.c").
+# Bodies for client functions ("remote_client_bodies.h").
 elsif ($opt_k) {
     # list of functions that currently are not generatable
     my @ungeneratable;
index 8ecb6a0bed30d49d2b5ffc1b91affef5c1345b51..7f5156c0caadfc6fa212e09132717b47d6c0b141 100644 (file)
@@ -2,7 +2,7 @@ daemon/dispatch.c
 daemon/libvirtd.c
 daemon/remote.c
 daemon/stream.c
-daemon/remote_dispatch_bodies.c
+daemon/remote_dispatch_bodies.h
 src/conf/cpu_conf.c
 src/conf/domain_conf.c
 src/conf/domain_event.c
@@ -64,7 +64,7 @@ src/qemu/qemu_monitor.c
 src/qemu/qemu_monitor_json.c
 src/qemu/qemu_monitor_text.c
 src/qemu/qemu_process.c
-src/remote/remote_client_bodies.c
+src/remote/remote_client_bodies.h
 src/remote/remote_driver.c
 src/secret/secret_driver.c
 src/security/security_apparmor.c
index 8ba176d320c45ab9b70b77ee475c131b948a8d14..962c6f93491f277c3932c8e4ca650de1e5a6d4f4 100644 (file)
@@ -162,19 +162,19 @@ REMOTE_DRIVER_SOURCES =                                           \
                remote/qemu_protocol.c                          \
                remote/qemu_protocol.h
 
-remote/remote_driver.c: remote/remote_client_bodies.c remote/qemu_client_bodies.c
+remote/remote_driver.c: remote/remote_client_bodies.h remote/qemu_client_bodies.h
 
 REMOTE_PROTOCOL = $(top_srcdir)/src/remote/remote_protocol.x
 QEMU_PROTOCOL = $(top_srcdir)/src/remote/qemu_protocol.x
 
-remote/remote_client_bodies.c: $(top_srcdir)/daemon/remote_generator.pl $(REMOTE_PROTOCOL)
+remote/remote_client_bodies.h: $(top_srcdir)/daemon/remote_generator.pl $(REMOTE_PROTOCOL)
        $(AM_V_GEN)perl -w $(top_srcdir)/daemon/remote_generator.pl -c -k remote $(REMOTE_PROTOCOL) > $@
 
-remote/qemu_client_bodies.c: $(top_srcdir)/daemon/remote_generator.pl $(QEMU_PROTOCOL)
+remote/qemu_client_bodies.h: $(top_srcdir)/daemon/remote_generator.pl $(QEMU_PROTOCOL)
        $(AM_V_GEN)perl -w $(top_srcdir)/daemon/remote_generator.pl -k remote $(QEMU_PROTOCOL) > $@
 
 EXTRA_DIST += remote/remote_protocol.x remote/qemu_protocol.x \
-               remote/rpcgen_fix.pl remote/remote_client_bodies.c remote/qemu_client_bodies.c
+               remote/rpcgen_fix.pl remote/remote_client_bodies.h remote/qemu_client_bodies.h
 
 # Ensure that we don't change the struct or member names or member ordering
 # in remote_protocol.x  The embedded perl below needs a few comments, and
index 4dfeab6d1dc5aa8c5e9053e966fe4e60d0853fa7..d076a90087c9056f7cb16dc871068fd6fc988b14 100644 (file)
@@ -4962,8 +4962,8 @@ done:
     return rv;
 }
 
-#include "remote_client_bodies.c"
-#include "qemu_client_bodies.c"
+#include "remote_client_bodies.h"
+#include "qemu_client_bodies.h"
 
 /*----------------------------------------------------------------------*/