[PATCH 1/6] out-of-tree build: fix documentation generation
--- cat/Makefile.am | 6 +++--- df/Makefile.am | 2 +- edit/Makefile.am | 2 +- examples/Makefile.am | 12 ++++++------ fish/Makefile.am | 18 +++++++++--------- fuse/Makefile.am | 2 +- inspector/Makefile.am | 2 +- java/examples/Makefile.am | 6 +++--- ocaml/examples/Makefile.am | 6 +++--- perl/examples/Makefile.am | 6 +++--- po-docs/ja/Makefile.am | 18 +++++++++--------- po-docs/uk/Makefile.am | 18 +++++++++--------- podwrapper.sh.in | 1 + python/examples/Makefile.am | 6 +++--- rescue/Makefile.am | 2 +- resize/Makefile.am | 2 +- ruby/examples/Makefile.am | 6 +++--- src/Makefile.am | 8 ++++---- test-tool/Makefile.am | 4 ++-- tools/Makefile.am | 4 ++-- 20 files changed, 66 insertions(+), 65 deletions(-) diff --git a/cat/Makefile.am b/cat/Makefile.am index 6022cd6..91abfac 100644 --- a/cat/Makefile.am +++ b/cat/Makefile.am @@ -102,7 +102,7 @@ noinst_DATA = \ virt-cat.1 $(top_builddir)/html/virt-cat.1.html: stamp-virt-cat.pod stamp-virt-cat.pod: virt-cat.pod - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --man virt-cat.1 \ --html $(top_builddir)/html/virt-cat.1.html \ $< @@ -111,7 +111,7 @@ stamp-virt-cat.pod: virt-cat.pod virt-ls.1 $(top_builddir)/html/virt-ls.1.html: stamp-virt-ls.pod stamp-virt-ls.pod: virt-ls.pod - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --man virt-ls.1 \ --html $(top_builddir)/html/virt-ls.1.html \ $< @@ -120,7 +120,7 @@ stamp-virt-ls.pod: virt-ls.pod virt-filesystems.1 $(top_builddir)/html/virt-filesystems.1.html: stamp-virt-filesystems.pod stamp-virt-filesystems.pod: virt-filesystems.pod - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --man virt-filesystems.1 \ --html $(top_builddir)/html/virt-filesystems.1.html \ $< diff --git a/df/Makefile.am b/df/Makefile.am index 88e32af..6281c96 100644 --- a/df/Makefile.am +++ b/df/Makefile.am @@ -66,7 +66,7 @@ noinst_DATA = $(top_builddir)/html/virt-df.1.html virt-df.1 $(top_builddir)/html/virt-df.1.html: stamp-virt-df.pod stamp-virt-df.pod: virt-df.pod - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --man virt-df.1 \ --html $(top_builddir)/html/virt-df.1.html \ $< diff --git a/edit/Makefile.am b/edit/Makefile.am index e33b33c..eac2877 100644 --- a/edit/Makefile.am +++ b/edit/Makefile.am @@ -58,7 +58,7 @@ noinst_DATA = $(top_builddir)/html/virt-edit.1.html virt-edit.1 $(top_builddir)/html/virt-edit.1.html: stamp-virt-edit.pod stamp-virt-edit.pod: virt-edit.pod - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --man virt-edit.1 \ --html $(top_builddir)/html/virt-edit.1.html \ $< diff --git a/examples/Makefile.am b/examples/Makefile.am index b8a2ffe..c84285f 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -64,20 +64,20 @@ noinst_DATA = \ guestfs-examples.3 $(top_builddir)/html/guestfs-examples.3.html: stamp-guestfs-examples.pod -stamp-guestfs-examples.pod: guestfs-examples.pod create_disk.c inspect_vm.c - $(top_srcdir)/podwrapper.sh \ +stamp-guestfs-examples.pod: $(srcdir)/guestfs-examples.pod $(srcdir)/create_disk.c $(srcdir)/inspect_vm.c + $(top_builddir)/podwrapper.sh \ --section 3 \ --man guestfs-examples.3 \ --html $(top_builddir)/html/guestfs-examples.3.html \ - --verbatim create_disk.c:@EXAMPLE1@ \ - --verbatim inspect_vm.c:@EXAMPLE2@ \ + --verbatim $(srcdir)/create_disk.c:@EXAMPLE1@ \ + --verbatim $(srcdir)/inspect_vm.c:@EXAMPLE2@ \ $< touch $@ guestfs-recipes.1 $(top_builddir)/html/guestfs-recipes.1.html: stamp-guestfs-recipes.pod -stamp-guestfs-recipes.pod: guestfs-recipes.pod create_disk.c inspect_vm.c - $(top_srcdir)/podwrapper.sh \ +stamp-guestfs-recipes.pod: $(builddir)/guestfs-recipes.pod create_disk.c inspect_vm.c + $(top_builddir)/podwrapper.sh \ --section 1 \ --man guestfs-recipes.1 \ --html $(top_builddir)/html/guestfs-recipes.1.html \ diff --git a/fish/Makefile.am b/fish/Makefile.am index 22aaf4c..6018868 100644 --- a/fish/Makefile.am +++ b/fish/Makefile.am @@ -170,7 +170,7 @@ noinst_DATA = \ guestfish.1 $(top_builddir)/html/guestfish.1.html: stamp-guestfish.pod stamp-guestfish.pod: guestfish.pod guestfish-actions.pod guestfish-commands.pod - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --man guestfish.1 \ --html $(top_builddir)/html/guestfish.1.html \ --insert guestfish-actions.pod:@ACTIONS@ \ @@ -180,8 +180,8 @@ stamp-guestfish.pod: guestfish.pod guestfish-actions.pod guestfish-commands.pod virt-copy-in.1 $(top_builddir)/html/virt-copy-in.1.html: stamp-virt-copy-in.pod -stamp-virt-copy-in.pod: virt-copy-in.pod - $(top_srcdir)/podwrapper.sh \ +stamp-virt-copy-in.pod: $(srcdir)/virt-copy-in.pod + $(top_builddir)/podwrapper.sh \ --man virt-copy-in.1 \ --html $(top_builddir)/html/virt-copy-in.1.html \ $< @@ -189,8 +189,8 @@ stamp-virt-copy-in.pod: virt-copy-in.pod virt-copy-out.1 $(top_builddir)/html/virt-copy-out.1.html: stamp-virt-copy-out.pod -stamp-virt-copy-out.pod: virt-copy-out.pod - $(top_srcdir)/podwrapper.sh \ +stamp-virt-copy-out.pod: $(srcdir)/virt-copy-out.pod + $(top_builddir)/podwrapper.sh \ --man virt-copy-out.1 \ --html $(top_builddir)/html/virt-copy-out.1.html \ $< @@ -198,8 +198,8 @@ stamp-virt-copy-out.pod: virt-copy-out.pod virt-tar-in.1 $(top_builddir)/html/virt-tar-in.1.html: stamp-virt-tar-in.pod -stamp-virt-tar-in.pod: virt-tar-in.pod - $(top_srcdir)/podwrapper.sh \ +stamp-virt-tar-in.pod: $(srcdir)/virt-tar-in.pod + $(top_builddir)/podwrapper.sh \ --man virt-tar-in.1 \ --html $(top_builddir)/html/virt-tar-in.1.html \ $< @@ -207,8 +207,8 @@ stamp-virt-tar-in.pod: virt-tar-in.pod virt-tar-out.1 $(top_builddir)/html/virt-tar-out.1.html: stamp-virt-tar-out.pod -stamp-virt-tar-out.pod: virt-tar-out.pod - $(top_srcdir)/podwrapper.sh \ +stamp-virt-tar-out.pod: $(srcdir)/virt-tar-out.pod + $(top_builddir)/podwrapper.sh \ --man virt-tar-out.1 \ --html $(top_builddir)/html/virt-tar-out.1.html \ $< diff --git a/fuse/Makefile.am b/fuse/Makefile.am index b7558ee..10bbc9d 100644 --- a/fuse/Makefile.am +++ b/fuse/Makefile.am @@ -66,7 +66,7 @@ noinst_DATA = $(top_builddir)/html/guestmount.1.html guestmount.1 $(top_builddir)/html/guestmount.1.html: stamp-guestmount.pod stamp-guestmount.pod: guestmount.pod - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --man guestmount.1 \ --html $(top_builddir)/html/guestmount.1.html \ $< diff --git a/inspector/Makefile.am b/inspector/Makefile.am index 5c48724..03e13d8 100644 --- a/inspector/Makefile.am +++ b/inspector/Makefile.am @@ -81,7 +81,7 @@ noinst_DATA = $(top_builddir)/html/virt-inspector.1.html virt-inspector.1 $(top_builddir)/html/virt-inspector.1.html: stamp-virt-inspector.pod stamp-virt-inspector.pod: virt-inspector.pod - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --man virt-inspector.1 \ --html $(top_builddir)/html/virt-inspector.1.html \ $< diff --git a/java/examples/Makefile.am b/java/examples/Makefile.am index 503b55d..60fd958 100644 --- a/java/examples/Makefile.am +++ b/java/examples/Makefile.am @@ -31,12 +31,12 @@ noinst_DATA = $(top_builddir)/html/guestfs-java.3.html guestfs-java.3 $(top_builddir)/html/guestfs-java.3.html: stamp-guestfs-java.pod stamp-guestfs-java.pod: guestfs-java.pod CreateDisk.java InspectVM.java - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --section 3 \ --man guestfs-java.3 \ --html $(top_builddir)/html/guestfs-java.3.html \ - --verbatim CreateDisk.java:@EXAMPLE1@ \ - --verbatim InspectVM.java:@EXAMPLE2@ \ + --verbatim $(srcdir)/CreateDisk.java:@EXAMPLE1@ \ + --verbatim $(srcdir)/InspectVM.java:@EXAMPLE2@ \ $< touch $@ diff --git a/ocaml/examples/Makefile.am b/ocaml/examples/Makefile.am index 61a94af..43e579c 100644 --- a/ocaml/examples/Makefile.am +++ b/ocaml/examples/Makefile.am @@ -31,12 +31,12 @@ noinst_DATA = $(top_builddir)/html/guestfs-ocaml.3.html guestfs-ocaml.3 $(top_builddir)/html/guestfs-ocaml.3.html: stamp-guestfs-ocaml.pod stamp-guestfs-ocaml.pod: guestfs-ocaml.pod create_disk.ml inspect_vm.ml - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --section 3 \ --man guestfs-ocaml.3 \ --html $(top_builddir)/html/guestfs-ocaml.3.html \ - --verbatim create_disk.ml:@EXAMPLE1@ \ - --verbatim inspect_vm.ml:@EXAMPLE2@ \ + --verbatim $(srcdir)/create_disk.ml:@EXAMPLE1@ \ + --verbatim $(srcdir)/inspect_vm.ml:@EXAMPLE2@ \ $< touch $@ diff --git a/perl/examples/Makefile.am b/perl/examples/Makefile.am index 354531a..387cdf1 100644 --- a/perl/examples/Makefile.am +++ b/perl/examples/Makefile.am @@ -29,11 +29,11 @@ noinst_DATA = $(top_builddir)/html/guestfs-perl.3.html guestfs-perl.3 $(top_builddir)/html/guestfs-perl.3.html: stamp-guestfs-perl.pod stamp-guestfs-perl.pod: guestfs-perl.pod create_disk.pl inspect_vm.pl - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --section 3 \ --man guestfs-perl.3 \ --html $(top_builddir)/html/guestfs-perl.3.html \ - --verbatim create_disk.pl:@EXAMPLE1@ \ - --verbatim inspect_vm.pl:@EXAMPLE2@ \ + --verbatim $(srcdir)/create_disk.pl:@EXAMPLE1@ \ + --verbatim $(srcdir)/inspect_vm.pl:@EXAMPLE2@ \ $< touch $@ diff --git a/po-docs/ja/Makefile.am b/po-docs/ja/Makefile.am index 4b149fe..07778b5 100644 --- a/po-docs/ja/Makefile.am +++ b/po-docs/ja/Makefile.am @@ -52,26 +52,26 @@ EXTRA_DIST = \ all-local: $(MANPAGES) guestfs.3: guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-structs.pod - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --section 3 \ --man $@ \ - --insert guestfs-actions.pod:@ACTIONS@ \ - --insert guestfs-availability.pod:@AVAILABILITY@ \ - --insert guestfs-structs.pod:@STRUCTS@ \ + --insert $(srcdir)/guestfs-actions.pod:@ACTIONS@ \ + --insert $(srcdir)/guestfs-availability.pod:@AVAILABILITY@ \ + --insert $(srcdir)/guestfs-structs.pod:@STRUCTS@ \ $< guestfish.1: guestfish.pod guestfish-actions.pod guestfish-commands.pod - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --man $@ \ - --insert guestfish-actions.pod:@ACTIONS@ \ - --insert guestfish-commands.pod:@FISH_COMMANDS@ \ + --insert $(srcdir)/guestfish-actions.pod:@ACTIONS@ \ + --insert $(srcdir)/guestfish-commands.pod:@FISH_COMMANDS@ \ $< %.1: %.pod - $(top_srcdir)/podwrapper.sh --man $@ $< + $(top_builddir)/podwrapper.sh --man $@ $< %.1: %.pl - $(top_srcdir)/podwrapper.sh --man $@ $< + $(top_builddir)/podwrapper.sh --man $@ $< # XXX Can automake do this properly? install-data-hook: diff --git a/po-docs/uk/Makefile.am b/po-docs/uk/Makefile.am index 4b149fe..07778b5 100644 --- a/po-docs/uk/Makefile.am +++ b/po-docs/uk/Makefile.am @@ -52,26 +52,26 @@ EXTRA_DIST = \ all-local: $(MANPAGES) guestfs.3: guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-structs.pod - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --section 3 \ --man $@ \ - --insert guestfs-actions.pod:@ACTIONS@ \ - --insert guestfs-availability.pod:@AVAILABILITY@ \ - --insert guestfs-structs.pod:@STRUCTS@ \ + --insert $(srcdir)/guestfs-actions.pod:@ACTIONS@ \ + --insert $(srcdir)/guestfs-availability.pod:@AVAILABILITY@ \ + --insert $(srcdir)/guestfs-structs.pod:@STRUCTS@ \ $< guestfish.1: guestfish.pod guestfish-actions.pod guestfish-commands.pod - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --man $@ \ - --insert guestfish-actions.pod:@ACTIONS@ \ - --insert guestfish-commands.pod:@FISH_COMMANDS@ \ + --insert $(srcdir)/guestfish-actions.pod:@ACTIONS@ \ + --insert $(srcdir)/guestfish-commands.pod:@FISH_COMMANDS@ \ $< %.1: %.pod - $(top_srcdir)/podwrapper.sh --man $@ $< + $(top_builddir)/podwrapper.sh --man $@ $< %.1: %.pl - $(top_srcdir)/podwrapper.sh --man $@ $< + $(top_builddir)/podwrapper.sh --man $@ $< # XXX Can automake do this properly? install-data-hook: diff --git a/podwrapper.sh.in b/podwrapper.sh.in index c883c6a..9accaf9 100755 --- a/podwrapper.sh.in +++ b/podwrapper.sh.in @@ -180,6 +180,7 @@ if [ -n "$text_output" ]; then fi if [ -n "$html_output" ]; then + mkdir -p "$abs_top_builddir/html" "$POD2HTML" \ --css "pod.css" --htmldir "$abs_top_builddir/html" \ < $tmpdir/full.pod > "$html_output".tmp diff --git a/python/examples/Makefile.am b/python/examples/Makefile.am index 208fecd..434c8f7 100644 --- a/python/examples/Makefile.am +++ b/python/examples/Makefile.am @@ -29,11 +29,11 @@ noinst_DATA = $(top_builddir)/html/guestfs-python.3.html guestfs-python.3 $(top_builddir)/html/guestfs-python.3.html: stamp-guestfs-python.pod stamp-guestfs-python.pod: guestfs-python.pod create_disk.py inspect_vm.py - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --section 3 \ --man guestfs-python.3 \ --html $(top_builddir)/html/guestfs-python.3.html \ - --verbatim create_disk.py:@EXAMPLE1@ \ - --verbatim inspect_vm.py:@EXAMPLE2@ \ + --verbatim $(srcdir)/create_disk.py:@EXAMPLE1@ \ + --verbatim $(srcdir)/inspect_vm.py:@EXAMPLE2@ \ $< touch $@ diff --git a/rescue/Makefile.am b/rescue/Makefile.am index d3783ae..85a70f9 100644 --- a/rescue/Makefile.am +++ b/rescue/Makefile.am @@ -57,7 +57,7 @@ noinst_DATA = $(top_builddir)/html/virt-rescue.1.html virt-rescue.1 $(top_builddir)/html/virt-rescue.1.html: stamp-virt-rescue.pod stamp-virt-rescue.pod: virt-rescue.pod - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --man virt-rescue.1 \ --html $(top_builddir)/html/virt-rescue.1.html \ $< diff --git a/resize/Makefile.am b/resize/Makefile.am index fd7f71a..93a2600 100644 --- a/resize/Makefile.am +++ b/resize/Makefile.am @@ -68,7 +68,7 @@ noinst_DATA = $(top_builddir)/html/virt-resize.1.html virt-resize.1 $(top_builddir)/html/virt-resize.1.html: stamp-virt-resize.pod stamp-virt-resize.pod: virt-resize.pod - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --man virt-resize.1 \ --html $(top_builddir)/html/virt-resize.1.html \ $< diff --git a/ruby/examples/Makefile.am b/ruby/examples/Makefile.am index 6e94acf..7183e80 100644 --- a/ruby/examples/Makefile.am +++ b/ruby/examples/Makefile.am @@ -29,11 +29,11 @@ noinst_DATA = $(top_builddir)/html/guestfs-ruby.3.html guestfs-ruby.3 $(top_builddir)/html/guestfs-ruby.3.html: stamp-guestfs-ruby.pod stamp-guestfs-ruby.pod: guestfs-ruby.pod create_disk.rb inspect_vm.rb - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --section 3 \ --man guestfs-ruby.3 \ --html $(top_builddir)/html/guestfs-ruby.3.html \ - --verbatim create_disk.rb:@EXAMPLE1@ \ - --verbatim inspect_vm.rb:@EXAMPLE2@ \ + --verbatim $(srcdir)/create_disk.rb:@EXAMPLE1@ \ + --verbatim $(srcdir)/inspect_vm.rb:@EXAMPLE2@ \ $< touch $@ diff --git a/src/Makefile.am b/src/Makefile.am index fa088fe..0666f9f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -192,12 +192,12 @@ stamp-guestfs.pod: guestfs.pod \ guestfs-actions.pod \ guestfs-availability.pod \ guestfs-structs.pod - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --section 3 \ --man guestfs.3 \ --html $(top_builddir)/html/guestfs.3.html \ - --insert guestfs-actions.pod:@ACTIONS@ \ - --insert guestfs-availability.pod:@AVAILABILITY@ \ - --insert guestfs-structs.pod:@STRUCTS@ \ + --insert $(srcdir)/guestfs-actions.pod:@ACTIONS@ \ + --insert $(srcdir)/guestfs-availability.pod:@AVAILABILITY@ \ + --insert $(srcdir)/guestfs-structs.pod:@STRUCTS@ \ $< touch $@ diff --git a/test-tool/Makefile.am b/test-tool/Makefile.am index 9fa4033..af1bffb 100644 --- a/test-tool/Makefile.am +++ b/test-tool/Makefile.am @@ -33,7 +33,7 @@ libguestfs_test_tool_CFLAGS = \ libguestfs_test_tool_LDADD = \ $(top_builddir)/src/libguestfs.la -libguestfs-test-tool.1: libguestfs-test-tool.pod - $(top_srcdir)/podwrapper.sh \ +libguestfs-test-tool.1: $(builddir)/libguestfs-test-tool.pod + $(top_builddir)/podwrapper.sh \ --man $@ \ $< diff --git a/tools/Makefile.am b/tools/Makefile.am index 6059d35..5586bf8 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -44,12 +44,12 @@ man_MANS = virt-tar.1 $(patsubst %,virt-%.1,$(filter-out tar,$(tools))) noinst_DATA = $(tools:%=$(top_builddir)/html/virt-%.1.html) virt-%.1: virt-% - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --man $@ \ $< $(top_builddir)/html/virt-%.1.html: virt-% - $(top_srcdir)/podwrapper.sh \ + $(top_builddir)/podwrapper.sh \ --html $@ \ $< -- 1.7.5.4
--- perl/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/perl/Makefile.am b/perl/Makefile.am index d8167d1..1c3079e 100644 --- a/perl/Makefile.am +++ b/perl/Makefile.am @@ -63,6 +63,7 @@ all: Makefile-pl src_deps $(MAKE) -f Makefile-pl Makefile-pl: Makefile.PL + -[ $(srcdir) != $(builddir) ] && cp -rsu $(abs_srcdir)/. $(builddir)/. perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS) PREFIX=$(prefix) # No! Otherwise it is deleted before the clean-local rule runs. -- 1.7.5.4
--- ruby/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/ruby/Makefile.am b/ruby/Makefile.am index a2e962d..872dad6 100644 --- a/ruby/Makefile.am +++ b/ruby/Makefile.am @@ -52,6 +52,7 @@ TESTS_ENVIRONMENT = \ TMPDIR=$(top_builddir) all: $(generator_built) + -[ $(srcdir) != $(builddir) ] && cp -rsu $(abs_srcdir)/. $(builddir)/. rake build rake rdoc -- 1.7.5.4
--- appliance/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/appliance/Makefile.am b/appliance/Makefile.am index 503160e..bec2b48 100644 --- a/appliance/Makefile.am +++ b/appliance/Makefile.am @@ -69,6 +69,7 @@ supermin.d/daemon.img: ../daemon/guestfsd mv $@-t $@ 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 -- 1.7.5.4
--- generator/Makefile.am | 8 ++++---- ocaml/Makefile.am | 22 +++++++++++----------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/generator/Makefile.am b/generator/Makefile.am index 112fc69..a127a87 100644 --- a/generator/Makefile.am +++ b/generator/Makefile.am @@ -62,14 +62,14 @@ noinst_PROGRAM = generator if HAVE_OCAML -generator: $(OBJECTS) - $(OCAMLC) -o generator $(OCAMLCFLAGS) $(OCAMLCLIBS) $(OBJECTS) +$(srcdir)/generator: $(OBJECTS) + $(OCAMLC) -I $(srcdir) -o $@ $(OCAMLCFLAGS) $(OCAMLCLIBS) $(OBJECTS) .ml.cmo: - $(OCAMLC) $(OCAMLCFLAGS) -c $< -o $@ + $(OCAMLC) -I $(srcdir) $(OCAMLCFLAGS) -c $< -o $@ .mli.cmi: - $(OCAMLC) $(OCAMLCFLAGS) -c $< -o $@ + $(OCAMLC) -I $(srcdir) $(OCAMLCFLAGS) -c $< -o $@ depend: .depend diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index 5813f84..7028fa4 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -53,16 +53,16 @@ mlguestfs.cmxa: $(XOBJS) $(OCAMLMKLIB) -o mlguestfs $^ -L$(top_builddir)/src/.libs -lguestfs guestfs_c.o: guestfs_c.c - $(CC) $(AM_CPPFLAGS) $(CFLAGS) -fPIC -Wall -c $< + $(CC) $(AM_CPPFLAGS) $(CFLAGS) -fPIC -Wall -c $(srcdir)/$< guestfs_c_actions.o: guestfs_c_actions.c - $(CC) $(AM_CPPFLAGS) $(CFLAGS) -fPIC -Wall -c $< + $(CC) $(AM_CPPFLAGS) $(CFLAGS) -fPIC -Wall -c $(srcdir)/$< if HAVE_OCAMLDOC noinst_DATA += html/index.html -html/index.html: guestfs*.mli guestfs*.ml +html/index.html: $(srcdir)/guestfs*.mli $(srcdir)/guestfs*.ml mkdir -p html -$(OCAMLDOC) -d html -html $^ endif @@ -122,14 +122,14 @@ t/guestfs_070_threads.cmx: t/guestfs_070_threads.ml mlguestfs.cmxa $(OCAMLFIND) ocamlopt -package unix,threads -thread -linkpkg -c $< -o $@ t/%.cmx: t/%.ml mlguestfs.cmxa - $(OCAMLFIND) ocamlopt -package unix -linkpkg -c $< -o $@ - -.mli.cmi: - $(OCAMLFIND) ocamlc -package unix -c $< -o $@ -.ml.cmo: - $(OCAMLFIND) ocamlc -package unix -c $< -o $@ -.ml.cmx: - $(OCAMLFIND) ocamlopt -package unix -c $< -o $@ + $(OCAMLFIND) ocamlopt -package unix -linkpkg -c $< -o $(builddir)/$@ + +%.cmi: %.mli + $(OCAMLFIND) ocamlc -package unix -c $< -o $(builddir)/$@ +%.cmo: %.ml + $(OCAMLFIND) ocamlc -package unix -c $< -o $(builddir)/$@ +%.cmx: %.ml + $(OCAMLFIND) ocamlopt -package unix -c $< -o $(builddir)/$@ depend: .depend -- 1.7.5.4
--- src/Makefile.am | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 0666f9f..a5d7322 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -113,7 +113,7 @@ errnostring_gperf.c: errnostring_gperf.gperf # 'libguestfs.so.0.$(MAX_PROC_NR).0'. libguestfs_la_LDFLAGS = -version-info $(MAX_PROC_NR):0:$(MAX_PROC_NR) -libguestfs_la_LDFLAGS += $(VERSION_SCRIPT_FLAGS)libguestfs.syms +libguestfs_la_LDFLAGS += $(VERSION_SCRIPT_FLAGS)$(srcdir)/libguestfs.syms libguestfs_la_SOURCES = \ guestfs.c \ @@ -170,14 +170,14 @@ libguestfs_la_CPPFLAGS = -I$(top_srcdir)/gnulib/lib if HAVE_RPCGEN guestfs_protocol.c: guestfs_protocol.x rm -f $@-t $@-t2 - $(RPCGEN) -c -o $@-t $< + $(RPCGEN) -c -o $@-t $(srcdir)/$< sed 's,\.\./\.\./src/,,' < $@-t > $@-t2 rm $@-t mv $@-t2 $@ guestfs_protocol.h: guestfs_protocol.x rm -f $@-t - $(RPCGEN) -h -o $@-t $< + $(RPCGEN) -h -o $@-t $(srcdir)/$< mv $@-t $@ endif -- 1.7.5.4
On Sun, Aug 14, 2011 at 10:58:08AM +0200, Hilko Bengen wrote: [...]
20 files changed, 66 insertions(+), 65 deletions(-)
Thanks for this. Patches 2 and 3 seem very brutal. Isn't there a better way than recursively copying everything into the build directory? I have applied the other patches (1, 4, 5, 6). I'm just doing a bit of testing, but will push them after. I only care about the srcdir == builddir case so I'm happy as long as that doesn't break. I have a few comments about patch 1 below.
-stamp-guestfs-recipes.pod: guestfs-recipes.pod create_disk.c inspect_vm.c - $(top_srcdir)/podwrapper.sh \ +stamp-guestfs-recipes.pod: $(builddir)/guestfs-recipes.pod create_disk.c inspect_vm.c + $(top_builddir)/podwrapper.sh \
This change appears to be wrong. guestfs-recipes.pod is be a source file, isn't it? The two *.c files are not actually used here. That appears to be a copy and paste error which I will push a fix for separately.
stamp-guestfish.pod: guestfish.pod guestfish-actions.pod guestfish-commands.pod
Should these 3 files be source files? They come from the generator, which is creating files in $srcdir as discussed in the earlier email.
stamp-virt-inspector.pod: virt-inspector.pod
Also $(srcdir)/...?
stamp-guestfs-java.pod: guestfs-java.pod CreateDisk.java InspectVM.java
Ditto?
stamp-guestfs-ocaml.pod: guestfs-ocaml.pod create_disk.ml inspect_vm.ml
Ditto?
stamp-guestfs-perl.pod: guestfs-perl.pod create_disk.pl inspect_vm.pl
Ditto?
guestfs.3: guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-structs.pod
Ditto?
guestfish.1: guestfish.pod guestfish-actions.pod guestfish-commands.pod
Ditto?
diff --git a/po-docs/uk/Makefile.am b/po-docs/uk/Makefile.am index 4b149fe..07778b5 100644 --- a/po-docs/uk/Makefile.am +++ b/po-docs/uk/Makefile.am @@ -52,26 +52,26 @@ EXTRA_DIST = \ all-local: $(MANPAGES)
guestfs.3: guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-structs.pod
Ditto? Also all po-docs/??/Makefile.am files should be identical. They are, so that's good: $ md5sum po-docs/??/Makefile.am 6adfd54f347c4d0e5fd8496545f8b49f po-docs/ja/Makefile.am 6adfd54f347c4d0e5fd8496545f8b49f po-docs/uk/Makefile.am
stamp-guestfs-python.pod: guestfs-python.pod create_disk.py inspect_vm.py
Ditto?
stamp-guestfs-ruby.pod: guestfs-ruby.pod create_disk.rb inspect_vm.rb
Ditto?
-libguestfs-test-tool.1: libguestfs-test-tool.pod - $(top_srcdir)/podwrapper.sh \ +libguestfs-test-tool.1: $(builddir)/libguestfs-test-tool.pod + $(top_builddir)/podwrapper.sh \ --man $@ \ $<
libguestfs-test-tool.pod should be a source file? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v
* Richard W.M. Jones:
Patches 2 and 3 seem very brutal. Isn't there a better way than recursively copying everything into the build directory?
I asked around on IRC and StackOverflow and the only halfway useful answer I got so far was <http://stackoverflow.com/questions/7032942>. It does not account for the test cases and Schwern even called it "painful". After spending too much time looking at autoconf etc. in the past few weeks I haven't really felt like learning how Ruby's idea of a build system works. (I'd rather spend the time learning about OCaml.)
I have applied the other patches (1, 4, 5, 6). I'm just doing a bit of testing, but will push them after. I only care about the srcdir == builddir case so I'm happy as long as that doesn't break.
Fair enough. The only reason I am interested in this is because it seems to be the sanest way to build Python bindings for multiple versions (currently 2.6, 2.7, 3.2 for the unstable distribution).
I have a few comments about patch 1 below.
-stamp-guestfs-recipes.pod: guestfs-recipes.pod create_disk.c inspect_vm.c - $(top_srcdir)/podwrapper.sh \ +stamp-guestfs-recipes.pod: $(builddir)/guestfs-recipes.pod create_disk.c inspect_vm.c + $(top_builddir)/podwrapper.sh \
This change appears to be wrong. guestfs-recipes.pod is be a source file, isn't it?
The source and target expressions don't need $(srcdir) or $(builddir) in most cases, I think. I'll do some more testing and then post another series patches. Cheers, -Hilko
For ExtUtils::MakeMaker (Perl), there is an alternative (setting INST_ARCHLIB, INST_LIB, INST_BIN, INST_SCRIPT, INST_MAN1DIR, and INST_MAN3DIR) but this would not work for the test cases. For rake (Ruby), I have found no obvious way to specify a different target directory. --- perl/Makefile.am | 1 + ruby/Makefile.am | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/perl/Makefile.am b/perl/Makefile.am index d8167d1..1c3079e 100644 --- a/perl/Makefile.am +++ b/perl/Makefile.am @@ -63,6 +63,7 @@ all: Makefile-pl src_deps $(MAKE) -f Makefile-pl Makefile-pl: Makefile.PL + -[ $(srcdir) != $(builddir) ] && cp -rsu $(abs_srcdir)/. $(builddir)/. perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS) PREFIX=$(prefix) # No! Otherwise it is deleted before the clean-local rule runs. diff --git a/ruby/Makefile.am b/ruby/Makefile.am index a2e962d..872dad6 100644 --- a/ruby/Makefile.am +++ b/ruby/Makefile.am @@ -52,6 +52,7 @@ TESTS_ENVIRONMENT = \ TMPDIR=$(top_builddir) all: $(generator_built) + -[ $(srcdir) != $(builddir) ] && cp -rsu $(abs_srcdir)/. $(builddir)/. rake build rake rdoc -- 1.7.5.4
--- examples/Makefile.am | 4 ++-- fish/Makefile.am | 8 ++++---- test-tool/Makefile.am | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/Makefile.am b/examples/Makefile.am index df5cc71..03870cb 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -64,7 +64,7 @@ noinst_DATA = \ guestfs-examples.3 $(top_builddir)/html/guestfs-examples.3.html: stamp-guestfs-examples.pod -stamp-guestfs-examples.pod: $(srcdir)/guestfs-examples.pod $(srcdir)/create_disk.c $(srcdir)/inspect_vm.c +stamp-guestfs-examples.pod: guestfs-examples.pod create_disk.c inspect_vm.c $(top_builddir)/podwrapper.sh \ --section 3 \ --man guestfs-examples.3 \ @@ -76,7 +76,7 @@ stamp-guestfs-examples.pod: $(srcdir)/guestfs-examples.pod $(srcdir)/create_disk guestfs-recipes.1 $(top_builddir)/html/guestfs-recipes.1.html: stamp-guestfs-recipes.pod -stamp-guestfs-recipes.pod: $(builddir)/guestfs-recipes.pod +stamp-guestfs-recipes.pod: guestfs-recipes.pod $(top_builddir)/podwrapper.sh \ --section 1 \ --man guestfs-recipes.1 \ diff --git a/fish/Makefile.am b/fish/Makefile.am index 6018868..a7a597b 100644 --- a/fish/Makefile.am +++ b/fish/Makefile.am @@ -180,7 +180,7 @@ stamp-guestfish.pod: guestfish.pod guestfish-actions.pod guestfish-commands.pod virt-copy-in.1 $(top_builddir)/html/virt-copy-in.1.html: stamp-virt-copy-in.pod -stamp-virt-copy-in.pod: $(srcdir)/virt-copy-in.pod +stamp-virt-copy-in.pod: virt-copy-in.pod $(top_builddir)/podwrapper.sh \ --man virt-copy-in.1 \ --html $(top_builddir)/html/virt-copy-in.1.html \ @@ -189,7 +189,7 @@ stamp-virt-copy-in.pod: $(srcdir)/virt-copy-in.pod virt-copy-out.1 $(top_builddir)/html/virt-copy-out.1.html: stamp-virt-copy-out.pod -stamp-virt-copy-out.pod: $(srcdir)/virt-copy-out.pod +stamp-virt-copy-out.pod: virt-copy-out.pod $(top_builddir)/podwrapper.sh \ --man virt-copy-out.1 \ --html $(top_builddir)/html/virt-copy-out.1.html \ @@ -198,7 +198,7 @@ stamp-virt-copy-out.pod: $(srcdir)/virt-copy-out.pod virt-tar-in.1 $(top_builddir)/html/virt-tar-in.1.html: stamp-virt-tar-in.pod -stamp-virt-tar-in.pod: $(srcdir)/virt-tar-in.pod +stamp-virt-tar-in.pod: virt-tar-in.pod $(top_builddir)/podwrapper.sh \ --man virt-tar-in.1 \ --html $(top_builddir)/html/virt-tar-in.1.html \ @@ -207,7 +207,7 @@ stamp-virt-tar-in.pod: $(srcdir)/virt-tar-in.pod virt-tar-out.1 $(top_builddir)/html/virt-tar-out.1.html: stamp-virt-tar-out.pod -stamp-virt-tar-out.pod: $(srcdir)/virt-tar-out.pod +stamp-virt-tar-out.pod: virt-tar-out.pod $(top_builddir)/podwrapper.sh \ --man virt-tar-out.1 \ --html $(top_builddir)/html/virt-tar-out.1.html \ diff --git a/test-tool/Makefile.am b/test-tool/Makefile.am index af1bffb..16daa7f 100644 --- a/test-tool/Makefile.am +++ b/test-tool/Makefile.am @@ -33,7 +33,7 @@ libguestfs_test_tool_CFLAGS = \ libguestfs_test_tool_LDADD = \ $(top_builddir)/src/libguestfs.la -libguestfs-test-tool.1: $(builddir)/libguestfs-test-tool.pod +libguestfs-test-tool.1: libguestfs-test-tool.pod $(top_builddir)/podwrapper.sh \ --man $@ \ $< -- 1.7.5.4
--- fish/Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fish/Makefile.am b/fish/Makefile.am index a7a597b..40bf2b4 100644 --- a/fish/Makefile.am +++ b/fish/Makefile.am @@ -173,8 +173,8 @@ stamp-guestfish.pod: guestfish.pod guestfish-actions.pod guestfish-commands.pod $(top_builddir)/podwrapper.sh \ --man guestfish.1 \ --html $(top_builddir)/html/guestfish.1.html \ - --insert guestfish-actions.pod:@ACTIONS@ \ - --insert guestfish-commands.pod:@FISH_COMMANDS@ \ + --insert $(srcdir)/guestfish-actions.pod:@ACTIONS@ \ + --insert $(srcdir)/guestfish-commands.pod:@FISH_COMMANDS@ \ $< touch $@ -- 1.7.5.4
$(srcdir) is not needed for guestfs_c.c. *.mli only exists in $(srcdir) and isn't found on "make install" otherwise --- ocaml/Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index 7028fa4..8daa671 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -53,7 +53,7 @@ mlguestfs.cmxa: $(XOBJS) $(OCAMLMKLIB) -o mlguestfs $^ -L$(top_builddir)/src/.libs -lguestfs guestfs_c.o: guestfs_c.c - $(CC) $(AM_CPPFLAGS) $(CFLAGS) -fPIC -Wall -c $(srcdir)/$< + $(CC) $(AM_CPPFLAGS) $(CFLAGS) -fPIC -Wall -c $< guestfs_c_actions.o: guestfs_c_actions.c $(CC) $(AM_CPPFLAGS) $(CFLAGS) -fPIC -Wall -c $(srcdir)/$< @@ -149,7 +149,7 @@ install-data-hook: $(OCAMLFIND) install \ -ldconf ignore -destdir $(DESTDIR)$(OCAMLLIB) \ guestfs \ - META *.so *.a *.cma *.cmx *.cmxa *.cmi *.mli + META *.so *.a *.cma *.cmx *.cmxa *.cmi $(srcdir)/*.mli CLEANFILES += $(noinst_DATA) -- 1.7.5.4
--- images/Makefile.am | 18 ++++++++++-------- images/guest-aux/make-debian-img.sh | 6 +++--- images/guest-aux/make-fedora-img.sh | 8 ++++---- images/guest-aux/make-ubuntu-img.sh | 6 +++--- images/guest-aux/make-windows-img.sh | 10 +++++----- run | 4 +--- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/images/Makefile.am b/images/Makefile.am index 68eb550..146d049 100644 --- a/images/Makefile.am +++ b/images/Makefile.am @@ -173,41 +173,43 @@ $(builddir)/test-grep.txt.gz: test-grep.txt fedora.img: guest-aux/make-fedora-img.sh \ guest-aux/fedora-name.db \ guest-aux/fedora-packages.db - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ TMPDIR=$(top_builddir) \ + BUILDDIR=$(builddir) SRCDIR=$(srcdir) \ + TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) \ bash $< 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 $@ # Make a (dummy) Debian image. debian.img: guest-aux/make-debian-img.sh - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ TMPDIR=$(top_builddir) \ + BUILDDIR=$(builddir) SRCDIR=$(srcdir) \ + TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) \ bash $< # Make a (dummy) Ubuntu image. ubuntu.img: guest-aux/make-ubuntu-img.sh - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ TMPDIR=$(top_builddir) \ + BUILDDIR=$(builddir) SRCDIR=$(srcdir) \ + TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) \ bash $< # Make a (dummy) Windows image. windows.img: guest-aux/make-windows-img.sh \ guest-aux/windows-software guest-aux/windows-system - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ TMPDIR=$(top_builddir) \ + BUILDDIR=$(builddir) SRCDIR=$(srcdir) \ + TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) \ bash $< # Since users might not have the tools needed to create this, we diff --git a/images/guest-aux/make-debian-img.sh b/images/guest-aux/make-debian-img.sh index 9a01e93..36a1220 100755 --- a/images/guest-aux/make-debian-img.sh +++ b/images/guest-aux/make-debian-img.sh @@ -31,7 +31,7 @@ LABEL=BOOT /boot ext2 default 0 0 EOF # Create a disk image. -../run ../fish/guestfish <<'EOF' +${TOP_SRCDIR}/run ${TOP_BUILDDIR}/fish/guestfish <<EOF sparse debian.img.tmp 512M run @@ -80,9 +80,9 @@ upload fstab.tmp /etc/fstab write /etc/debian_version "5.0.1" write /etc/hostname "debian.invalid" -upload guest-aux/debian-packages /var/lib/dpkg/status +upload ${SRCDIR}/guest-aux/debian-packages /var/lib/dpkg/status -upload bin-x86_64-dynamic /bin/ls +upload ${SRCDIR}/bin-x86_64-dynamic /bin/ls mkdir /boot/grub touch /boot/grub/grub.conf diff --git a/images/guest-aux/make-fedora-img.sh b/images/guest-aux/make-fedora-img.sh index a038432..26b4068 100755 --- a/images/guest-aux/make-fedora-img.sh +++ b/images/guest-aux/make-fedora-img.sh @@ -31,7 +31,7 @@ LABEL=ROOT / ext2 default 0 0 EOF # Create a disk image. -../run ../fish/guestfish <<'EOF' +${TOP_SRCDIR}/run ${TOP_BUILDDIR}/fish/guestfish <<EOF sparse fedora.img.tmp 512M run @@ -72,10 +72,10 @@ write /etc/redhat-release "Fedora release 14 (Phony)" write /etc/fedora-release "Fedora release 14 (Phony)" write /etc/sysconfig/network "HOSTNAME=fedora.invalid" -upload guest-aux/fedora-name.db /var/lib/rpm/Name -upload guest-aux/fedora-packages.db /var/lib/rpm/Packages +upload ${BUILDDIR}/guest-aux/fedora-name.db /var/lib/rpm/Name +upload ${BUILDDIR}/guest-aux/fedora-packages.db /var/lib/rpm/Packages -upload bin-x86_64-dynamic /bin/ls +upload ${SRCDIR}/bin-x86_64-dynamic /bin/ls mkdir /boot/grub touch /boot/grub/grub.conf diff --git a/images/guest-aux/make-ubuntu-img.sh b/images/guest-aux/make-ubuntu-img.sh index 4ddb40a..8ca622d 100755 --- a/images/guest-aux/make-ubuntu-img.sh +++ b/images/guest-aux/make-ubuntu-img.sh @@ -36,7 +36,7 @@ DISTRIB_DESCRIPTION="Ubuntu 10.10 (Phony Pharaoh)" EOF # Create a disk image. -../run ../fish/guestfish <<'EOF' +${TOP_SRCDIR}/run ${TOP_BUILDDIR}/fish/guestfish <<EOF sparse ubuntu.img.tmp 512M run @@ -69,9 +69,9 @@ write /etc/debian_version "5.0.1" upload release.tmp /etc/lsb-release write /etc/hostname "ubuntu.invalid" -upload guest-aux/debian-packages /var/lib/dpkg/status +upload ${SRCDIR}/guest-aux/debian-packages /var/lib/dpkg/status -upload bin-i586-dynamic /bin/ls +upload ${SRCDIR}/bin-x86_64-dynamic /bin/ls mkdir /boot/grub touch /boot/grub/grub.conf diff --git a/images/guest-aux/make-windows-img.sh b/images/guest-aux/make-windows-img.sh index 3acb2b7..76cb0f8 100755 --- a/images/guest-aux/make-windows-img.sh +++ b/images/guest-aux/make-windows-img.sh @@ -25,7 +25,7 @@ set -e # ntfs-3g/ntfsprogs then we cannot create a Windows phony image. # Nothing actually uses windows.img in the standard build so we can # just 'touch' it and emit a warning. -if ! ../run ../fish/guestfish -a /dev/null run : available "ntfs3g ntfsprogs"; then +if ! ${TOP_SRCDIR}/run ${TOP_BUILDDIR}/fish/guestfish -a /dev/null run : available "ntfs3g ntfsprogs"; then echo "***" echo "Warning: cannot create windows.img because there is no NTFS" echo "support in this build of libguestfs. Just touching the output" @@ -36,7 +36,7 @@ if ! ../run ../fish/guestfish -a /dev/null run : available "ntfs3g ntfsprogs"; t fi # Create a disk image. -../run ../fish/guestfish <<'EOF' +${TOP_SRCDIR}/run ${TOP_BUILDDIR}/fish/guestfish <<EOF sparse windows.img.tmp 512M run @@ -58,10 +58,10 @@ mkfs ntfs /dev/sda2 mount-options "" /dev/sda2 / mkdir-p /Windows/System32/Config -upload guest-aux/windows-software /Windows/System32/Config/SOFTWARE -upload guest-aux/windows-system /Windows/System32/Config/SYSTEM +upload ${SRCDIR}/guest-aux/windows-software /Windows/System32/Config/SOFTWARE +upload ${SRCDIR}/guest-aux/windows-system /Windows/System32/Config/SYSTEM -upload bin-win32.exe /Windows/System32/cmd.exe +upload ${SRCDIR}/bin-win32.exe /Windows/System32/cmd.exe mkdir "/Program Files" touch /autoexec.bat diff --git a/run b/run index 2945315..08422e7 100755 --- a/run +++ b/run @@ -29,9 +29,7 @@ #---------------------------------------------------------------------- -# Find this script. -run=$(readlink -f "$0") -b=$(dirname "$run") +b=${TOP_BUILDDIR} # Set TMPDIR so the appliance doesn't conflict with globally # installed libguestfs. -- 1.7.5.4
On Wed, Aug 17, 2011 at 12:42:01AM +0200, Hilko Bengen wrote:
diff --git a/run b/run index 2945315..08422e7 100755 --- a/run +++ b/run @@ -29,9 +29,7 @@
#----------------------------------------------------------------------
-# Find this script. -run=$(readlink -f "$0") -b=$(dirname "$run") +b=${TOP_BUILDDIR}
# Set TMPDIR so the appliance doesn't conflict with globally # installed libguestfs.
This part is definitely not right because the ./run script is intended to be used by any user (and I use it all the time), not just from 'make check'. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
Using default values for some environment variables should ensure that ./run can still be run from a normal shell, not just from make check --- images/Makefile.am | 10 ++++++++++ images/guest-aux/make-debian-img.sh | 6 +++--- images/guest-aux/make-fedora-img.sh | 8 ++++---- images/guest-aux/make-ubuntu-img.sh | 6 +++--- images/guest-aux/make-windows-img.sh | 10 +++++----- run | 8 ++++---- 6 files changed, 29 insertions(+), 19 deletions(-) diff --git a/images/Makefile.am b/images/Makefile.am index 68eb550..a962f72 100644 --- a/images/Makefile.am +++ b/images/Makefile.am @@ -176,15 +176,19 @@ fedora.img: guest-aux/make-fedora-img.sh \ LIBGUESTFS_PATH=$(top_builddir)/appliance \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ TMPDIR=$(top_builddir) \ + BUILDDIR=$(builddir) SRCDIR=$(srcdir) \ + TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) \ bash $< 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 $@ @@ -193,6 +197,8 @@ debian.img: guest-aux/make-debian-img.sh LIBGUESTFS_PATH=$(top_builddir)/appliance \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ TMPDIR=$(top_builddir) \ + BUILDDIR=$(builddir) SRCDIR=$(srcdir) \ + TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) \ bash $< # Make a (dummy) Ubuntu image. @@ -200,6 +206,8 @@ ubuntu.img: guest-aux/make-ubuntu-img.sh LIBGUESTFS_PATH=$(top_builddir)/appliance \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ TMPDIR=$(top_builddir) \ + BUILDDIR=$(builddir) SRCDIR=$(srcdir) \ + TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) \ bash $< # Make a (dummy) Windows image. @@ -208,6 +216,8 @@ windows.img: guest-aux/make-windows-img.sh \ LIBGUESTFS_PATH=$(top_builddir)/appliance \ LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ TMPDIR=$(top_builddir) \ + BUILDDIR=$(builddir) SRCDIR=$(srcdir) \ + TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) \ bash $< # Since users might not have the tools needed to create this, we diff --git a/images/guest-aux/make-debian-img.sh b/images/guest-aux/make-debian-img.sh index 9a01e93..36a1220 100755 --- a/images/guest-aux/make-debian-img.sh +++ b/images/guest-aux/make-debian-img.sh @@ -31,7 +31,7 @@ LABEL=BOOT /boot ext2 default 0 0 EOF # Create a disk image. -../run ../fish/guestfish <<'EOF' +${TOP_SRCDIR}/run ${TOP_BUILDDIR}/fish/guestfish <<EOF sparse debian.img.tmp 512M run @@ -80,9 +80,9 @@ upload fstab.tmp /etc/fstab write /etc/debian_version "5.0.1" write /etc/hostname "debian.invalid" -upload guest-aux/debian-packages /var/lib/dpkg/status +upload ${SRCDIR}/guest-aux/debian-packages /var/lib/dpkg/status -upload bin-x86_64-dynamic /bin/ls +upload ${SRCDIR}/bin-x86_64-dynamic /bin/ls mkdir /boot/grub touch /boot/grub/grub.conf diff --git a/images/guest-aux/make-fedora-img.sh b/images/guest-aux/make-fedora-img.sh index a038432..26b4068 100755 --- a/images/guest-aux/make-fedora-img.sh +++ b/images/guest-aux/make-fedora-img.sh @@ -31,7 +31,7 @@ LABEL=ROOT / ext2 default 0 0 EOF # Create a disk image. -../run ../fish/guestfish <<'EOF' +${TOP_SRCDIR}/run ${TOP_BUILDDIR}/fish/guestfish <<EOF sparse fedora.img.tmp 512M run @@ -72,10 +72,10 @@ write /etc/redhat-release "Fedora release 14 (Phony)" write /etc/fedora-release "Fedora release 14 (Phony)" write /etc/sysconfig/network "HOSTNAME=fedora.invalid" -upload guest-aux/fedora-name.db /var/lib/rpm/Name -upload guest-aux/fedora-packages.db /var/lib/rpm/Packages +upload ${BUILDDIR}/guest-aux/fedora-name.db /var/lib/rpm/Name +upload ${BUILDDIR}/guest-aux/fedora-packages.db /var/lib/rpm/Packages -upload bin-x86_64-dynamic /bin/ls +upload ${SRCDIR}/bin-x86_64-dynamic /bin/ls mkdir /boot/grub touch /boot/grub/grub.conf diff --git a/images/guest-aux/make-ubuntu-img.sh b/images/guest-aux/make-ubuntu-img.sh index 4ddb40a..8ca622d 100755 --- a/images/guest-aux/make-ubuntu-img.sh +++ b/images/guest-aux/make-ubuntu-img.sh @@ -36,7 +36,7 @@ DISTRIB_DESCRIPTION="Ubuntu 10.10 (Phony Pharaoh)" EOF # Create a disk image. -../run ../fish/guestfish <<'EOF' +${TOP_SRCDIR}/run ${TOP_BUILDDIR}/fish/guestfish <<EOF sparse ubuntu.img.tmp 512M run @@ -69,9 +69,9 @@ write /etc/debian_version "5.0.1" upload release.tmp /etc/lsb-release write /etc/hostname "ubuntu.invalid" -upload guest-aux/debian-packages /var/lib/dpkg/status +upload ${SRCDIR}/guest-aux/debian-packages /var/lib/dpkg/status -upload bin-i586-dynamic /bin/ls +upload ${SRCDIR}/bin-x86_64-dynamic /bin/ls mkdir /boot/grub touch /boot/grub/grub.conf diff --git a/images/guest-aux/make-windows-img.sh b/images/guest-aux/make-windows-img.sh index 3acb2b7..76cb0f8 100755 --- a/images/guest-aux/make-windows-img.sh +++ b/images/guest-aux/make-windows-img.sh @@ -25,7 +25,7 @@ set -e # ntfs-3g/ntfsprogs then we cannot create a Windows phony image. # Nothing actually uses windows.img in the standard build so we can # just 'touch' it and emit a warning. -if ! ../run ../fish/guestfish -a /dev/null run : available "ntfs3g ntfsprogs"; then +if ! ${TOP_SRCDIR}/run ${TOP_BUILDDIR}/fish/guestfish -a /dev/null run : available "ntfs3g ntfsprogs"; then echo "***" echo "Warning: cannot create windows.img because there is no NTFS" echo "support in this build of libguestfs. Just touching the output" @@ -36,7 +36,7 @@ if ! ../run ../fish/guestfish -a /dev/null run : available "ntfs3g ntfsprogs"; t fi # Create a disk image. -../run ../fish/guestfish <<'EOF' +${TOP_SRCDIR}/run ${TOP_BUILDDIR}/fish/guestfish <<EOF sparse windows.img.tmp 512M run @@ -58,10 +58,10 @@ mkfs ntfs /dev/sda2 mount-options "" /dev/sda2 / mkdir-p /Windows/System32/Config -upload guest-aux/windows-software /Windows/System32/Config/SOFTWARE -upload guest-aux/windows-system /Windows/System32/Config/SYSTEM +upload ${SRCDIR}/guest-aux/windows-software /Windows/System32/Config/SOFTWARE +upload ${SRCDIR}/guest-aux/windows-system /Windows/System32/Config/SYSTEM -upload bin-win32.exe /Windows/System32/cmd.exe +upload ${SRCDIR}/bin-win32.exe /Windows/System32/cmd.exe mkdir "/Program Files" touch /autoexec.bat diff --git a/run b/run index 2945315..0986fd8 100755 --- a/run +++ b/run @@ -35,12 +35,12 @@ b=$(dirname "$run") # Set TMPDIR so the appliance doesn't conflict with globally # installed libguestfs. -export TMPDIR=$b +export TMPDIR=${TMPDIR:-$b} # Set local environment relative to this script. -export LD_LIBRARY_PATH="$b/src/.libs" -export LIBGUESTFS_PATH="$b/appliance" -export PERL5LIB="$b/perl/blib/lib:$b/perl/blib/arch" +export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-"$b/src/.libs"} +export LIBGUESTFS_PATH=${LIBGUESTFS_PATH:-"$b/appliance"} +export PERL5LIB=${PERL5LIB:-"$b/perl/blib/lib:$b/perl/blib/arch"} # Do we have libtool? If we have it then we can use it to make # running valgrind simpler. However don't depend on it. -- 1.7.5.4
./run can now be run in a separate build directory. Since some files needed in the image checks are found in the source tree (but not the build tree), the source tree location is passed to make-*-img.sh via an environment variable. --- configure.ac | 2 + images/Makefile.am | 14 ++++----- images/guest-aux/make-debian-img.sh | 6 ++-- images/guest-aux/make-fedora-img.sh | 4 +- images/guest-aux/make-ubuntu-img.sh | 6 ++-- images/guest-aux/make-windows-img.sh | 8 ++-- run | 52 ---------------------------------- run.in | 51 +++++++++++++++++++++++++++++++++ 8 files changed, 71 insertions(+), 72 deletions(-) delete mode 100755 run create mode 100755 run.in diff --git a/configure.ac b/configure.ac index 54c2911..e45632d 100644 --- a/configure.ac +++ b/configure.ac @@ -909,6 +909,8 @@ AC_CONFIG_HEADERS([config.h]) dnl http://www.mail-archive.com/automake@gnu.org/msg10204.html AC_CONFIG_FILES([podwrapper.sh], [chmod +x podwrapper.sh]) +AC_CONFIG_FILES([run], + [chmod +x run]) AC_CONFIG_FILES([Makefile appliance/Makefile capitests/Makefile diff --git a/images/Makefile.am b/images/Makefile.am index 68eb550..90c4ce3 100644 --- a/images/Makefile.am +++ b/images/Makefile.am @@ -173,41 +173,39 @@ $(builddir)/test-grep.txt.gz: test-grep.txt fedora.img: guest-aux/make-fedora-img.sh \ guest-aux/fedora-name.db \ guest-aux/fedora-packages.db - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ TMPDIR=$(top_builddir) \ + SRCDIR=$(srcdir) \ bash $< 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 $@ # Make a (dummy) Debian image. debian.img: guest-aux/make-debian-img.sh - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ TMPDIR=$(top_builddir) \ + SRCDIR=$(srcdir) \ bash $< # Make a (dummy) Ubuntu image. ubuntu.img: guest-aux/make-ubuntu-img.sh - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ TMPDIR=$(top_builddir) \ + SRCDIR=$(srcdir) \ bash $< # Make a (dummy) Windows image. windows.img: guest-aux/make-windows-img.sh \ guest-aux/windows-software guest-aux/windows-system - LIBGUESTFS_PATH=$(top_builddir)/appliance \ - LD_LIBRARY_PATH=$(top_builddir)/src/.libs \ TMPDIR=$(top_builddir) \ + SRCDIR=$(srcdir) \ bash $< # Since users might not have the tools needed to create this, we diff --git a/images/guest-aux/make-debian-img.sh b/images/guest-aux/make-debian-img.sh index 9a01e93..4b0490d 100755 --- a/images/guest-aux/make-debian-img.sh +++ b/images/guest-aux/make-debian-img.sh @@ -31,7 +31,7 @@ LABEL=BOOT /boot ext2 default 0 0 EOF # Create a disk image. -../run ../fish/guestfish <<'EOF' +../run ../fish/guestfish <<EOF sparse debian.img.tmp 512M run @@ -80,9 +80,9 @@ upload fstab.tmp /etc/fstab write /etc/debian_version "5.0.1" write /etc/hostname "debian.invalid" -upload guest-aux/debian-packages /var/lib/dpkg/status +upload ${SRCDIR}/guest-aux/debian-packages /var/lib/dpkg/status -upload bin-x86_64-dynamic /bin/ls +upload ${SRCDIR}/bin-x86_64-dynamic /bin/ls mkdir /boot/grub touch /boot/grub/grub.conf diff --git a/images/guest-aux/make-fedora-img.sh b/images/guest-aux/make-fedora-img.sh index a038432..3d6c471 100755 --- a/images/guest-aux/make-fedora-img.sh +++ b/images/guest-aux/make-fedora-img.sh @@ -31,7 +31,7 @@ LABEL=ROOT / ext2 default 0 0 EOF # Create a disk image. -../run ../fish/guestfish <<'EOF' +../run ../fish/guestfish <<EOF sparse fedora.img.tmp 512M run @@ -75,7 +75,7 @@ write /etc/sysconfig/network "HOSTNAME=fedora.invalid" upload guest-aux/fedora-name.db /var/lib/rpm/Name upload guest-aux/fedora-packages.db /var/lib/rpm/Packages -upload bin-x86_64-dynamic /bin/ls +upload ${SRCDIR}/bin-x86_64-dynamic /bin/ls mkdir /boot/grub touch /boot/grub/grub.conf diff --git a/images/guest-aux/make-ubuntu-img.sh b/images/guest-aux/make-ubuntu-img.sh index 4ddb40a..c48fd5d 100755 --- a/images/guest-aux/make-ubuntu-img.sh +++ b/images/guest-aux/make-ubuntu-img.sh @@ -36,7 +36,7 @@ DISTRIB_DESCRIPTION="Ubuntu 10.10 (Phony Pharaoh)" EOF # Create a disk image. -../run ../fish/guestfish <<'EOF' +../run ../fish/guestfish <<EOF sparse ubuntu.img.tmp 512M run @@ -69,9 +69,9 @@ write /etc/debian_version "5.0.1" upload release.tmp /etc/lsb-release write /etc/hostname "ubuntu.invalid" -upload guest-aux/debian-packages /var/lib/dpkg/status +upload ${SRCDIR}/guest-aux/debian-packages /var/lib/dpkg/status -upload bin-i586-dynamic /bin/ls +upload ${SRCDIR}/bin-x86_64-dynamic /bin/ls mkdir /boot/grub touch /boot/grub/grub.conf diff --git a/images/guest-aux/make-windows-img.sh b/images/guest-aux/make-windows-img.sh index 3acb2b7..9e2152d 100755 --- a/images/guest-aux/make-windows-img.sh +++ b/images/guest-aux/make-windows-img.sh @@ -36,7 +36,7 @@ if ! ../run ../fish/guestfish -a /dev/null run : available "ntfs3g ntfsprogs"; t fi # Create a disk image. -../run ../fish/guestfish <<'EOF' +../run ../fish/guestfish <<EOF sparse windows.img.tmp 512M run @@ -58,10 +58,10 @@ mkfs ntfs /dev/sda2 mount-options "" /dev/sda2 / mkdir-p /Windows/System32/Config -upload guest-aux/windows-software /Windows/System32/Config/SOFTWARE -upload guest-aux/windows-system /Windows/System32/Config/SYSTEM +upload ${SRCDIR}/guest-aux/windows-software /Windows/System32/Config/SOFTWARE +upload ${SRCDIR}/guest-aux/windows-system /Windows/System32/Config/SYSTEM -upload bin-win32.exe /Windows/System32/cmd.exe +upload ${SRCDIR}/bin-win32.exe /Windows/System32/cmd.exe mkdir "/Program Files" touch /autoexec.bat diff --git a/run b/run deleted file mode 100755 index 2945315..0000000 --- a/run +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -# libguestfs 'run' programs locally script -# Copyright (C) 2011 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 -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -#---------------------------------------------------------------------- - -# With this script you can run all the virt tools without needing to -# install them first. You just have to do for example: -# -# ./run ./inspector/virt-inspector [args ...] -# -# This works for any C, OCaml or Perl virt tools in the libguestfs -# distribution. Also you can make a symbolic link to this 'run' -# script from anywhere (eg. $HOME/bin/run) if you wish. - -#---------------------------------------------------------------------- - -# Find this script. -run=$(readlink -f "$0") -b=$(dirname "$run") - -# Set TMPDIR so the appliance doesn't conflict with globally -# installed libguestfs. -export TMPDIR=$b - -# Set local environment relative to this script. -export LD_LIBRARY_PATH="$b/src/.libs" -export LIBGUESTFS_PATH="$b/appliance" -export PERL5LIB="$b/perl/blib/lib:$b/perl/blib/arch" - -# Do we have libtool? If we have it then we can use it to make -# running valgrind simpler. However don't depend on it. -if libtool --help >/dev/null 2>&1; then - libtool="libtool --mode=execute" -fi - -# Run the program. -exec $libtool "$@" diff --git a/run.in b/run.in new file mode 100755 index 0000000..d7b91d4 --- /dev/null +++ b/run.in @@ -0,0 +1,51 @@ +#!/bin/bash - +# libguestfs 'run' programs locally script +# Copyright (C) 2011 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 +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +#---------------------------------------------------------------------- + +# With this script you can run all the virt tools without needing to +# install them first. You just have to do for example: +# +# ./run ./inspector/virt-inspector [args ...] +# +# This works for any C, OCaml or Perl virt tools in the libguestfs +# distribution. Also you can make a symbolic link to this 'run' +# script from anywhere (eg. $HOME/bin/run) if you wish. + +#---------------------------------------------------------------------- + +# Find this script. +b=@abs_builddir@ + +# Set TMPDIR so the appliance doesn't conflict with globally +# installed libguestfs. +export TMPDIR="$b" + +# Set local environment relative to this script. +export LD_LIBRARY_PATH="$b/src/.libs" +export LIBGUESTFS_PATH="$b/appliance" +export PERL5LIB="$b/perl/blib/lib:$b/perl/blib/arch" + +# Do we have libtool? If we have it then we can use it to make +# running valgrind simpler. However don't depend on it. +if libtool --help >/dev/null 2>&1; then + libtool="libtool --mode=execute" +fi + +# Run the program. +exec $libtool "$@" -- 1.7.5.4
On Thu, Aug 18, 2011 at 12:14:46AM +0200, Hilko Bengen wrote:
./run can now be run in a separate build directory. Since some files needed in the image checks are found in the source tree (but not the build tree), the source tree location is passed to make-*-img.sh via an environment variable.
Yes, this looks much better. ACK. I'll check it and push it tomorrow morning. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
On Wed, Aug 17, 2011 at 12:41:57AM +0200, Hilko Bengen wrote:
For ExtUtils::MakeMaker (Perl), there is an alternative (setting INST_ARCHLIB, INST_LIB, INST_BIN, INST_SCRIPT, INST_MAN1DIR, and INST_MAN3DIR) but this would not work for the test cases.
For rake (Ruby), I have found no obvious way to specify a different target directory.
I'm sure there must be a better way to do this. I'll have to take a closer look at it. I applied 2, 3, 4 from the patch series and I'll push it later once I confirm that make && make check is OK for me. Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v
* Richard W.M. Jones:
On Wed, Aug 17, 2011 at 12:41:57AM +0200, Hilko Bengen wrote:
For ExtUtils::MakeMaker (Perl), there is an alternative (setting INST_ARCHLIB, INST_LIB, INST_BIN, INST_SCRIPT, INST_MAN1DIR, and INST_MAN3DIR) but this would not work for the test cases.
For rake (Ruby), I have found no obvious way to specify a different target directory.
I'm sure there must be a better way to do this. I'll have to take a closer look at it.
I am happy to keep the two one-liner patches as part of the debian/patches queue as long as there is no better solution.
I applied 2, 3, 4 from the patch series and I'll push it later once I confirm that make && make check is OK for me.
make && make check worked for me when building from the source directory. make check still has a few issues when run from a separate directory. I believe that all of them happen because the files (i.e. "../COPYING.LIB") uploaded to the VM are not found because they did not exist in the build tree. Cheers, -Hilko
participants (2)
-
Hilko Bengen -
Richard W.M. Jones