As suggested by Jim in this earlier message: https://www.redhat.com/archives/libguestfs/2009-September/msg00152.html Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.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
Richard W.M. Jones
2009-Sep-23 11:13 UTC
[Libguestfs] [PATCH 1/3] Replace @...@ with $(...) in these common Makefile.am
Identical changes are made to the five directories: cat/ df/ edit/ inspector/ rescue/ -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora -------------- next part -------------->From 154370c0e8a7bfcb6af5236bd7232794c188eabb Mon Sep 17 00:00:00 2001From: Richard Jones <rjones at trick.home.annexia.org> Date: Wed, 23 Sep 2009 12:04:25 +0100 Subject: [PATCH 1/3] Replace @...@ with $(...) in these common Makefile.am files. --- cat/Makefile.am | 8 ++++---- df/Makefile.am | 8 ++++---- edit/Makefile.am | 8 ++++---- inspector/Makefile.am | 8 ++++---- rescue/Makefile.am | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/cat/Makefile.am b/cat/Makefile.am index 89a33a4..98df337 100644 --- a/cat/Makefile.am +++ b/cat/Makefile.am @@ -23,7 +23,7 @@ if HAVE_CAT man_MANS = virt-cat.1 -noinst_DATA = @top_builddir@/html/virt-cat.1.html +noinst_DATA = $(top_builddir)/html/virt-cat.1.html virt-cat.1: virt-cat.pl $(POD2MAN) \ @@ -32,9 +32,9 @@ virt-cat.1: virt-cat.pl --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ $< > $@ - at top_builddir@/html/virt-cat.1.html: virt-cat.pl - mkdir -p @top_builddir@/html - cd @top_builddir@ && pod2html \ +$(top_builddir)/html/virt-cat.1.html: virt-cat.pl + mkdir -p $(top_builddir)/html + cd $(top_builddir) && pod2html \ --css 'pod.css' \ --title 'virt-cat, display a file in a virtual machine' \ --htmldir html \ diff --git a/df/Makefile.am b/df/Makefile.am index 4ff2fb1..7234eb7 100644 --- a/df/Makefile.am +++ b/df/Makefile.am @@ -23,7 +23,7 @@ if HAVE_DF man_MANS = virt-df.1 -noinst_DATA = @top_builddir@/html/virt-df.1.html +noinst_DATA = $(top_builddir)/html/virt-df.1.html virt-df.1: virt-df.pl $(POD2MAN) \ @@ -32,9 +32,9 @@ virt-df.1: virt-df.pl --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ $< > $@ - at top_builddir@/html/virt-df.1.html: virt-df.pl - mkdir -p @top_builddir@/html - cd @top_builddir@ && pod2html \ +$(top_builddir)/html/virt-df.1.html: virt-df.pl + mkdir -p $(top_builddir)/html + cd $(top_builddir) && pod2html \ --css 'pod.css' \ --title 'virt-df, display free space on virtual filesystems' \ --htmldir html \ diff --git a/edit/Makefile.am b/edit/Makefile.am index 4fd25f0..4a2a52c 100644 --- a/edit/Makefile.am +++ b/edit/Makefile.am @@ -23,7 +23,7 @@ if HAVE_EDIT man_MANS = virt-edit.1 -noinst_DATA = @top_builddir@/html/virt-edit.1.html +noinst_DATA = $(top_builddir)/html/virt-edit.1.html virt-edit.1: virt-edit.pl $(POD2MAN) \ @@ -32,9 +32,9 @@ virt-edit.1: virt-edit.pl --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ $< > $@ - at top_builddir@/html/virt-edit.1.html: virt-edit.pl - mkdir -p @top_builddir@/html - cd @top_builddir@ && pod2html \ +$(top_builddir)/html/virt-edit.1.html: virt-edit.pl + mkdir -p $(top_builddir)/html + cd $(top_builddir) && pod2html \ --css 'pod.css' \ --title 'virt-edit, edit a file in a virtual machine' \ --htmldir html \ diff --git a/inspector/Makefile.am b/inspector/Makefile.am index a1df2ab..a93a1ff 100644 --- a/inspector/Makefile.am +++ b/inspector/Makefile.am @@ -23,7 +23,7 @@ if HAVE_INSPECTOR man_MANS = virt-inspector.1 -noinst_DATA = @top_builddir@/html/virt-inspector.1.html +noinst_DATA = $(top_builddir)/html/virt-inspector.1.html virt-inspector.1: virt-inspector.pl $(POD2MAN) \ @@ -32,9 +32,9 @@ virt-inspector.1: virt-inspector.pl --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ $< > $@ - at top_builddir@/html/virt-inspector.1.html: virt-inspector.pl - mkdir -p @top_builddir@/html - cd @top_builddir@ && pod2html \ +$(top_builddir)/html/virt-inspector.1.html: virt-inspector.pl + mkdir -p $(top_builddir)/html + cd $(top_builddir) && pod2html \ --css 'pod.css' \ --title 'virt-inspector, display OS version, kernel, drivers, mount points, applications, etc. in a virtual machine' \ --htmldir html \ diff --git a/rescue/Makefile.am b/rescue/Makefile.am index a9a533c..3d55728 100644 --- a/rescue/Makefile.am +++ b/rescue/Makefile.am @@ -23,7 +23,7 @@ if HAVE_RESCUE man_MANS = virt-rescue.1 -noinst_DATA = @top_builddir@/html/virt-rescue.1.html +noinst_DATA = $(top_builddir)/html/virt-rescue.1.html virt-rescue.1: virt-rescue.pl $(POD2MAN) \ @@ -32,9 +32,9 @@ virt-rescue.1: virt-rescue.pl --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ $< > $@ - at top_builddir@/html/virt-rescue.1.html: virt-rescue.pl - mkdir -p @top_builddir@/html - cd @top_builddir@ && pod2html \ +$(top_builddir)/html/virt-rescue.1.html: virt-rescue.pl + mkdir -p $(top_builddir)/html + cd $(top_builddir) && pod2html \ --css 'pod.css' \ --title 'virt-rescue, run a rescue shell on a virtual machine' \ --htmldir html \ -- 1.6.2.5
Richard W.M. Jones
2009-Sep-23 11:14 UTC
[Libguestfs] [PATCH 2/3] Create manpage atomically.
-- Richard Jones, Emerging Technologies, Red Hat http://et.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 -------------- next part -------------->From 9adddc19e448781cf2076c44f66242fe48b47c7c Mon Sep 17 00:00:00 2001From: Richard Jones <rjones at trick.home.annexia.org> Date: Wed, 23 Sep 2009 12:05:55 +0100 Subject: [PATCH 2/3] Create manpage atomically. Don't fail with a partial file if disk full, etc. --- cat/Makefile.am | 2 +- df/Makefile.am | 2 +- edit/Makefile.am | 2 +- inspector/Makefile.am | 2 +- rescue/Makefile.am | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cat/Makefile.am b/cat/Makefile.am index 98df337..5fe320b 100644 --- a/cat/Makefile.am +++ b/cat/Makefile.am @@ -30,7 +30,7 @@ virt-cat.1: virt-cat.pl --section 1 \ -c "Virtualization Support" \ --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ - $< > $@ + $< > $@-t && mv $@-t $@ $(top_builddir)/html/virt-cat.1.html: virt-cat.pl mkdir -p $(top_builddir)/html diff --git a/df/Makefile.am b/df/Makefile.am index 7234eb7..08af772 100644 --- a/df/Makefile.am +++ b/df/Makefile.am @@ -30,7 +30,7 @@ virt-df.1: virt-df.pl --section 1 \ -c "Virtualization Support" \ --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ - $< > $@ + $< > $@-t && mv $@-t $@ $(top_builddir)/html/virt-df.1.html: virt-df.pl mkdir -p $(top_builddir)/html diff --git a/edit/Makefile.am b/edit/Makefile.am index 4a2a52c..df8ddb7 100644 --- a/edit/Makefile.am +++ b/edit/Makefile.am @@ -30,7 +30,7 @@ virt-edit.1: virt-edit.pl --section 1 \ -c "Virtualization Support" \ --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ - $< > $@ + $< > $@-t && mv $@-t $@ $(top_builddir)/html/virt-edit.1.html: virt-edit.pl mkdir -p $(top_builddir)/html diff --git a/inspector/Makefile.am b/inspector/Makefile.am index a93a1ff..6eb3b57 100644 --- a/inspector/Makefile.am +++ b/inspector/Makefile.am @@ -30,7 +30,7 @@ virt-inspector.1: virt-inspector.pl --section 1 \ -c "Virtualization Support" \ --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ - $< > $@ + $< > $@-t && mv $@-t $@ $(top_builddir)/html/virt-inspector.1.html: virt-inspector.pl mkdir -p $(top_builddir)/html diff --git a/rescue/Makefile.am b/rescue/Makefile.am index 3d55728..1067c8d 100644 --- a/rescue/Makefile.am +++ b/rescue/Makefile.am @@ -30,7 +30,7 @@ virt-rescue.1: virt-rescue.pl --section 1 \ -c "Virtualization Support" \ --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ - $< > $@ + $< > $@-t && mv $@-t $@ $(top_builddir)/html/virt-rescue.1.html: virt-rescue.pl mkdir -p $(top_builddir)/html -- 1.6.2.5
Richard W.M. Jones
2009-Sep-23 11:14 UTC
[Libguestfs] [PATCH 3/3] Check return value from readlink.
-- Richard Jones, Emerging Technologies, Red Hat http://et.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 -------------- next part -------------->From 75b6338da3e6e33c02b931623f074ab5a76a1788 Mon Sep 17 00:00:00 2001From: Richard Jones <rjones at trick.home.annexia.org> Date: Wed, 23 Sep 2009 12:09:26 +0100 Subject: [PATCH 3/3] Check return value from readlink. --- cat/run-cat-locally | 2 +- df/run-df-locally | 2 +- edit/run-edit-locally | 2 +- inspector/run-inspector-locally | 2 +- rescue/run-rescue-locally | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cat/run-cat-locally b/cat/run-cat-locally index bba2c08..be60d07 100755 --- a/cat/run-cat-locally +++ b/cat/run-cat-locally @@ -34,7 +34,7 @@ my $path = $0; # Follow symlinks until we get to the real file while(-l $path) { - my $link = readlink($path); + my $link = readlink($path) or die "readlink: $path: $!"; if(File::Spec->file_name_is_absolute($link)) { $path = $link; } else { diff --git a/df/run-df-locally b/df/run-df-locally index 3557443..f8a50aa 100755 --- a/df/run-df-locally +++ b/df/run-df-locally @@ -34,7 +34,7 @@ my $path = $0; # Follow symlinks until we get to the real file while(-l $path) { - my $link = readlink($path); + my $link = readlink($path) or die "readlink: $path: $!"; if(File::Spec->file_name_is_absolute($link)) { $path = $link; } else { diff --git a/edit/run-edit-locally b/edit/run-edit-locally index 90968a2..3a6a9ab 100755 --- a/edit/run-edit-locally +++ b/edit/run-edit-locally @@ -34,7 +34,7 @@ my $path = $0; # Follow symlinks until we get to the real file while(-l $path) { - my $link = readlink($path); + my $link = readlink($path) or die "readlink: $path: $!"; if(File::Spec->file_name_is_absolute($link)) { $path = $link; } else { diff --git a/inspector/run-inspector-locally b/inspector/run-inspector-locally index 156f3ae..6106282 100755 --- a/inspector/run-inspector-locally +++ b/inspector/run-inspector-locally @@ -34,7 +34,7 @@ my $path = $0; # Follow symlinks until we get to the real file while(-l $path) { - my $link = readlink($path); + my $link = readlink($path) or die "readlink: $path: $!"; if(File::Spec->file_name_is_absolute($link)) { $path = $link; } else { diff --git a/rescue/run-rescue-locally b/rescue/run-rescue-locally index d814ed5..33191e7 100755 --- a/rescue/run-rescue-locally +++ b/rescue/run-rescue-locally @@ -35,7 +35,7 @@ my $path = $0; # Follow symlinks until we get to the real file while(-l $path) { - my $link = readlink($path); + my $link = readlink($path) or die "readlink: $path: $!"; if(File::Spec->file_name_is_absolute($link)) { $path = $link; } else { -- 1.6.2.5
Seemingly Similar Threads
- [PATCH febootstrap 0/8] Add support for building an ext2-based appliance
- [PATCH 0/7] Add libvirt domain to core API
- [PATCH x 3] Three small fixes for Debian
- [PATCH 0/5] 5 conservative changes to errno handling
- [PATCH 0/8 v2 DISCUSSION ONLY] Connecting to live virtual machines