Richard W.M. Jones 6d0ad49d5e build: Add missing pattern rule to build *.cmi from *.ml.
In the case where we have a module.ml without a corresponding
module.mli file, ocamldep generates (correct) dependencies:

  module.cmx module.cmi : module.ml

but we had no rule telling make how to generate the module.cmi
file from module.ml.

This didn't matter very much because when make came to build
module.cmx, the module.cmi file is generated as a side-effect.

However for highly parallel builds, the build ordering was still
incorrect.  Any other module that depends on module.cmi could be built
in parallel.  You would very occasionally see errors like this one:

  File "_none_", line 1:
  Error: Files index.cmx and utils.cmx
         make inconsistent assumptions over interface Utils

Fixing this involves adding a ‘%.cmi: %.ml’ rule.  However we have to
be careful that make doesn't run this rule instead of the ‘%.cmi: %.mli’
rule (if module.mli did exist).  It turns out that GNU make says we
can depend on rule ordering in the Makefile for this.

I found that this only works correctly if we use "%"-style pattern
rules (not the ‘.ml.cmi:’ old-style rules).

This is *still* not a complete fix.  Make still doesn't know that the
rules ‘%.cmo: %.ml’ and ‘%.cmx: %.ml’ also build the .cmi file as a
side-effect, so you can still occasionally see build failures.
However I could not work out how to add the extra information to the
dependencies without causing make itself to go into an infinite loop.
It may be that in the end we will have to get rid of pattern rules
completely and generate the complete OCaml rule set.
2017-09-15 13:31:18 +01:00
2017-06-22 15:19:44 +01:00
2017-01-03 16:48:21 +01:00
2011-11-08 14:43:07 +00:00
2017-01-26 15:05:46 +00:00
2017-08-01 16:06:48 +02:00
2017-01-26 15:05:46 +00:00
2017-09-14 18:05:00 +01:00
2017-09-14 18:05:00 +01:00
2017-08-10 15:03:37 +02:00
2013-01-24 15:00:49 +00:00
2017-09-14 18:05:00 +01:00
2017-01-26 15:05:46 +00:00
2017-09-14 19:46:41 +01:00
2017-01-26 15:05:46 +00:00
2017-01-03 16:48:21 +01:00
2017-01-03 16:48:21 +01:00
2017-09-14 19:46:41 +01:00
2017-01-26 15:05:46 +00:00
2017-01-03 16:48:21 +01:00
2017-01-03 16:48:21 +01:00
2016-02-10 14:15:05 +01:00

Libguestfs is tools and a library for accessing and modifying guest
disk images.  For more information see the home page:

  http://libguestfs.org/

For discussion, development, patches, etc. please use the mailing
list:

  http://www.redhat.com/mailman/listinfo/libguestfs

To find out how to build libguestfs from source, read:

  docs/guestfs-building.pod
  http://libguestfs.org/guestfs-building.1.html
  man docs/guestfs-building.1

Copyright (C) 2009-2017 Red Hat Inc.

The library is distributed under the LGPLv2+.  The programs are
distributed under the GPLv2+.  Please see the files COPYING and
COPYING.LIB for full license information.  The examples are under a
very liberal license.
Languages
C 42.7%
OCaml 35.5%
Shell 7.1%
Makefile 4%
Perl 2.6%
Other 8%