Commit fa50805e authored by Pino Toscano's avatar Pino Toscano Committed by Richard W.M. Jones

Drop the generated libvirt_c.c from the sources

Let it be autogenerated from the generator.pl script during build, with
no need to keep a copy of it in the sources.

This also makes Perl an hard requirement, checking for its presence at
configure time.
parent 26d2b726
......@@ -26,6 +26,7 @@ core.*
*.dll
*.exe
*~
libvirt/libvirt_c.c
libvirt/libvirt_version.ml
examples/domain_events
examples/get_all_domain_stats
......
......@@ -37,6 +37,7 @@ clean:
for d in . $(SUBDIRS); do \
(cd $$d; rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so *.opt *~ *.dll *.exe core); \
done
rm -f libvirt/libvirt_c.c
rm -f examples/list_domains
rm -f examples/node_info
rm -f examples/get_cpu_stats
......
......@@ -47,6 +47,12 @@ AC_SUBST(WARNINGS)
AC_SUBST(CFLAGS_FPIC)
AC_SUBST(WIN32)
dnl Check for perl (required).
AC_CHECK_PROG([PERL],[perl],[perl],[no])
if test "x$PERL" = "xno"; then
AC_MSG_ERROR([Perl must be installed to build])
fi
dnl Check for libvirt development environment.
AC_ARG_WITH(libvirt,
AC_HELP_STRING([--with-libvirt=PATH],[Set path to installed libvirt]),
......
......@@ -28,6 +28,7 @@ OCAMLC = @OCAMLC@
OCAMLOPT = @OCAMLOPT@
OCAMLFIND = @OCAMLFIND@
OCAMLMKLIB = @OCAMLMKLIB@
PERL = @PERL@
ifneq ($(OCAMLFIND),)
OCAMLCPACKAGES := -package unix
......@@ -100,7 +101,7 @@ endif
# Automatically generate the C code from a Perl script 'generator.pl'.
libvirt_c.c: generator.pl
perl -w $<
$(PERL) -w $<
# Extra dependencies.
libvirt_c.c: libvirt_c_prologue.c
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment