[Libguestfs] [PATCH] New tool: virt-edit
Richard W.M. Jones
rjones at redhat.com
Wed Sep 23 11:00:23 UTC 2009
On Wed, Sep 23, 2009 at 11:45:16AM +0100, Daniel P. Berrange wrote:
> On Wed, Sep 23, 2009 at 11:39:40AM +0100, Richard W.M. Jones wrote:
> > +
> > +EXTRA_DIST = \
> > + run-edit-locally \
> > + virt-edit.pl
> > +
> > +if HAVE_EDIT
> > +
> > +man_MANS = virt-edit.1
> > +
> > +noinst_DATA = @top_builddir@/html/virt-edit.1.html
> > +
> > +virt-edit.1: virt-edit.pl
> > + $(POD2MAN) \
> > + --section 1 \
> > + -c "Virtualization Support" \
> > + --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 \
> > + --css 'pod.css' \
> > + --title 'virt-edit, edit a file in a virtual machine' \
> > + --htmldir html \
> > + --outfile html/virt-edit.1.html \
> > + edit/$<
> > +
> > +install-data-hook:
> > + mkdir -p $(DESTDIR)$(bindir)
> > + install -m 0755 virt-edit.pl $(DESTDIR)$(bindir)/virt-edit
>
> If you name the file in GIT 'virt-edit' instead of 'virt-edit.pl'
> you can just use the regular automake rules since you won't need to
> be re-naming it upon install..
>
> bin_SCRIPTS = virt-edit
>
> and thus not have to write install + uninstall hooks.
The was some reason why we called the tools virt-foo.pl, but I can't
honestly recall it now.
Perhaps something to do with having the editor recognize that it's a
Perl file, but I should think any editor worth its salt should be able
to do that ...
Rich.
--
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
More information about the Libguestfs
mailing list