Properly handle autogenerated *config.ml files in builddir
authorHilko Bengen <bengen@debian.org>
Mon, 23 Dec 2019 11:46:43 +0000 (12:46 +0100)
committerHilko Bengen <bengen@debian.org>
Tue, 24 Dec 2024 11:46:25 +0000 (12:46 +0100)
Gbp-Pq: Name Properly-handle-autogenerated-config.ml-files-in-builddir.patch

common/mlstdutils/Makefile.am
daemon/Makefile.am
ocaml-dep.sh.in
subdir-rules.mk

index 2b73bc6d1d81b488bca7d06ec8d67604df5a8fb2..ea314e48babe638c77b944bc66b4fc812936d4eb 100644 (file)
@@ -138,7 +138,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
 
index 127a943f154b3944640f947dee12f2fec55ad234..40c67634f46edccd7d657edb3378ef50c52f450e 100644 (file)
@@ -396,7 +396,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
 
index 385a1e6e21fee028add8a65fe7521d993dbac956..ff81340c669426d29686e031e1ec983e80485b8a 100755 (executable)
@@ -68,7 +68,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
index 61a3a459ee770ae91664e222e3681a5626f6e426..c712db435e362704a1b91f7a63cc7cec276c9464 100644 (file)
@@ -86,9 +86,13 @@ guestfs_am_v_po4a_translate_0 = @echo "  PO4A-T  " $@;
        $(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