On Wed, Sep 23, 2009 at 12:00:23PM +0100, Richard W.M. Jones wrote:
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)" \ + $< > $@ + +@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 ...
To handle that with emacs you can just add # -*- perl -*- Immediately after the #!/usr/bin/perl line Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|