All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/5] manual: provide make targets to build the documentation
Date: Fri, 5 Aug 2011 01:05:34 +0200	[thread overview]
Message-ID: <201108050105.34334.yann.morin.1998@anciens.enib.fr> (raw)
In-Reply-To: <ab98242259a83d1329c12ef548b33d0c2ce41200.1312492948.git.thomas.petazzoni@free-electrons.com>

Thomas, All,

On Thursday 04 August 2011 23:23:20 Thomas Petazzoni wrote:
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  Makefile |   40 +++++++++++++++++++++++++++++++++++++++-
>  1 files changed, 39 insertions(+), 1 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 02a1659..5face9f 100644
> --- a/Makefile
> +++ b/Makefile
[--SNIP--]
> @@ -679,5 +687,35 @@ release: OUT=buildroot-$(BR2_VERSION)
>  release:
>  	git archive --format=tar --prefix=$(OUT)/ master|gzip -9 >$(OUT).tar.gz
>  
> +manual: manual-html manual-splitted-html manual-pdf manual-txt
> +
> +manual-html:
> +	@echo "HTML manual..."
> +	@(cd docs/manual; 				\
> +		cp ../images/logo.png .; 		\
> +		asciidoc -b xhtml11 -d book manual.txt; \

Does not work for out-of-tree builds.

Where is the doc output supposed to be: in the source tree, or in the
build dir? If the later, I tested the above doesn't work. If the former,
it'd be weird to have generated files in the source tree. Especially
if it is shared by more than one build instannce...

> +		rm logo.png)

Don't remove the logo, it is needed later for viewing the HTML doc.
But see below...

> +manual-splitted-html:
> +	@echo "Splited HTML manual..."
> +	@(cd docs/manual; 				\
> +		cp ../images/logo.png .; 		\
> +		a2x -f chunked -d book -L manual.txt; 	\
> +		rm logo.png)
> +
> +manual-pdf:
> +	@echo "PDF manual..."
> +	@(cd docs/manual; 				\
> +		cp ../images/logo.png .; 		\
> +		a2x --dblatex-opts "-P latex.output.revhistory=0" -f pdf -d book -L manual.txt ; \
> +		rm logo.png)
> +
> +manual-txt:
> +	@echo "Text manual..."
> +	@(cd docs/manual; 				\
> +		cp ../images/logo.png .; 		\
> +		a2x -f text -d book -L manual.txt; 	\
> +		rm logo.png)
> +
>  .PHONY: $(noconfig_targets)

I find the copy-then-remove a little bit uggly. Maybe somthing along the
lines of (Makefile totally untested, asciidoc commands manually tested):

---8<---
MANUAL_SOURCES = $(wildcard docs/manual/*.txt)

$(O)/docs/manual/logo.png: docs/images/logo.png
	$(Q)mkdir -p $(@D)
	$(Q)cp $< $@

manual: manual-html manual-splitted-html [...]

manual-%: $(MANUAL_SOURCES) $(O)/docs/manual/logo.png

manual-html: 
	@echo "HTML manual..."
	$(Q)asciidoc -b xhtml11 -d book docs/manual/manual.txt \
	             -o $(O)/docs/manual/manual.html

manual-splitted-html:
	@echo "Splited HTML manual..."
	$(Q)a2x -f chunked -d book -L docs/manual/manual.txt \
	        -r docs/images                               \
	        -D $(O)/docs/manual
# And so on...
---8<---

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2011-08-04 23:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-04 21:23 [Buildroot] [RFC] Using AsciiDoc for the Buildroot manual Thomas Petazzoni
2011-08-04 21:23 ` [Buildroot] [PATCH 1/5] manual: convert existing documentation to the asciidoc format Thomas Petazzoni
2011-08-04 21:23 ` [Buildroot] [PATCH 2/5] manual: provide make targets to build the documentation Thomas Petazzoni
2011-08-04 23:05   ` Yann E. MORIN [this message]
2011-08-04 21:23 ` [Buildroot] [PATCH 3/5] remove the old buildroot.html documentation Thomas Petazzoni
2011-08-04 21:23 ` [Buildroot] [PATCH 4/5] remove Glibc_vs_uClibc document Thomas Petazzoni
2011-08-04 21:23 ` [Buildroot] [PATCH 5/5] manual: ignore generated files Thomas Petazzoni
2011-08-04 22:56 ` [Buildroot] [RFC] Using AsciiDoc for the Buildroot manual Grant Edwards
2011-08-05  5:42 ` Thomas De Schampheleire
2011-08-05  6:39   ` Thomas Petazzoni
2011-08-05  7:44     ` Peter Korsgaard
2011-08-05  8:22       ` Thomas Petazzoni
2011-08-07 19:18         ` Peter Korsgaard
2011-08-07 19:24           ` Yann E. MORIN
2011-08-08 18:20           ` Peter Korsgaard
2011-08-09 15:02             ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201108050105.34334.yann.morin.1998@anciens.enib.fr \
    --to=yann.morin.1998@anciens.enib.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.