From: Hilko Bengen Date: Mon, 23 Dec 2019 11:46:43 +0000 (+0100) Subject: Properly handle autogenerated *config.ml files in builddir X-Git-Tag: archive/raspbian/1%1.44.0-1+rpi1~10 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1862c3728958a4eb42fd5502881e9bc9947d05de;p=libguestfs.git Properly handle autogenerated *config.ml files in builddir Gbp-Pq: Name 0016-Properly-handle-autogenerated-config.ml-files-in-bui.patch --- diff --git a/common/mlstdutils/Makefile.am b/common/mlstdutils/Makefile.am index 2b4aed8e..3b2d1462 100644 --- a/common/mlstdutils/Makefile.am +++ b/common/mlstdutils/Makefile.am @@ -150,7 +150,7 @@ check-valgrind: $(MAKE) VG="@VG@" check # OCaml dependencies. -.depend: $(srcdir)/*.mli $(srcdir)/*.ml +.depend: $(srcdir)/*.mli $(srcdir)/*.ml $(builddir)/guestfs_config.ml $(top_builddir)/ocaml-dep.sh $^ -include .depend diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 53c75b85..0256434b 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -380,7 +380,7 @@ camldaemon.o: $(OBJECTS) $(OBJECTS) # OCaml dependencies. -.depend: $(srcdir)/*.mli $(srcdir)/*.ml +.depend: $(srcdir)/*.mli $(srcdir)/*.ml $(builddir)/daemon_config.ml $(top_builddir)/ocaml-dep.sh $^ -include .depend diff --git a/ocaml-dep.sh.in b/ocaml-dep.sh.in index a8fed02f..c700dde1 100755 --- a/ocaml-dep.sh.in +++ b/ocaml-dep.sh.in @@ -74,7 +74,7 @@ echo >> $output-t | sed \ -e "s,@abs_top_srcdir@/${subdir},.,g" \ -e "s,\B${srcdir_re}/\\([^ ]*[.]\\)\\(cm[^ ]*\\|o\\),\\1\\2,g" \ - -e "s,\B${srcdir_re}/\\([^ /]*_config[.]ml\\),\\1,g" \ + -e "s,\B${srcdir_re}/\\([^ /]*config[.]ml\\),\\1,g" \ -e "s,@abs_top_srcdir@/\\([^ ]*[.]\\)\\(cm[^ ]*\\|o\\),${top_builddir}/\\1\\2,g" \ -e 's,\(^\| \)./,\1,g' \ >> $output-t diff --git a/subdir-rules.mk b/subdir-rules.mk index 8532fb23..94367f27 100644 --- a/subdir-rules.mk +++ b/subdir-rules.mk @@ -83,9 +83,13 @@ guestfs_am_v_jar_0 = @echo " JAR " $@; $(guestfs_am_v_ocamlcmi)$(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@ %.cmo: %.ml $(guestfs_am_v_ocamlc)$(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@ +%.cmo: $(builddir)/%.ml + $(guestfs_am_v_ocamlc)$(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@ if HAVE_OCAMLOPT %.cmx: %.ml $(guestfs_am_v_ocamlopt)$(OCAMLFIND) ocamlopt $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@ +%.cmx: $(builddir)/%.ml + $(guestfs_am_v_ocamlopt)$(OCAMLFIND) ocamlopt $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@ endif # Test shell scripts should use '$TEST_FUNCTIONS' to get a predefined