tools/ocaml: fix build dependency target
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 25 Feb 2022 15:13:21 +0000 (15:13 +0000)
committerJulien Grall <jgrall@amazon.com>
Thu, 16 Jun 2022 15:58:50 +0000 (16:58 +0100)
commit0c5304d14a1c0b8016b942675041da36227713f0
treec928fa32c249b70a3a73eb2ba4290a1e54f2fd09
parent41156021e27a926feec267ecba206c78bca33417
tools/ocaml: fix build dependency target

They are two competiting spelling for the variable holding the path to
"tools/ocaml", $(TOPLEVEL) and $(OCAML_TOPLEVEL). The "Makefile.rules"
which is included in all ocaml Makefiles have one rule which make use
of that variable which is then sometime unset. When building
"ocaml/xenstored", make isn't capable of generating ".ocamldep.make"
because $(TOPLEVEL) isn't defined in this case.

This can fail with an error like this when paths.ml have been
regenerated:
    Error: Files define.cmx and paths.cmx
       make inconsistent assumptions over interface Paths

This patch fix ".ocamldep.make" rule by always spelling the variable
$(OCAML_TOPLEVEL).

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
tools/ocaml/Makefile.rules
tools/ocaml/libs/eventchn/Makefile
tools/ocaml/libs/mmap/Makefile
tools/ocaml/libs/xb/Makefile
tools/ocaml/libs/xc/Makefile
tools/ocaml/libs/xentoollog/Makefile
tools/ocaml/libs/xl/Makefile
tools/ocaml/libs/xs/Makefile