[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 11 of 15 v2] docs: generate an index for the html output



2011/11/25 Ian Campbell <ian.campbell@xxxxxxxxxx>:
> # HG changeset patch
> # User Ian Campbell <ian.campbell@xxxxxxxxxx>
> # Date 1322231661 0
> # Node ID 00ea49f77bdcef16251e3773c99fc02394524b83
> # Parent Âddeac8b237e4f71d05c817fa8432417886e7e202
> docs: generate an index for the html output
>
> nb: I'm not a Perl wizard...
>
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
>
> diff -r ddeac8b237e4 -r 00ea49f77bdc docs/INDEX
> --- /dev/null  Thu Jan 01 00:00:00 1970 +0000
> +++ b/docs/INDEX Â Â Â ÂFri Nov 25 14:34:21 2011 +0000
> @@ -0,0 +1,5 @@
> +misc/hvm-emulated-unplug    Xen HVM emulated device unplug protocol
> +
> +# These are not all that useful anymore, hide them from the index
> +interface/index            ÂNO-INDEX
> +user/index           NO-INDEX
> diff -r ddeac8b237e4 -r 00ea49f77bdc docs/Makefile
> --- a/docs/Makefile   Fri Nov 25 11:53:06 2011 +0000
> +++ b/docs/Makefile   Fri Nov 25 14:34:21 2011 +0000
> @@ -45,7 +45,7 @@ ps: $(DOC_PS)
> Âpdf: $(DOC_PDF)
>
> Â.PHONY: html
> -html: $(DOC_HTML)
> +html: $(DOC_HTML) html/index.html
>
> Â.PHONY: txt
> Âtxt: $(DOC_TXT)
> @@ -128,6 +128,9 @@ html/%/index.html: src/%.tex
> Â Â Â Â$< 1>/dev/null 2>/dev/null ; else \
> Â Â Â Âecho "latex2html not installed; skipping $*."; fi
>
> +html/index.html: $(DOC_HTML) ./gen-html-index INDEX
> + Â Â Â ./gen-html-index -i INDEX html $(DOC_HTML)
> +
> Âhtml/%.html: %.markdown
> Â Â Â Â@$(INSTALL_DIR) $(@D)
> Â Â Â Â@set -e ; if which $(MARKDOWN) 1>/dev/null 2>/dev/null; then \
> diff -r ddeac8b237e4 -r 00ea49f77bdc docs/gen-html-index
> --- /dev/null  Thu Jan 01 00:00:00 1970 +0000
> +++ b/docs/gen-html-index    Fri Nov 25 14:34:21 2011 +0000
> @@ -0,0 +1,136 @@
> +#!/usr/bin/perl -w

What about using the following:

#!/usr/bin/env perl
use warnings;

From what I've read (and tried), "-w" is equivalent to "$^W = 1" and
"use warnings", I think "use warnings" is the clearer way to do this.
The only problem is that "use warnings" requires perl 5.6, but from
what I see this is quite an old version of perl (from 2002 more or
less) so every modern Linux distro comes with 5.10 at least.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.