mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
build: Fix linking of OCaml components when srcdir != builddir
ocaml-link.sh is a generated file, so run it from the build directory. Remove it from EXTRA_DIST and also adjust docs/guestfs-hacking.pod accordingly.
This commit is contained in:
committed by
Richard W.M. Jones
parent
c2c11382bb
commit
ef2761eaa0
@@ -237,7 +237,6 @@ EXTRA_DIST = \
|
||||
logo/fish-10yrs.svg logo/fish-10yrs.png \
|
||||
logo/virt-builder.svg \
|
||||
m4/.gitignore \
|
||||
ocaml-link.sh \
|
||||
podcheck.pl \
|
||||
tests/automake2junit.ml \
|
||||
tests/test-functions.sh \
|
||||
|
||||
@@ -240,9 +240,9 @@ virt_builder_DEPENDENCIES = \
|
||||
../common/mltools/mltools.$(MLARCHIVE) \
|
||||
../common/mlcustomize/mlcustomize.$(MLARCHIVE) \
|
||||
../customize/customize.$(MLARCHIVE) \
|
||||
$(top_srcdir)/ocaml-link.sh
|
||||
$(top_builddir)/ocaml-link.sh
|
||||
virt_builder_LINK = \
|
||||
$(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(top_builddir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) $(OCAMLLINKFLAGS) \
|
||||
$(OBJECTS) -o $@
|
||||
|
||||
@@ -250,9 +250,9 @@ virt_builder_repository_DEPENDENCIES = \
|
||||
$(REPOSITORY_OBJECTS) \
|
||||
../common/mltools/mltools.$(MLARCHIVE) \
|
||||
../common/mlxml/mlxml.$(MLARCHIVE) \
|
||||
$(top_srcdir)/ocaml-link.sh
|
||||
$(top_builddir)/ocaml-link.sh
|
||||
virt_builder_repository_LINK = \
|
||||
$(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(top_builddir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) $(OCAMLLINKFLAGS) \
|
||||
$(REPOSITORY_OBJECTS) -o $@
|
||||
|
||||
@@ -348,9 +348,9 @@ endif
|
||||
index_parser_tests_DEPENDENCIES = \
|
||||
$(index_parser_tests_THEOBJECTS) \
|
||||
../common/mltools/mltools.$(MLARCHIVE) \
|
||||
$(top_srcdir)/ocaml-link.sh
|
||||
$(top_builddir)/ocaml-link.sh
|
||||
index_parser_tests_LINK = \
|
||||
$(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(top_builddir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) $(OCAMLPACKAGES_TESTS) $(OCAMLLINKFLAGS) \
|
||||
$(index_parser_tests_THEOBJECTS) -o $@
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ OCAMLCLIBS = \
|
||||
OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -ccopt '$(CFLAGS)'
|
||||
|
||||
virt_customize_DEPENDENCIES = \
|
||||
$(top_srcdir)/ocaml-link.sh \
|
||||
$(top_builddir)/ocaml-link.sh \
|
||||
$(CUSTOMIZE_THEOBJECTS) \
|
||||
$(CUSTOMIZE_CMA) \
|
||||
../common/mlcustomize/mlcustomize.$(MLARCHIVE) \
|
||||
@@ -189,7 +189,7 @@ virt_customize_DEPENDENCIES = \
|
||||
../common/mltools/mltools.$(MLARCHIVE) \
|
||||
../common/mlcustomize/mlcustomize.$(MLARCHIVE)
|
||||
virt_customize_LINK = \
|
||||
$(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(top_builddir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) $(OCAMLLINKFLAGS) \
|
||||
$(CUSTOMIZE_THEOBJECTS) -o $@
|
||||
|
||||
|
||||
@@ -436,9 +436,9 @@ OCAMLLINKFLAGS = \
|
||||
|
||||
daemon_utils_tests_DEPENDENCIES = \
|
||||
$(daemon_utils_tests_THEOBJECTS) \
|
||||
$(top_srcdir)/ocaml-link.sh
|
||||
$(top_builddir)/ocaml-link.sh
|
||||
daemon_utils_tests_LINK = \
|
||||
$(top_srcdir)/ocaml-link.sh \
|
||||
$(top_builddir)/ocaml-link.sh \
|
||||
-cclib '-lutils -lgnu' \
|
||||
-- \
|
||||
$(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLLINKFLAGS) \
|
||||
|
||||
@@ -123,9 +123,9 @@ virt_dib_DEPENDENCIES = \
|
||||
../common/mlgettext/mlgettext.$(MLARCHIVE) \
|
||||
../common/mlpcre/mlpcre.$(MLARCHIVE) \
|
||||
../common/mltools/mltools.$(MLARCHIVE) \
|
||||
$(top_srcdir)/ocaml-link.sh
|
||||
$(top_builddir)/ocaml-link.sh
|
||||
virt_dib_LINK = \
|
||||
$(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(top_builddir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) $(OCAMLLINKFLAGS) \
|
||||
$(OBJECTS) -o $@
|
||||
|
||||
|
||||
@@ -921,7 +921,7 @@ command, the list of objects and the C<-cclib> libraries in the
|
||||
correct order otherwise.
|
||||
|
||||
virt_customize_LINK = \
|
||||
$(top_srcdir)/ocaml-link.sh -cclib '-lutils -lgnu' -- ...
|
||||
$(top_builddir)/ocaml-link.sh -cclib '-lutils -lgnu' -- ...
|
||||
|
||||
The actual rules, which you can examine in F<customize/Makefile.am>, are a
|
||||
little bit more complicated than this because they have to handle:
|
||||
|
||||
@@ -105,9 +105,9 @@ virt_get_kernel_DEPENDENCIES = \
|
||||
../common/mlgettext/mlgettext.$(MLARCHIVE) \
|
||||
../common/mlpcre/mlpcre.$(MLARCHIVE) \
|
||||
../common/mltools/mltools.$(MLARCHIVE) \
|
||||
$(top_srcdir)/ocaml-link.sh
|
||||
$(top_builddir)/ocaml-link.sh
|
||||
virt_get_kernel_LINK = \
|
||||
$(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(top_builddir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) $(OCAMLLINKFLAGS) \
|
||||
$(OBJECTS) -o $@
|
||||
|
||||
|
||||
@@ -104,9 +104,9 @@ virt_resize_DEPENDENCIES = \
|
||||
../common/mlgettext/mlgettext.$(MLARCHIVE) \
|
||||
../common/mlpcre/mlpcre.$(MLARCHIVE) \
|
||||
../common/mltools/mltools.$(MLARCHIVE) \
|
||||
$(top_srcdir)/ocaml-link.sh
|
||||
$(top_builddir)/ocaml-link.sh
|
||||
virt_resize_LINK = \
|
||||
$(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(top_builddir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) $(OCAMLLINKFLAGS) \
|
||||
$(OBJECTS) -o $@
|
||||
|
||||
|
||||
@@ -112,9 +112,9 @@ virt_sparsify_DEPENDENCIES = \
|
||||
../common/mlgettext/mlgettext.$(MLARCHIVE) \
|
||||
../common/mlpcre/mlpcre.$(MLARCHIVE) \
|
||||
../common/mltools/mltools.$(MLARCHIVE) \
|
||||
$(top_srcdir)/ocaml-link.sh
|
||||
$(top_builddir)/ocaml-link.sh
|
||||
virt_sparsify_LINK = \
|
||||
$(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(top_builddir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) $(OCAMLLINKFLAGS) \
|
||||
$(OBJECTS) -o $@
|
||||
|
||||
|
||||
@@ -165,9 +165,9 @@ virt_sysprep_DEPENDENCIES = \
|
||||
../common/mltools/mltools.$(MLARCHIVE) \
|
||||
../common/mlcustomize/mlcustomize.$(MLARCHIVE) \
|
||||
../customize/customize.$(MLARCHIVE) \
|
||||
$(top_srcdir)/ocaml-link.sh
|
||||
$(top_builddir)/ocaml-link.sh
|
||||
virt_sysprep_LINK = \
|
||||
$(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(top_builddir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
|
||||
$(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) $(OCAMLLINKFLAGS) \
|
||||
$(OBJECTS) -o $@
|
||||
|
||||
|
||||
Reference in New Issue
Block a user