* [Buildroot] [PATCH 0 of 5 v3 for 2014.08] manual-text generation improvements
@ 2014-08-13 19:25 Thomas De Schampheleire
2014-08-13 19:25 ` [Buildroot] [PATCH 1 of 5 v3 for 2014.08] Makefile: unconditionally include pkg-utils.mk Thomas De Schampheleire
` (4 more replies)
0 siblings, 5 replies; 14+ messages in thread
From: Thomas De Schampheleire @ 2014-08-13 19:25 UTC (permalink / raw)
To: buildroot
This patch series makes some improvements to the generation of the text
version of the manual:
- make sure that URLs are visible
- remove the 'logo' (logo.png) reference
To achieve this, three preparatory patches are needed.
Note that this series stands on its own, it can already be applied.
A subsequent series will make structural and content-wise changes to the
manual itself.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
v3: fix 'make manual' without .config (extra patch)
v2: refine patch 4 (changing URLs)
Thomas De Schampheleire (5)
Makefile: unconditionally include pkg-utils.mk
gendoc infra: use $(pkgname) instead of explicitly passing 'manual'
gendoc infra: add support for asciidoc configuration files
manual-text: make sure URLs are displayed if a link text was provided
manual-text: hide image representations
Makefile | 2 ++
docs/manual/asciidoc-text.conf | 23 +++++++++++++++++++++++
docs/manual/manual.mk | 26 ++++++++++++++++----------
package/Makefile.in | 1 -
4 files changed, 41 insertions(+), 11 deletions(-)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 1 of 5 v3 for 2014.08] Makefile: unconditionally include pkg-utils.mk
2014-08-13 19:25 [Buildroot] [PATCH 0 of 5 v3 for 2014.08] manual-text generation improvements Thomas De Schampheleire
@ 2014-08-13 19:25 ` Thomas De Schampheleire
2014-08-15 10:14 ` Samuel Martin
2014-08-13 19:25 ` [Buildroot] [PATCH 2 of 5 v3 for 2014.08] gendoc infra: use $(pkgname) instead of explicitly passing 'manual' Thomas De Schampheleire
` (3 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Thomas De Schampheleire @ 2014-08-13 19:25 UTC (permalink / raw)
To: buildroot
Currently, pkg-utils.mk (included via package/Makefile.in) is only included
when a configuration file already exists. This means that none of the
utilities it defines are available without .config.
In particular:
- the MESSAGE macro, causing pretty build output. Since some make targets
can be run even without .config, like 'make manual', not having this
pretty printing is odd.
- pkgname, pkgdir: in a subsequent patch, these functions will be used for
the generation of the manual, and since this should work also without
.config, we need these functions to be available.
This patch moves the include of pkg-utils.mk from package/Makefile.in to
Makefile, outside of the check for .config.
This is a quick fix. The full solution involves to minimize the amount of
Makefile code that is guarded by a check on .config. This approach will be
taken in the 2014.11 release cycle.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
v3: new patch, fixing the issue detected by Yann that 'make manual' no
longer worked without .config
Makefile | 2 ++
package/Makefile.in | 1 -
2 files changed, 2 insertions(+), 1 deletions(-)
diff -r 3bcf63a46bc1 -r 9000c07087a5 Makefile
--- a/Makefile Tue Aug 05 18:25:11 2014 -0300
+++ b/Makefile Wed Aug 13 11:30:25 2014 +0200
@@ -271,6 +271,8 @@
# Causes breakage with packages that needs host-ruby
unexport RUBYOPT
+include package/pkg-utils.mk
+
ifeq ($(BR2_HAVE_DOT_CONFIG),y)
################################################################################
diff -r 3bcf63a46bc1 -r 9000c07087a5 package/Makefile.in
--- a/package/Makefile.in Tue Aug 05 18:25:11 2014 -0300
+++ b/package/Makefile.in Wed Aug 13 11:30:25 2014 +0200
@@ -385,7 +385,6 @@
SHARED_STATIC_LIBS_OPTS = --enable-static --enable-shared
endif
-include package/pkg-utils.mk
include package/pkg-download.mk
include package/pkg-autotools.mk
include package/pkg-cmake.mk
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 2 of 5 v3 for 2014.08] gendoc infra: use $(pkgname) instead of explicitly passing 'manual'
2014-08-13 19:25 [Buildroot] [PATCH 0 of 5 v3 for 2014.08] manual-text generation improvements Thomas De Schampheleire
2014-08-13 19:25 ` [Buildroot] [PATCH 1 of 5 v3 for 2014.08] Makefile: unconditionally include pkg-utils.mk Thomas De Schampheleire
@ 2014-08-13 19:25 ` Thomas De Schampheleire
2014-08-15 10:14 ` Samuel Martin
` (3 more replies)
2014-08-13 19:25 ` [Buildroot] [PATCH 3 of 5 v3 for 2014.08] gendoc infra: add support for asciidoc configuration files Thomas De Schampheleire
` (2 subsequent siblings)
4 siblings, 4 replies; 14+ messages in thread
From: Thomas De Schampheleire @ 2014-08-13 19:25 UTC (permalink / raw)
To: buildroot
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>
---
v3: no changes
v2: no changes
docs/manual/manual.mk | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff -r 9000c07087a5 -r f7050051dd5a 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)
+$(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: $(1)-clean
-$(1)-clean:
- $$(Q)$$(RM) -rf $$(O)/docs/$(1)
-.PHONY: $(1) $(1)-clean manual-update-lists
+$(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))
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 3 of 5 v3 for 2014.08] gendoc infra: add support for asciidoc configuration files
2014-08-13 19:25 [Buildroot] [PATCH 0 of 5 v3 for 2014.08] manual-text generation improvements Thomas De Schampheleire
2014-08-13 19:25 ` [Buildroot] [PATCH 1 of 5 v3 for 2014.08] Makefile: unconditionally include pkg-utils.mk Thomas De Schampheleire
2014-08-13 19:25 ` [Buildroot] [PATCH 2 of 5 v3 for 2014.08] gendoc infra: use $(pkgname) instead of explicitly passing 'manual' Thomas De Schampheleire
@ 2014-08-13 19:25 ` Thomas De Schampheleire
2014-08-15 10:14 ` Samuel Martin
2014-08-13 19:25 ` [Buildroot] [PATCH 4 of 5 v3 for 2014.08] manual-text: make sure URLs are displayed if a link text was provided Thomas De Schampheleire
2014-08-13 19:25 ` [Buildroot] [PATCH 5 of 5 v3 for 2014.08] manual-text: hide image representations Thomas De Schampheleire
4 siblings, 1 reply; 14+ messages in thread
From: Thomas De Schampheleire @ 2014-08-13 19:25 UTC (permalink / raw)
To: buildroot
This patch introduces support for asciidoc configuration files, specific for
each output format (html, text, pdf, ...). This is useful to make certain
tweaks in the document generation.
If a file docs/manual/asciidoc-<format>.conf is present, it is passed to
asciidoc as configuration file. If no file for the current format is
present, the options passed to asciidoc are empty.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
v3: no changes
v2: no changes
docs/manual/manual.mk | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff -r f7050051dd5a -r 7437dd86ef45 docs/manual/manual.mk
--- a/docs/manual/manual.mk Sat Aug 09 18:18:58 2014 +0200
+++ b/docs/manual/manual.mk Sat Aug 09 12:20:16 2014 +0200
@@ -56,6 +56,11 @@
manual-check-dependencies-$(3):
+MANUAL_$(2)_ASCIIDOC_CONF = docs/$(1)/asciidoc-$(2).conf
+ifneq ($$(wildcard $$(MANUAL_$(2)_ASCIIDOC_CONF)),)
+MANUAL_$(2)_ASCIIDOC_OPTS += -f $$(MANUAL_$(2)_ASCIIDOC_CONF)
+endif
+
$$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt \
$$($$(call UPPERCASE,$(1))_SOURCES) \
manual-check-dependencies \
@@ -65,7 +70,8 @@
$$(Q)mkdir -p $$(@D)/.build
$$(Q)rsync -au docs/$(1)/*.txt $$(@D)/.build
$$(Q)a2x $(6) -f $(2) -d book -L -r $$(TOPDIR)/docs/images \
- -D $$(@D) $$(@D)/.build/$(1).txt
+ -D $$(@D) $$(@D)/.build/$(1).txt \
+ --asciidoc-opts="$$(MANUAL_$(2)_ASCIIDOC_OPTS)"
-$$(Q)rm -rf $$(@D)/.build
endef
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 4 of 5 v3 for 2014.08] manual-text: make sure URLs are displayed if a link text was provided
2014-08-13 19:25 [Buildroot] [PATCH 0 of 5 v3 for 2014.08] manual-text generation improvements Thomas De Schampheleire
` (2 preceding siblings ...)
2014-08-13 19:25 ` [Buildroot] [PATCH 3 of 5 v3 for 2014.08] gendoc infra: add support for asciidoc configuration files Thomas De Schampheleire
@ 2014-08-13 19:25 ` Thomas De Schampheleire
2014-08-15 10:14 ` Samuel Martin
2014-08-13 19:25 ` [Buildroot] [PATCH 5 of 5 v3 for 2014.08] manual-text: hide image representations Thomas De Schampheleire
4 siblings, 1 reply; 14+ messages in thread
From: Thomas De Schampheleire @ 2014-08-13 19:25 UTC (permalink / raw)
To: buildroot
When the asciidoc source contain URLs of the form:
http://example.com[An example website]
the text representation of the manual would only contain:
An example website
without displaying the actual URL.
This patch adds an asciidoc configuration file that sets the inline macros
for several URL types so that the display becomes:
An example website [http://example.com]
For URLs where no link text was provided, the display becomes:
http://example.com
which is the same as before.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
v3: no changes
v2:
- link to relevant documentation (which was hard to find)
- refine so that the display is identical to before when no link text is
provided.
docs/manual/asciidoc-text.conf | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff -r 7437dd86ef45 -r 72d825eab688 docs/manual/asciidoc-text.conf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/manual/asciidoc-text.conf Sat Aug 09 19:42:30 2014 +0200
@@ -0,0 +1,17 @@
+# Refer to following asciidoc documentation:
+# http://www.methods.co.nz/asciidoc/userguide.html
+# In particular sections "Macros" and "Attribute References"
+#
+# For hyperlinks, show 'link text [URL]' (if link text provided) or 'URL'
+[http-inlinemacro]
+{0=}{0? [}{name}:{target}{0?]}
+[https-inlinemacro]
+{0=}{0? [}{name}:{target}{0?]}
+[ftp-inlinemacro]
+{0=}{0? [}{name}:{target}{0?]}
+[file-inlinemacro]
+{0=}{0? [}{name}:{target}{0?]}
+[irc-inlinemacro]
+{0=}{0? [}{name}:{target}{0?]}
+[mailto-inlinemacro]
+{0=}{0? [}{name}:{target}{0?]}
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 5 of 5 v3 for 2014.08] manual-text: hide image representations
2014-08-13 19:25 [Buildroot] [PATCH 0 of 5 v3 for 2014.08] manual-text generation improvements Thomas De Schampheleire
` (3 preceding siblings ...)
2014-08-13 19:25 ` [Buildroot] [PATCH 4 of 5 v3 for 2014.08] manual-text: make sure URLs are displayed if a link text was provided Thomas De Schampheleire
@ 2014-08-13 19:25 ` Thomas De Schampheleire
2014-08-15 10:15 ` Samuel Martin
4 siblings, 1 reply; 14+ messages in thread
From: Thomas De Schampheleire @ 2014-08-13 19:25 UTC (permalink / raw)
To: buildroot
Images specified in the asciidoc sources (currently only the logo) are
displayed as the file name in the text version of the manual. This causes an
odd line to appear:
logo.png
Avoid this by setting the image representation macros to {empty} in
manual-text.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
v3: no changes
v2: no changes
docs/manual/asciidoc-text.conf | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff -r 72d825eab688 -r f719ffa3eed5 docs/manual/asciidoc-text.conf
--- a/docs/manual/asciidoc-text.conf Sat Aug 09 19:42:30 2014 +0200
+++ b/docs/manual/asciidoc-text.conf Sun Aug 10 17:55:54 2014 +0200
@@ -15,3 +15,9 @@
{0=}{0? [}{name}:{target}{0?]}
[mailto-inlinemacro]
{0=}{0? [}{name}:{target}{0?]}
+
+# Hide image representation from text manual
+[image-inlinemacro]
+{empty}
+[image-blockmacro]
+{empty}
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 1 of 5 v3 for 2014.08] Makefile: unconditionally include pkg-utils.mk
2014-08-13 19:25 ` [Buildroot] [PATCH 1 of 5 v3 for 2014.08] Makefile: unconditionally include pkg-utils.mk Thomas De Schampheleire
@ 2014-08-15 10:14 ` Samuel Martin
0 siblings, 0 replies; 14+ messages in thread
From: Samuel Martin @ 2014-08-15 10:14 UTC (permalink / raw)
To: buildroot
On Wed, Aug 13, 2014 at 9:25 PM, Thomas De Schampheleire
<patrickdepinguin@gmail.com> wrote:
> Currently, pkg-utils.mk (included via package/Makefile.in) is only included
> when a configuration file already exists. This means that none of the
> utilities it defines are available without .config.
>
> In particular:
> - the MESSAGE macro, causing pretty build output. Since some make targets
> can be run even without .config, like 'make manual', not having this
> pretty printing is odd.
>
> - pkgname, pkgdir: in a subsequent patch, these functions will be used for
> the generation of the manual, and since this should work also without
> .config, we need these functions to be available.
>
> This patch moves the include of pkg-utils.mk from package/Makefile.in to
> Makefile, outside of the check for .config.
>
> This is a quick fix. The full solution involves to minimize the amount of
> Makefile code that is guarded by a check on .config. This approach will be
> taken in the 2014.11 release cycle.
>
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Regards,
--
Samuel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 2 of 5 v3 for 2014.08] gendoc infra: use $(pkgname) instead of explicitly passing 'manual'
2014-08-13 19:25 ` [Buildroot] [PATCH 2 of 5 v3 for 2014.08] gendoc infra: use $(pkgname) instead of explicitly passing 'manual' Thomas De Schampheleire
@ 2014-08-15 10:14 ` Samuel Martin
2014-08-15 11:04 ` Samuel Martin
` (2 subsequent siblings)
3 siblings, 0 replies; 14+ messages in thread
From: Samuel Martin @ 2014-08-15 10:14 UTC (permalink / raw)
To: buildroot
On Wed, Aug 13, 2014 at 9:25 PM, Thomas De Schampheleire
<patrickdepinguin@gmail.com> wrote:
> 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>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Regards,
--
Samuel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 3 of 5 v3 for 2014.08] gendoc infra: add support for asciidoc configuration files
2014-08-13 19:25 ` [Buildroot] [PATCH 3 of 5 v3 for 2014.08] gendoc infra: add support for asciidoc configuration files Thomas De Schampheleire
@ 2014-08-15 10:14 ` Samuel Martin
0 siblings, 0 replies; 14+ messages in thread
From: Samuel Martin @ 2014-08-15 10:14 UTC (permalink / raw)
To: buildroot
On Wed, Aug 13, 2014 at 9:25 PM, Thomas De Schampheleire
<patrickdepinguin@gmail.com> wrote:
> This patch introduces support for asciidoc configuration files, specific for
> each output format (html, text, pdf, ...). This is useful to make certain
> tweaks in the document generation.
>
> If a file docs/manual/asciidoc-<format>.conf is present, it is passed to
> asciidoc as configuration file. If no file for the current format is
> present, the options passed to asciidoc are empty.
>
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Samuel Martin <s.martin49@gmail.com>
Regards,
--
Samuel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 4 of 5 v3 for 2014.08] manual-text: make sure URLs are displayed if a link text was provided
2014-08-13 19:25 ` [Buildroot] [PATCH 4 of 5 v3 for 2014.08] manual-text: make sure URLs are displayed if a link text was provided Thomas De Schampheleire
@ 2014-08-15 10:14 ` Samuel Martin
0 siblings, 0 replies; 14+ messages in thread
From: Samuel Martin @ 2014-08-15 10:14 UTC (permalink / raw)
To: buildroot
On Wed, Aug 13, 2014 at 9:25 PM, Thomas De Schampheleire
<patrickdepinguin@gmail.com> wrote:
> When the asciidoc source contain URLs of the form:
> http://example.com[An example website]
> the text representation of the manual would only contain:
> An example website
> without displaying the actual URL.
>
> This patch adds an asciidoc configuration file that sets the inline macros
> for several URL types so that the display becomes:
> An example website [http://example.com]
> For URLs where no link text was provided, the display becomes:
> http://example.com
> which is the same as before.
>
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Samuel Martin <s.martin49@gmail.com>
Regards,
--
Samuel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 5 of 5 v3 for 2014.08] manual-text: hide image representations
2014-08-13 19:25 ` [Buildroot] [PATCH 5 of 5 v3 for 2014.08] manual-text: hide image representations Thomas De Schampheleire
@ 2014-08-15 10:15 ` Samuel Martin
0 siblings, 0 replies; 14+ messages in thread
From: Samuel Martin @ 2014-08-15 10:15 UTC (permalink / raw)
To: buildroot
On Wed, Aug 13, 2014 at 9:25 PM, Thomas De Schampheleire
<patrickdepinguin@gmail.com> wrote:
> Images specified in the asciidoc sources (currently only the logo) are
> displayed as the file name in the text version of the manual. This causes an
> odd line to appear:
> logo.png
>
> Avoid this by setting the image representation macros to {empty} in
> manual-text.
>
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Samuel Martin <s.martin49@gmail.com>
Regards,
--
Samuel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 2 of 5 v3 for 2014.08] gendoc infra: use $(pkgname) instead of explicitly passing 'manual'
2014-08-13 19:25 ` [Buildroot] [PATCH 2 of 5 v3 for 2014.08] gendoc infra: use $(pkgname) instead of explicitly passing 'manual' Thomas De Schampheleire
2014-08-15 10:14 ` Samuel Martin
@ 2014-08-15 11:04 ` Samuel Martin
2014-08-15 11:07 ` Samuel Martin
2014-09-07 12:45 ` Yann E. MORIN
3 siblings, 0 replies; 14+ messages in thread
From: Samuel Martin @ 2014-08-15 11:04 UTC (permalink / raw)
To: buildroot
Hi Thomas,
Actually, it's a nack :-/
As is, this patch breaks the clean target, but nothing scary of course ;-)
On Wed, Aug 13, 2014 at 9:25 PM, Thomas De Schampheleire
<patrickdepinguin@gmail.com> wrote:
> 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>
>
> ---
> v3: no changes
> v2: no changes
>
> docs/manual/manual.mk | 18 +++++++++---------
> 1 files changed, 9 insertions(+), 9 deletions(-)
>
> diff -r 9000c07087a5 -r f7050051dd5a 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)
> +$(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: $(1)-clean
Just here ^^^ , you missed a substitution.
With this fix, it's works fine.
> -$(1)-clean:
> - $$(Q)$$(RM) -rf $$(O)/docs/$(1)
> -.PHONY: $(1) $(1)-clean manual-update-lists
> +$(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))
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Regards,
--
Samuel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 2 of 5 v3 for 2014.08] gendoc infra: use $(pkgname) instead of explicitly passing 'manual'
2014-08-13 19:25 ` [Buildroot] [PATCH 2 of 5 v3 for 2014.08] gendoc infra: use $(pkgname) instead of explicitly passing 'manual' Thomas De Schampheleire
2014-08-15 10:14 ` Samuel Martin
2014-08-15 11:04 ` Samuel Martin
@ 2014-08-15 11:07 ` Samuel Martin
2014-09-07 12:45 ` Yann E. MORIN
3 siblings, 0 replies; 14+ messages in thread
From: Samuel Martin @ 2014-08-15 11:07 UTC (permalink / raw)
To: buildroot
Hi Thomas,
Actually, it's a nack :-/
As is, this patch breaks the clean target, but nothing scary of course ;-)
On Wed, Aug 13, 2014 at 9:25 PM, Thomas De Schampheleire
<patrickdepinguin@gmail.com> wrote:
> 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>
>
> ---
> v3: no changes
> v2: no changes
>
> docs/manual/manual.mk | 18 +++++++++---------
> 1 files changed, 9 insertions(+), 9 deletions(-)
>
> diff -r 9000c07087a5 -r f7050051dd5a 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)
> +$(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: $(1)-clean
Just here ^^^ , you missed a substitution.
With this fix, it's works fine.
> -$(1)-clean:
> - $$(Q)$$(RM) -rf $$(O)/docs/$(1)
> -.PHONY: $(1) $(1)-clean manual-update-lists
> +$(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))
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Regards,
--
Samuel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 2 of 5 v3 for 2014.08] gendoc infra: use $(pkgname) instead of explicitly passing 'manual'
2014-08-13 19:25 ` [Buildroot] [PATCH 2 of 5 v3 for 2014.08] gendoc infra: use $(pkgname) instead of explicitly passing 'manual' Thomas De Schampheleire
` (2 preceding siblings ...)
2014-08-15 11:07 ` Samuel Martin
@ 2014-09-07 12:45 ` Yann E. MORIN
3 siblings, 0 replies; 14+ messages in thread
From: Yann E. MORIN @ 2014-09-07 12:45 UTC (permalink / raw)
To: buildroot
Thomas, All,
On 2014-08-13 21:25 +0200, Thomas De Schampheleire spake thusly:
> 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.
I would be very much interested to use this GENDOC infrastructure from
br2-external too, to generate another manual.
I'll poke at that when time permits (soon, probably.)
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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2014-09-07 12:45 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-13 19:25 [Buildroot] [PATCH 0 of 5 v3 for 2014.08] manual-text generation improvements Thomas De Schampheleire
2014-08-13 19:25 ` [Buildroot] [PATCH 1 of 5 v3 for 2014.08] Makefile: unconditionally include pkg-utils.mk Thomas De Schampheleire
2014-08-15 10:14 ` Samuel Martin
2014-08-13 19:25 ` [Buildroot] [PATCH 2 of 5 v3 for 2014.08] gendoc infra: use $(pkgname) instead of explicitly passing 'manual' Thomas De Schampheleire
2014-08-15 10:14 ` Samuel Martin
2014-08-15 11:04 ` Samuel Martin
2014-08-15 11:07 ` Samuel Martin
2014-09-07 12:45 ` Yann E. MORIN
2014-08-13 19:25 ` [Buildroot] [PATCH 3 of 5 v3 for 2014.08] gendoc infra: add support for asciidoc configuration files Thomas De Schampheleire
2014-08-15 10:14 ` Samuel Martin
2014-08-13 19:25 ` [Buildroot] [PATCH 4 of 5 v3 for 2014.08] manual-text: make sure URLs are displayed if a link text was provided Thomas De Schampheleire
2014-08-15 10:14 ` Samuel Martin
2014-08-13 19:25 ` [Buildroot] [PATCH 5 of 5 v3 for 2014.08] manual-text: hide image representations Thomas De Schampheleire
2014-08-15 10:15 ` Samuel Martin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox