Further work on storage API and autogenerating bindings.
[virt-top.git] / libvirt / Makefile.in
index 53b25b0..4b203fd 100644 (file)
@@ -98,6 +98,21 @@ $(BYTE_TARGETS) $(OPT_TARGETS):
 endif
 endif
 
+# Automatically generate the C code from a Perl script 'generator.pl'.
+libvirt_c.c: generator.pl
+       perl -w $<
+
+# Status of automatically generated bindings.
+autostatus: libvirt_c.c
+       @echo -n "Functions which have manual bindings:    "
+       @grep ^ocaml_libvirt_ libvirt_c_oneoffs.c  | wc -l
+       @echo -n "Functions which have automatic bindings: "
+       @grep ^ocaml_libvirt_ libvirt_c.c  | wc -l
+       @echo -n "LOC in manual bindings:    "
+       @wc -l < libvirt_c_oneoffs.c
+       @echo -n "LOC in automatic bindings: "
+       @wc -l < libvirt_c.c
+
 libvirt.cmo: libvirt.cmi
 libvirt.cmi: libvirt.mli