All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/4] manual: provide make targets to build the documentation
Date: Thu, 29 Sep 2011 22:05:59 +0200	[thread overview]
Message-ID: <41d440a0142e3bb0e20ad8524aeca52fe94e8404.1317326629.git.thomas.petazzoni@free-electrons.com> (raw)
In-Reply-To: <cover.1317326629.git.thomas.petazzoni@free-electrons.com>

Special thanks for Yann E. Morin for giving input and suggestions to
implement this.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Makefile |   46 +++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 45 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index a20d3e2..278a3a0 100644
--- a/Makefile
+++ b/Makefile
@@ -665,10 +665,18 @@ ifeq ($(BR2_TARGET_BAREBOX),y)
 	@echo '  barebox-savedefconfig  - Run barebox savedefconfig'
 endif
 	@echo
+	@echo 'Documentation:'
+	@echo '  manual                 - build manual in HTML, split HTML, PDF and txt'
+	@echo '  manual-html            - build manual in HTML'
+	@echo '  manual-split-html      - build manual in split HTML'
+	@echo '  manual-pdf             - build manual in PDF'
+	@echo '  manual-txt             - build manual in txt'
+	@echo
 	@echo 'Miscellaneous:'
 	@echo '  source                 - download all sources needed for offline-build'
 	@echo '  source-check           - check all packages for valid download URLs'
 	@echo '  external-deps          - list external packages used'
+	@echo '  manual			- build the Buildroot manual'
 	@echo
 	@echo '  make V=0|1             - 0 => quiet build (default), 1 => verbose build'
 	@echo '  make O=dir             - Locate all output files in "dir", including .config'
@@ -676,7 +684,7 @@ endif
 	@$(foreach b, $(sort $(notdir $(wildcard $(TOPDIR)/configs/*_defconfig))), \
 	  printf "  %-35s - Build for %s\\n" $(b) $(b:_defconfig=);)
 	@echo
-	@echo 'See docs/README and docs/buildroot.html for further details'
+	@echo 'See docs/README and the Buildroot manual for further details'
 	@echo
 
 release: OUT=buildroot-$(BR2_VERSION)
@@ -684,5 +692,41 @@ release: OUT=buildroot-$(BR2_VERSION)
 release:
 	git archive --format=tar --prefix=$(OUT)/ master|gzip -9 >$(OUT).tar.gz
 
+MANUAL_SOURCES = $(wildcard docs/manual/*.txt)
+
+manual: manual-html manual-split-html manual-pdf manual-txt manual-epub
+
+manual-html: $(MANUAL_SOURCES)
+	@echo "HTML manual..."
+	$(Q)mkdir -p $(O)/docs/manual
+	$(Q)cp -f docs/images/logo.png $(O)/docs/manual/
+	$(Q)asciidoc -b xhtml11 -d book -o $(O)/docs/manual/manual.html \
+		docs/manual/manual.txt
+
+manual-split-html: $(MANUAL_SOURCES)
+	@echo "Split HTML manual..."
+	$(Q)mkdir -p $(O)/docs/manual
+	$(Q)a2x -f chunked -d book -L docs/manual/manual.txt -r docs/images \
+		-D $(O)/docs/manual/
+
+manual-pdf: $(MANUAL_SOURCES)
+	@echo "PDF manual..."
+	$(Q)mkdir -p $(O)/docs/manual
+	$(Q)a2x --dblatex-opts "-P latex.output.revhistory=0" -f pdf -d book -L docs/manual/manual.txt \
+		-D $(O)/docs/manual/
+
+manual-txt: $(MANUAL_SOURCES)
+	@echo "Text manual..."
+	$(Q)mkdir -p $(O)/docs/manual
+	$(Q)a2x -f text -d book -L docs/manual/manual.txt \
+		-D $(O)/docs/manual
+
+manual-epub: $(MANUAL_SOURCES)
+	@echo "EPUB manual..."
+	$(Q)mkdir -p $(O)/docs/manual
+	$(Q)a2x -f epub -d book -L docs/manual/manual.txt \
+		-r docs/images/	\
+		-D $(O)/docs/manual
+
 .PHONY: $(noconfig_targets)
 
-- 
1.7.4.1

  parent reply	other threads:[~2011-09-29 20:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-29 20:05 [Buildroot] [pull request] Pull request for branch for-2011.11/asciidoc-manual Thomas Petazzoni
2011-09-29 20:05 ` [Buildroot] [PATCH 1/4] manual: convert existing documentation to the asciidoc format Thomas Petazzoni
2011-09-29 21:57   ` Yann E. MORIN
2011-10-03 16:49   ` Luca Ceresoli
2011-09-29 20:05 ` Thomas Petazzoni [this message]
2011-09-29 21:53   ` [Buildroot] [PATCH 2/4] manual: provide make targets to build the documentation Yann E. MORIN
2011-10-03 16:53   ` Luca Ceresoli
2011-09-29 20:06 ` [Buildroot] [PATCH 3/4] remove the old buildroot.html documentation Thomas Petazzoni
2011-09-29 21:59   ` Yann E. MORIN
2011-09-29 20:06 ` [Buildroot] [PATCH 4/4] remove Glibc_vs_uClibc document Thomas Petazzoni
2011-09-29 21:59   ` Yann E. MORIN
2011-10-03 16:54   ` Luca Ceresoli
2011-09-30  6:36 ` [Buildroot] [pull request] Pull request for branch for-2011.11/asciidoc-manual Peter Korsgaard
2011-09-30  6:38   ` Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2011-10-10  8:46 [Buildroot] [pull request v4] " Thomas Petazzoni
2011-10-10  8:46 ` [Buildroot] [PATCH 2/4] manual: provide make targets to build the documentation Thomas Petazzoni
2011-10-10  8:57   ` Yann E. MORIN
2011-10-10  9:03   ` Thomas De Schampheleire
2011-10-11 20:57   ` Arnout Vandecappelle
2011-10-25 10:14   ` Peter Korsgaard
2011-08-31 21:54 [Buildroot] [pull request v2] Pull request for branch for-2011.11/asciidoc-manual Thomas Petazzoni
2011-08-31 21:54 ` [Buildroot] [PATCH 2/4] manual: provide make targets to build the documentation Thomas Petazzoni
2011-09-05  7:19   ` Arnout Vandecappelle
2011-09-05 15:19     ` 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=41d440a0142e3bb0e20ad8524aeca52fe94e8404.1317326629.git.thomas.petazzoni@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --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.