[Libguestfs] [PATCH] Bootstrap ocaml/.depend more thoroughly

Richard W.M. Jones rjones at redhat.com
Fri Oct 29 09:32:12 UTC 2010


On Fri, Oct 29, 2010 at 10:19:32AM +0100, Matthew Booth wrote:
> 
> Although I haven't experienced a specific problem with bootstrapping an empty
> .depend file, this commit bootstraps it properly using ocamldep. This may or may
> not solve any real problem, but it's quite simple and more obviously correct.
> ---
>  bootstrap             |    2 +-
>  ocaml/Makefile.am     |   10 +++-------
>  ocaml/Makefile.depend |    6 ++++++
>  3 files changed, 10 insertions(+), 8 deletions(-)
>  create mode 100644 ocaml/Makefile.depend
> 

> diff --git a/bootstrap b/bootstrap
> index 5ceac31..c0fa3ff 100755
> --- a/bootstrap
> +++ b/bootstrap
> @@ -87,7 +87,7 @@ $gnulib_tool			\
>  
>  # ocaml/.depend is updated automatically. However, as it's included by
>  # ocaml/Makefile.am we need to bootstrap it here.
> -touch ocaml/.depend
> +make -C ocaml -f Makefile.depend .depend
[...]
> diff --git a/ocaml/Makefile.depend b/ocaml/Makefile.depend
> new file mode 100644
> index 0000000..9977b7a
> --- /dev/null
> +++ b/ocaml/Makefile.depend
> @@ -0,0 +1,6 @@
> +# This is split into a separate Makefile because it is used by bootstrap to
> +# create .depend before running automake
> +.depend: $(wildcard *.mli) $(wildcard *.ml)
> +	rm -f $@ $@-t
> +	$(OCAMLFIND) ocamldep $^ | sed 's/  *$$//' | sort > $@-t
> +	mv $@-t $@

I don't understand how this patch would work in the general case,
since $(OCAMLFIND) would be undefined, and ocamldep may not be
available.

I would just leave this as it is, although I added 'touch ocaml/.depend'
to autogen.sh this morning to work around another problem.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top




More information about the Libguestfs mailing list