Richard W.M. Jones
2013-Apr-24 20:55 UTC
[Libguestfs] [PATCH 00/12] Various patches for fixing separated builds.
This just fixes 'make'. 'make check' is still broken. Further patches for that to follow tomorrow. Rich.
Richard W.M. Jones
2013-Apr-24 20:55 UTC
[Libguestfs] [PATCH 01/12] subdirs-rules: Remove 'appliance' rule.
From: "Richard W.M. Jones" <rjones at redhat.com> It is no longer used anywhere. If users want to build just the appliance, then they could do 'make -C appliance'. --- subdir-rules.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/subdir-rules.mk b/subdir-rules.mk index e675c4f..0995a74 100644 --- a/subdir-rules.mk +++ b/subdir-rules.mk @@ -24,7 +24,3 @@ $(generator_built): $(top_builddir)/generator/stamp-generator $(top_builddir)/generator/stamp-generator: force $(MAKE) -C $(top_builddir)/generator stamp-generator -# A symbolic rule to regenerate the appliance -.PHONY: appliance -appliance: force - $(MAKE) -C $(top_builddir)/appliance -- 1.8.1.4
From: "Richard W.M. Jones" <rjones at redhat.com> Because the generator subdirectory is cleaned first, and other directories recurse into the generator directory, 'make distclean' would fail (because generator/Makefile would be deleted by that point). Change subdirs-rules.mk so it doesn't fail if generator/Makefile has been deleted already. --- subdir-rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subdir-rules.mk b/subdir-rules.mk index 0995a74..24eff4f 100644 --- a/subdir-rules.mk +++ b/subdir-rules.mk @@ -22,5 +22,5 @@ # generator_built is defined in individual Makefiles $(generator_built): $(top_builddir)/generator/stamp-generator $(top_builddir)/generator/stamp-generator: force - $(MAKE) -C $(top_builddir)/generator stamp-generator - + ! test -f $(top_builddir)/generator/Makefile || \ + $(MAKE) -C $(top_builddir)/generator stamp-generator -- 1.8.1.4
Richard W.M. Jones
2013-Apr-24 20:55 UTC
[Libguestfs] [PATCH 03/12] tests/data: Ensure all generated image files are removed by 'make clean'.
From: "Richard W.M. Jones" <rjones at redhat.com> Otherwise the build breaks if you switch from a non-separated build to a separated build. --- tests/data/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index 2e3012e..d854fb3 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -45,8 +45,7 @@ noinst_DATA = test.iso CLEANFILES = \ test.iso test.sqsh \ - 100kallzeroes 100kallnewlines 100kallspaces 100krandom 10klines \ - initrd + $(images_files_build) images_files_src = \ $(srcdir)/helloworld.tar \ -- 1.8.1.4
Richard W.M. Jones
2013-Apr-24 20:55 UTC
[Libguestfs] [PATCH 04/12] configure: Make sure that certain build directories exist.
From: "Richard W.M. Jones" <rjones at redhat.com> When builddir != srcdir, this ensures that certain build directories which might not exist are created by configure. --- appliance/Makefile.am | 4 ---- configure.ac | 13 +++++++++++++ java/Makefile.am | 1 - ocaml/Makefile.am | 17 ----------------- tests/guests/Makefile.am | 2 -- 5 files changed, 13 insertions(+), 24 deletions(-) diff --git a/appliance/Makefile.am b/appliance/Makefile.am index 28ae06b..dfd1a84 100644 --- a/appliance/Makefile.am +++ b/appliance/Makefile.am @@ -78,13 +78,11 @@ excludelist: excludelist.in Makefile supermin.d/base.img supermin.d/hostfiles: stamp-supermin stamp-supermin: make.sh packagelist excludelist - mkdir -p supermin.d rm -f $@ supermin.d/base.img supermin.d/hostfiles ./make.sh touch $@ supermin.d/daemon.img: ../daemon/guestfsd guestfsd.suppressions - mkdir -p supermin.d rm -f $@ $@-t rm -rf tmp-d mkdir -p tmp-d$(DAEMON_SUPERMIN_DIR) tmp-d/etc @@ -96,7 +94,6 @@ supermin.d/daemon.img: ../daemon/guestfsd guestfsd.suppressions supermin.d/init.img: init cmp -s $(srcdir)/init $(builddir)/init || cp $(srcdir)/init $(builddir)/init - mkdir -p supermin.d rm -f $@ $@-t echo "init" | cpio --quiet -o -H newc > $@-t mv $@-t $@ @@ -104,7 +101,6 @@ supermin.d/init.img: init # We should put this file in /lib/udev/rules.d, but put it in /etc so # we don't have to deal with all the UsrMove crap in Fedora. supermin.d/udev-rules.img: 99-guestfs-serial.rules - mkdir -p supermin.d rm -f $@ $@-t rm -rf tmp-u mkdir -p tmp-u/etc/udev/rules.d diff --git a/configure.ac b/configure.ac index af45de8..c290fa9 100644 --- a/configure.ac +++ b/configure.ac @@ -1528,7 +1528,19 @@ LIBTOOL='bash $(top_srcdir)/libtool-kill-dependency_libs.sh $(top_builddir)/libt AC_SUBST([LIBTOOL]) dnl Produce output files. + AC_CONFIG_HEADERS([config.h]) + +dnl For separated builds, make sure that certain build directories exist. +dnl This avoids having to sprinkle 'mkdir -p' statements throughout +dnl many Makefile.am rules. +mkdir -p \ + appliance/supermin.d \ + java/t \ + ocaml/html \ + ocaml/t \ + tests/guests/guest-aux + dnl http://www.mail-archive.com/automake at gnu.org/msg10204.html AC_CONFIG_FILES([appliance/libguestfs-make-fixed-appliance], [chmod +x,-w appliance/libguestfs-make-fixed-appliance]) @@ -1540,6 +1552,7 @@ AC_CONFIG_FILES([podwrapper.pl], [chmod +x,-w podwrapper.pl]) AC_CONFIG_FILES([run], [chmod +x,-w run]) + AC_CONFIG_FILES([Makefile align/Makefile appliance/Makefile diff --git a/java/Makefile.am b/java/Makefile.am index c3bb337..240b2de 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -132,7 +132,6 @@ TESTS_ENVIRONMENT = $(top_builddir)/run --test noinst_DATA = Bindtests.class $(java_tests:.java=.class) t/%.class: t/%.java libguestfs-$(VERSION).jar - mkdir -p t $(JAVAC) $(JAVAC_FLAGS) -classpath libguestfs-$(VERSION).jar -d $(builddir)/t $< Bindtests.class: Bindtests.java libguestfs-$(VERSION).jar diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index 5215f1d..d3b3a2e 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -90,7 +90,6 @@ if HAVE_OCAMLDOC noinst_DATA += html/index.html html/index.html: $(srcdir)/guestfs*.mli $(srcdir)/guestfs*.ml - mkdir -p html -$(OCAMLDOC) -d html -html $^ endif @@ -120,75 +119,59 @@ noinst_DATA += \ $(test_progs:%=%.opt) bindtests.bc: bindtests.cmo mlguestfs.cma - mkdir -p t $(top_builddir)/libtool -dlopen $(top_builddir)/src/.libs/libguestfs.la --mode=execute \ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -I . -package unix -linkpkg mlguestfs.cma $< -o $@ bindtests.opt: bindtests.cmx mlguestfs.cmxa - mkdir -p t $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -cclib -L$(top_builddir)/src/.libs -I . -package unix -linkpkg mlguestfs.cmxa $< -o $@ t/guestfs_005_load.bc: t/guestfs_005_load.cmo mlguestfs.cma - mkdir -p t $(top_builddir)/libtool -dlopen $(top_builddir)/src/.libs/libguestfs.la --mode=execute \ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -I . -package unix -linkpkg mlguestfs.cma $< -o $@ t/guestfs_005_load.opt: t/guestfs_005_load.cmx mlguestfs.cmxa - mkdir -p t $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -cclib -L$(top_builddir)/src/.libs -I . -package unix -linkpkg mlguestfs.cmxa $< -o $@ t/guestfs_010_basic.bc: t/guestfs_010_basic.cmo mlguestfs.cma - mkdir -p t $(top_builddir)/libtool -dlopen $(top_builddir)/src/.libs/libguestfs.la --mode=execute \ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -I . -package unix -linkpkg mlguestfs.cma $< -o $@ t/guestfs_010_basic.opt: t/guestfs_010_basic.cmx mlguestfs.cmxa - mkdir -p t $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -cclib -L$(top_builddir)/src/.libs -I . -package unix -linkpkg mlguestfs.cmxa $< -o $@ t/guestfs_070_threads.bc: t/guestfs_070_threads.cmo mlguestfs.cma - mkdir -p t $(top_builddir)/libtool -dlopen $(top_builddir)/src/.libs/libguestfs.la --mode=execute \ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -I . -package unix,threads -thread -linkpkg mlguestfs.cma $< -o $@ t/guestfs_070_threads.opt: t/guestfs_070_threads.cmx mlguestfs.cmxa - mkdir -p t $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -cclib -L$(top_builddir)/src/.libs -I . -package unix,threads -thread -linkpkg mlguestfs.cmxa $< -o $@ t/guestfs_080_optargs.bc: t/guestfs_080_optargs.cmo mlguestfs.cma - mkdir -p t $(top_builddir)/libtool -dlopen $(top_builddir)/src/.libs/libguestfs.la --mode=execute \ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -I . -package unix -linkpkg mlguestfs.cma $< -o $@ t/guestfs_080_optargs.opt: t/guestfs_080_optargs.cmx mlguestfs.cmxa - mkdir -p t $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -cclib -L$(top_builddir)/src/.libs -I . -package unix -linkpkg mlguestfs.cmxa $< -o $@ t/guestfs_400_events.bc: t/guestfs_400_events.cmo mlguestfs.cma - mkdir -p t $(top_builddir)/libtool -dlopen $(top_builddir)/src/.libs/libguestfs.la --mode=execute \ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -I . -package unix -linkpkg mlguestfs.cma $< -o $@ t/guestfs_400_events.opt: t/guestfs_400_events.cmx mlguestfs.cmxa - mkdir -p t $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -cclib -L$(top_builddir)/src/.libs -I . -package unix -linkpkg mlguestfs.cmxa $< -o $@ t/guestfs_400_progress.bc: t/guestfs_400_progress.cmo mlguestfs.cma - mkdir -p t $(top_builddir)/libtool -dlopen $(top_builddir)/src/.libs/libguestfs.la --mode=execute \ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -I . -package unix -linkpkg mlguestfs.cma $< -o $@ t/guestfs_400_progress.opt: t/guestfs_400_progress.cmx mlguestfs.cmxa - mkdir -p t $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -cclib -L$(top_builddir)/src/.libs -I . -package unix -linkpkg mlguestfs.cmxa $< -o $@ t/guestfs_500_mount_local.bc: t/guestfs_500_mount_local.cmo mlguestfs.cma - mkdir -p t $(top_builddir)/libtool -dlopen $(top_builddir)/src/.libs/libguestfs.la --mode=execute \ $(OCAMLFIND) ocamlc -custom $(OCAMLCFLAGS) -I . -package unix -linkpkg mlguestfs.cma $< -o $@ t/guestfs_500_mount_local.opt: t/guestfs_500_mount_local.cmx mlguestfs.cmxa - mkdir -p t $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -cclib -L$(top_builddir)/src/.libs -I . -package unix -linkpkg mlguestfs.cmxa $< -o $@ # Explicit rules for these tests which require 'threads' package. diff --git a/tests/guests/Makefile.am b/tests/guests/Makefile.am index 884098d..3fd2cfa 100644 --- a/tests/guests/Makefile.am +++ b/tests/guests/Makefile.am @@ -106,13 +106,11 @@ fedora-btrfs.img: guest-aux/make-fedora-img.pl \ guest-aux/fedora-name.db: guest-aux/fedora-name.db.txt rm -f $@ $@-t - mkdir -p guest-aux $(DB_LOAD) $@-t < $< mv $@-t $@ guest-aux/fedora-packages.db: guest-aux/fedora-packages.db.txt rm -f $@ $@-t - mkdir -p guest-aux $(DB_LOAD) $@-t < $< mv $@-t $@ -- 1.8.1.4
Richard W.M. Jones
2013-Apr-24 20:55 UTC
[Libguestfs] [PATCH 05/12] generator: Make stamp-generator in the Makefile.
From: "Richard W.M. Jones" <rjones at redhat.com> Since stamp-generator is a Makefile thing, make it in the Makefile, not in the generator itself. Also this ensures stamp-generator is created in the builddir, not in the source directory (fixing separated builds). --- generator/Makefile.am | 6 +++--- generator/main.ml | 9 +-------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/generator/Makefile.am b/generator/Makefile.am index bc92070..9dd3d4c 100644 --- a/generator/Makefile.am +++ b/generator/Makefile.am @@ -86,12 +86,11 @@ depend: .depend else # No OCaml compiler. Just replace the generator with a script that -# touches stamp-generator and prints a warning. +# prints a warning. $(srcdir)/generator: $(SOURCES) rm -f $@ $@-t - echo 'echo Warning: Install OCaml compiler in order to rebuild the generated files.' >> $@-t - echo 'touch generator/stamp-generator' >> $@-t + echo 'echo Warning: Install OCaml compiler in order to rebuild the generated files.' > $@-t chmod +x $@-t mv $@-t $@ @@ -112,6 +111,7 @@ stamp-generator: generator mkdir -p $(top_srcdir)/gobject/include mkdir -p $(top_srcdir)/gobject/include/guestfs-gobject cd $(top_srcdir) && generator/generator + touch $@ CLEANFILES = $(noinst_DATA) $(noinst_PROGRAM) *.cmi *.cmo *~ diff --git a/generator/main.ml b/generator/main.ml index 3914932..786dfa6 100644 --- a/generator/main.ml +++ b/generator/main.ml @@ -207,11 +207,4 @@ Run it from the top source directory using the command printf "generated %d lines of code\n" (get_lines_generated ()); let files = List.sort compare (get_files_generated ()) in output_to "generator/files-generated.txt" - (fun () -> List.iter (pr "%s\n") files); - - (* Always generate this file last, and unconditionally. It's used - * by the Makefile to know when we must re-run the generator. - *) - let chan = open_out "generator/stamp-generator" in - fprintf chan "1\n"; - close_out chan + (fun () -> List.iter (pr "%s\n") files) -- 1.8.1.4
Richard W.M. Jones
2013-Apr-24 20:55 UTC
[Libguestfs] [PATCH 06/12] generator: Place generator, stamp-generator, build files into builddir.
From: "Richard W.M. Jones" <rjones at redhat.com> Previously the generator binary was (deliberately) placed into the source directory. However there was no real reason for this to happen. Always put the build products into the builddir. --- generator/Makefile.am | 132 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 84 insertions(+), 48 deletions(-) diff --git a/generator/Makefile.am b/generator/Makefile.am index 9dd3d4c..ba0b772 100644 --- a/generator/Makefile.am +++ b/generator/Makefile.am @@ -1,5 +1,5 @@ # libguestfs -# Copyright (C) 2010-2012 Red Hat Inc. +# Copyright (C) 2010-2013 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,70 +15,106 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -SOURCES = \ - types.ml \ - utils.mli \ - utils.ml \ - actions.mli \ +# In alphabetical order. +sources = \ actions.ml \ - structs.mli \ - structs.ml \ - api_versions.mli \ + actions.mli \ api_versions.ml \ - optgroups.ml \ - prepopts.mli \ - prepopts.ml \ - events.ml \ - pr.mli \ - pr.ml \ - docstrings.ml \ - checks.ml \ + api_versions.mli \ + bindtests.ml \ c.ml \ - xdr.ml \ + checks.ml \ + csharp.ml \ daemon.ml \ - tests_c_api.ml \ + docstrings.ml \ + erlang.ml \ + errnostring.ml \ + events.ml \ fish.ml \ + gobject.ml \ + haskell.ml \ + java.ml \ + lua.ml \ + main.ml \ ocaml.ml \ + optgroups.ml \ perl.ml \ + php.ml \ + pr.ml \ + pr.mli \ + prepopts.ml \ + prepopts.mli \ python.ml \ ruby.ml \ - java.ml \ - haskell.ml \ - csharp.ml \ - php.ml \ - erlang.ml \ - lua.ml \ - gobject.ml \ - bindtests.ml \ - errnostring.ml \ - main.ml - -SOURCES_ML = $(filter %.ml,$(SOURCES)) -OBJECTS = $(SOURCES_ML:.ml=.cmo) - -EXTRA_DIST = $(SOURCES) files-generated.txt - -OCAMLCFLAGS = -warn-error CDEFLMPSUVYZX -OCAMLCLIBS = unix.cma str.cma + structs.ml \ + structs.mli \ + tests_c_api.ml \ + types.ml \ + utils.ml \ + utils.mli \ + xdr.ml + +# In build dependency order. +objects = \ + types.cmo \ + utils.cmo \ + actions.cmo \ + structs.cmo \ + api_versions.cmo \ + optgroups.cmo \ + prepopts.cmo \ + events.cmo \ + pr.cmo \ + docstrings.cmo \ + checks.cmo \ + c.cmo \ + xdr.cmo \ + daemon.cmo \ + tests_c_api.cmo \ + fish.cmo \ + ocaml.cmo \ + perl.cmo \ + python.cmo \ + ruby.cmo \ + java.cmo \ + haskell.cmo \ + csharp.cmo \ + php.cmo \ + erlang.cmo \ + lua.cmo \ + gobject.cmo \ + bindtests.cmo \ + errnostring.cmo \ + main.cmo + +EXTRA_DIST = $(sources) files-generated.txt + +OCAMLCFLAGS = -warn-error CDEFLMPSUVYZX -I $(srcdir) -I $(builddir) -package unix,str noinst_PROGRAM = generator if HAVE_OCAML -$(srcdir)/generator: $(OBJECTS) - $(OCAMLC) -I $(srcdir) -o $@ $(OCAMLCFLAGS) $(OCAMLCLIBS) $(OBJECTS) - -.ml.cmo: - $(OCAMLC) -I $(srcdir) $(OCAMLCFLAGS) -c $< -o $@ +generator: $(objects) + $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -linkpkg $^ -o $@ -.mli.cmi: - $(OCAMLC) -I $(srcdir) $(OCAMLCFLAGS) -c $< -o $@ +# Dependencies. +%.cmi: %.mli + $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $(builddir)/$@ +%.cmi: %.ml + $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $(builddir)/$@ +%.cmo: %.ml + $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $(builddir)/$@ depend: .depend -.depend: $(SOURCES) +.depend: $(wildcard $(abs_srcdir)/*.mli) $(wildcard $(abs_srcdir)/*.ml) rm -f $@ $@-t - $(OCAMLDEP) $^ | sed 's/ *$$//' > $@-t + $(OCAMLFIND) ocamldep -I ../ocaml -I $(abs_srcdir) $^ | \ + $(SED) 's/ *$$//' | \ + $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \ + $(SED) -e 's,$(abs_srcdir)/,$(builddir)/,g' | \ + sort > $@-t mv $@-t $@ -include .depend @@ -88,7 +124,7 @@ else # No OCaml compiler. Just replace the generator with a script that # prints a warning. -$(srcdir)/generator: $(SOURCES) +generator: rm -f $@ $@-t echo 'echo Warning: Install OCaml compiler in order to rebuild the generated files.' > $@-t chmod +x $@-t @@ -110,7 +146,7 @@ stamp-generator: generator mkdir -p $(top_srcdir)/gobject/src mkdir -p $(top_srcdir)/gobject/include mkdir -p $(top_srcdir)/gobject/include/guestfs-gobject - cd $(top_srcdir) && generator/generator + cd $(top_srcdir) && $(abs_builddir)/generator touch $@ CLEANFILES = $(noinst_DATA) $(noinst_PROGRAM) *.cmi *.cmo *~ -- 1.8.1.4
Richard W.M. Jones
2013-Apr-24 20:55 UTC
[Libguestfs] [PATCH 07/12] ocaml: bindtests.ml is generated in the source directory.
From: "Richard W.M. Jones" <rjones at redhat.com> This seems to be necessary because separated builds don't recognize the *.ml file as being a source file (unlike, for example, *.c files). --- ocaml/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index d3b3a2e..6f3fd88 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -27,7 +27,7 @@ generator_built = \ guestfs.mli \ guestfs.ml \ guestfs-c-actions.c \ - bindtests.ml + $(srcdir)/bindtests.ml EXTRA_DIST = \ $(generator_built) \ -- 1.8.1.4
Richard W.M. Jones
2013-Apr-24 20:55 UTC
[Libguestfs] [PATCH 08/12] java: Bindtests.java is generated in the source directory.
From: "Richard W.M. Jones" <rjones at redhat.com> Fix for separated builds. --- java/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/Makefile.am b/java/Makefile.am index 240b2de..e67ebe3 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -26,7 +26,7 @@ generator_built = \ Makefile.inc \ $(java_built_sources) \ com_redhat_et_libguestfs_GuestFS.c \ - Bindtests.java + $(srcdir)/Bindtests.java # Pull in automatically generated built sources include $(srcdir)/Makefile.inc -- 1.8.1.4
Richard W.M. Jones
2013-Apr-24 20:55 UTC
[Libguestfs] [PATCH 09/12] java: Allow source directory to be prepended by make.
From: "Richard W.M. Jones" <rjones at redhat.com> Fix for separated builds. --- java/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/Makefile.am b/java/Makefile.am index e67ebe3..c03eb06 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -71,7 +71,7 @@ libguestfs_jardir = $(JAR_INSTALL_DIR) libguestfs_jar_DATA = libguestfs-${VERSION}.jar libguestfs_jar_class_files = $(java_sources:.java=.class) $(libguestfs_jar_class_files): %.class: %.java - $(JAVAC) $(JAVAC_FLAGS) -d $(builddir) -classpath $(srcdir):$(builddir) $(srcdir)/$< + $(JAVAC) $(JAVAC_FLAGS) -d $(builddir) -classpath $(srcdir):$(builddir) $< libguestfs-${VERSION}.jar: $(libguestfs_jar_class_files) $(JAR) cf $@ $^ -- 1.8.1.4
Richard W.M. Jones
2013-Apr-24 20:55 UTC
[Libguestfs] [PATCH 10/12] haskell: Fix separated builds.
From: "Richard W.M. Jones" <rjones at redhat.com> --- haskell/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/haskell/Makefile.am b/haskell/Makefile.am index 5328ca0..ed2224c 100644 --- a/haskell/Makefile.am +++ b/haskell/Makefile.am @@ -18,7 +18,7 @@ include $(top_srcdir)/subdir-rules.mk generator_built = \ - Guestfs.hs \ + $(srcdir)/Guestfs.hs \ Bindtests.hs # $(generator_built) isn't redundant below as the wildcard rule won't match, and @@ -85,7 +85,7 @@ built_tests = Bindtests Guestfs010Load Guestfs030Config Guestfs050LVCreate # directories per target. $(built_tests): %: %.hs Guestfs.hs - $(GHC) $(GHCFLAGS) --make -main-is $@ -odir .$@ -o $@ $< Guestfs.hs -lguestfs + $(GHC) $(GHCFLAGS) --make -main-is $@ -odir .$@ -o $@ $< $(srcdir)/Guestfs.hs -lguestfs CLEANFILES = $(all_targets) *~ *.hi *.o test.img -- 1.8.1.4
Richard W.M. Jones
2013-Apr-24 20:55 UTC
[Libguestfs] [PATCH 11/12] gobject: Fix separated builds.
From: "Richard W.M. Jones" <rjones at redhat.com> --- gobject/docs/guestfs-docs.sgml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gobject/docs/guestfs-docs.sgml.in b/gobject/docs/guestfs-docs.sgml.in index 61f0481..23bfccf 100644 --- a/gobject/docs/guestfs-docs.sgml.in +++ b/gobject/docs/guestfs-docs.sgml.in @@ -16,7 +16,7 @@ </releaseinfo> </bookinfo> - <xi:include href="guestfs-title.sgml"/> + <xi:include href="@abs_srcdir@/guestfs-title.sgml"/> <chapter id="object-tree"> <title>Object Hierarchy</title> <xi:include href="xml/tree_index.sgml"/> -- 1.8.1.4
Richard W.M. Jones
2013-Apr-24 20:55 UTC
[Libguestfs] [PATCH 12/12] php: Disallow separated builds.
From: "Richard W.M. Jones" <rjones at redhat.com> As it stands, this will just break. Until it is fixed, give a diagnostic message. --- php/Makefile.am | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/php/Makefile.am b/php/Makefile.am index 3f95c83..215295e 100644 --- a/php/Makefile.am +++ b/php/Makefile.am @@ -39,13 +39,24 @@ php_DATA = guestfs_php.ini # In theory: EXTRA_LIBS="-lguestfs" In fact this doesn't work # and we need to add the library to EXTRA_LDFLAGS. -all: extension/config.h +all: check-builddir-equals-srcdir extension/config.h $(MAKE) -C extension \ EXTRA_INCLUDES="-I$(abs_srcdir)/../src" \ EXTRA_LDFLAGS="-L$(abs_srcdir)/../src/.libs -lguestfs" \ EXTRA_CFLAGS="-DGUESTFS_PRIVATE=1" \ all +# It looks like this is going to be very hard to make work, so +# disallow it for now. +check-builddir-equals-srcdir: + @if [ $(builddir) != $(srcdir) ]; then \ + echo "***"; \ + echo "PHP cannot be built with builddir != srcdir"; \ + echo "Use ./configure --disable-php"; \ + echo "***"; \ + exit 1; \ + fi + extension/config.h: extension/config.m4 ../config.status cd extension && phpize cd extension && ./configure --prefix=$(prefix) --libdir=$(libdir) -- 1.8.1.4