Matthew Booth
2010-Oct-29 09:19 UTC
[Libguestfs] [PATCH] Bootstrap ocaml/.depend more thoroughly
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 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Bootstrap-ocaml-.depend-more-thoroughly.patch Type: text/x-patch Size: 1456 bytes Desc: not available URL: <http://listman.redhat.com/archives/libguestfs/attachments/20101029/b6fe0e77/attachment.bin>
Richard W.M. Jones
2010-Oct-29 09:32 UTC
[Libguestfs] [PATCH] Bootstrap ocaml/.depend more thoroughly
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
Reasonably Related Threads
- [PATCH] Fix out-of-tree builds of OCaml components
- [libnbd PATCH] build: Fix OCaml build on Fedora 29
- [PATCH] Remove ocaml/.depend from git
- [PATCH 1/4] More fixes for situations where ocamlopt is not available
- ocamldep -all seems to break builds on platforms without a native compiler