Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas De Schampheleire <patrickdepinguin@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2 of 5 v4 for 2014.08] gendoc infra: use $(pkgname) instead of explicitly passing 'manual'
Date: Fri, 15 Aug 2014 15:40:35 +0200	[thread overview]
Message-ID: <9d9af165df7bfedeefb6.1408110035@localhost> (raw)
In-Reply-To: <patchbomb.1408110033@localhost>

In the gendoc infrastructure, using an assignment of the form
    FOO = docs/$(1)/bar
inside GENDOC_INNER does not work as expected: the $(1) value is empty here
and the value of FOO becomes 'docs//bar'.

Parameters $(2), $(3), etc. do not have this problem. The specific thing
about $(1) is that it is a parameter to GENDOC itself (indicating the
document to create) and passed transparently to GENDOC_INNER.

This is different from the package infrastructures, where $(1) is set from
$(pkgname). In fact, the same strategy could be used by the gendoc
infrastructure as well, as $(pkgname) resolves to 'manual' for file
docs/manual/manual.mk. This has the advantage that the described problem
does not occur.

Note that this means that if we want to use the same GENDOC infrastructure
for another document, it will have to reside in a separate directory than
the manual.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
v4: fix 'make clean' due to missing replacement of $(1) (Samuel)
v3: no changes
v2: no changes

 docs/manual/manual.mk |  20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff -r 232206819ca1 -r 9d9af165df7b docs/manual/manual.mk
--- a/docs/manual/manual.mk	Wed Aug 13 11:30:25 2014 +0200
+++ b/docs/manual/manual.mk	Sat Aug 09 18:18:58 2014 +0200
@@ -78,16 +78,16 @@
 # The variable <DOCUMENT_NAME>_SOURCES defines the dependencies.
 ################################################################################
 define GENDOC
-$(call GENDOC_INNER,$(1),xhtml,html,html,HTML,--xsltproc-opts "--stringparam toc.section.depth 2")
-$(call GENDOC_INNER,$(1),chunked,split-html,chunked,split HTML,--xsltproc-opts "--stringparam toc.section.depth 2")
-$(call GENDOC_INNER,$(1),pdf,pdf,pdf,PDF,--dblatex-opts "-P latex.output.revhistory=0")
-$(call GENDOC_INNER,$(1),text,text,text,text)
-$(call GENDOC_INNER,$(1),epub,epub,epub,ePUB)
-clean: $(1)-clean
-$(1)-clean:
-	$$(Q)$$(RM) -rf $$(O)/docs/$(1)
-.PHONY: $(1) $(1)-clean manual-update-lists
+$(call GENDOC_INNER,$(pkgname),xhtml,html,html,HTML,--xsltproc-opts "--stringparam toc.section.depth 2")
+$(call GENDOC_INNER,$(pkgname),chunked,split-html,chunked,split HTML,--xsltproc-opts "--stringparam toc.section.depth 2")
+$(call GENDOC_INNER,$(pkgname),pdf,pdf,pdf,PDF,--dblatex-opts "-P latex.output.revhistory=0")
+$(call GENDOC_INNER,$(pkgname),text,text,text,text)
+$(call GENDOC_INNER,$(pkgname),epub,epub,epub,ePUB)
+clean: $(pkgname)-clean
+$(pkgname)-clean:
+	$$(Q)$$(RM) -rf $$(O)/docs/$(pkgname)
+.PHONY: $(pkgname) $(pkgname)-clean manual-update-lists
 endef
 
 MANUAL_SOURCES = $(sort $(wildcard docs/manual/*.txt) $(wildcard docs/images/*))
-$(eval $(call GENDOC,manual))
+$(eval $(call GENDOC))

  parent reply	other threads:[~2014-08-15 13:40 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-15 13:40 [Buildroot] [PATCH 0 of 5 v4 for 2014.08] manual-text generation improvements Thomas De Schampheleire
2014-08-15 13:40 ` [Buildroot] [PATCH 1 of 5 v4 for 2014.08] Makefile: unconditionally include pkg-utils.mk Thomas De Schampheleire
2014-08-15 22:04   ` Yann E. MORIN
2014-08-15 13:40 ` Thomas De Schampheleire [this message]
2014-08-15 14:50   ` [Buildroot] [PATCH 2 of 5 v4 for 2014.08] gendoc infra: use $(pkgname) instead of explicitly passing 'manual' Samuel Martin
2014-08-15 22:13   ` Yann E. MORIN
2014-08-15 13:40 ` [Buildroot] [PATCH 3 of 5 v4 for 2014.08] gendoc infra: add support for asciidoc configuration files Thomas De Schampheleire
2014-08-15 22:23   ` Yann E. MORIN
2014-08-15 13:40 ` [Buildroot] [PATCH 4 of 5 v4 for 2014.08] manual-text: make sure URLs are displayed if a link text was provided Thomas De Schampheleire
2014-08-15 22:32   ` Yann E. MORIN
2014-08-15 13:40 ` [Buildroot] [PATCH 5 of 5 v4 for 2014.08] manual-text: hide image representations Thomas De Schampheleire
2014-08-15 22:45   ` Yann E. MORIN
2014-08-15 14:53 ` [Buildroot] [PATCH 0 of 5 v4 for 2014.08] manual-text generation improvements Samuel Martin
2014-08-16  7:35 ` Thomas Petazzoni
2014-08-16 10:15   ` Thomas De Schampheleire
2014-08-16 11:00     ` Samuel Martin
2014-08-16 17:24       ` Samuel Martin
2014-08-16 18:08         ` Thomas Petazzoni
2014-08-16 18:35         ` Thomas De Schampheleire
2014-08-16 19:39           ` Samuel Martin
2014-08-17 10:17             ` Thomas De Schampheleire

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=9d9af165df7bfedeefb6.1408110035@localhost \
    --to=patrickdepinguin@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox