kumquat-buildroot/docs/manual
Yann E. MORIN 4f59ababc0 package/doc-asciidoc: fix build for out-of-tree documents
The doc-asciidoc infra allows document to define sources and resources,
and those can only be local (there is no download support for documents).
The currently documented way to specify those is to use the $(pkgdir)
macro to point to the document sources and resources when they are along
the .mk.

However, this works only for sources and not for resources.

Indeed, sources are used to generate Makefile dependency rules, so
$(pkgdir) is expanded and evaluated during the call to $(doc-asciidoc),
while resources are expanded and evaluated when the rules are executed,
which always happen after all the parsing has be done, at which point
$(pkgdir) expands to the last Makefile that was parsed, which is always
Buildroot's own manual.

This went unnoticed so far because Buildroot's manual is 1) the last to
be parsed, and 2) not using $(pkgdir) anyway.

Additionally, $(pkgdir) is mostly an internal macro, that is, as this
change demonstrates, difficult to use, and thus should not be used, in
packages or in documents.

We fix that by introducing $(FOO_DOCDIR), similar to $(FOO_PKGDIR),
which points to the document directory. We choose not to name the
variable FOO_PKGDIR, because it semantically is not a package.

As a consequence, the last argument to the doc-asciidoc macro is now
superfluous, so it is removed, which causes a little bit of churn in
the main macro. As a further consequence, the third argument in the
inner macro is no longer needed either, so it too is removed, which
causes a bit more churn yet in the inner macro.

Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Frederic GARDES <frederic.gardes@orange.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-02-13 12:24:02 +01:00
..
adding-board-support.txt manual: board support: add more of our expectations 2020-09-02 23:47:57 +02:00
adding-packages-asciidoc.txt package/doc-asciidoc: fix build for out-of-tree documents 2022-02-13 12:24:02 +01:00
adding-packages-autotools.txt
adding-packages-cargo.txt docs/manual/cargo: document the cargo-package infrastructure 2022-01-08 23:35:40 +01:00
adding-packages-cmake.txt package/pkg-cmake.mk: determine CMAKE_BUILD_TYPE depending on BR2_ENABLE_RUNTIME_DEBUG 2021-06-01 22:39:28 +02:00
adding-packages-conclusion.txt
adding-packages-directory.txt docs/manual: add section on start script recommendations 2022-02-06 16:35:53 +01:00
adding-packages-generic.txt docs/manual/adding-packages-generic: remove useless carriage return 2022-02-11 10:10:18 +01:00
adding-packages-gettext.txt
adding-packages-golang.txt docs/manual/adding-packages-golang.txt: add some details about vendoring 2022-01-08 23:35:40 +01:00
adding-packages-hooks.txt
adding-packages-kconfig.txt package/pkg-kconfig: generate generic help 2021-07-25 15:20:24 +02:00
adding-packages-kernel-module.txt
adding-packages-linux-kernel-spec-infra.txt
adding-packages-luarocks.txt package/pkg-luarocks.mk: add support of host-luarocks-package 2020-04-12 14:48:18 +02:00
adding-packages-meson.txt package/pkg-meson.mk: add FOO_MESON_EXTRA_PROPERTIES 2020-03-22 22:37:34 +01:00
adding-packages-perl.txt
adding-packages-python.txt docs/manual/adding-packages-python.txt: drop <pkg>_NEEDS_HOST_PYTHON 2022-02-13 12:11:50 +01:00
adding-packages-qmake.txt docs/manual: fix typo in name of a qmake-package variable 2021-08-28 22:48:21 +02:00
adding-packages-rebar.txt
adding-packages-tips.txt docs/manual: add documentation for the gitlab macro 2021-03-28 22:44:57 +02:00
adding-packages-virtual.txt package/sunxi-mali-utgard: rename from sunxi-mali-mainline 2022-01-06 19:01:51 +01:00
adding-packages-waf.txt docs/manual: fix typo 2020-08-23 15:12:46 +02:00
adding-packages.txt package/pkg-qmake: new qmake package infrastructure 2020-03-09 22:26:42 +01:00
advanced.txt
appendix.txt
beyond-buildroot.txt
ccache-support.txt
common-usage.txt docs/manual: add some minimal documentation about show-info and pkg-stats 2020-11-11 12:09:41 +01:00
configure-other-components.txt
configure.txt docs/manual: add section on start script recommendations 2022-02-06 16:35:53 +01:00
contribute.txt docs/manual/contribute.txt: rewrite the section dedicated to runtime tests 2021-10-27 21:44:51 +02:00
customize-configuration.txt
customize-device-permission-tables.txt
customize-directory-structure.txt
customize-outside-br.txt docs/manual: add section about br2-external init 2020-10-14 23:04:33 +02:00
customize-packages.txt
customize-patches.txt docs/manual: small typo fixes and cleanup 2020-03-28 19:45:28 +01:00
customize-post-image.txt package/Makefile.in: expose CONFIG_DIR to post-build/post-image scripts 2021-05-06 22:58:54 +02:00
customize-quick-guide.txt
customize-rootfs.txt package/Makefile.in: expose CONFIG_DIR to post-build/post-image scripts 2021-05-06 22:58:54 +02:00
customize-users-tables.txt
customize.txt
debugging-buildroot.txt
developers.txt
download-infra.txt
download-location.txt
eclipse-integration.txt
faq-troubleshooting.txt
getting.txt
how-buildroot-works.txt
introduction.txt
known-issues.txt docs/manual: update the list of libffi unsupported archs 2021-11-14 15:02:03 +01:00
legal-notice.txt
make-tips.txt
makedev-syntax.txt
makeusers-syntax.txt support/scripts/mkusers: allow option for system uid/gid 2022-02-05 23:09:31 +01:00
manual.mk
manual.txt docs/manual: add a section about SELinux 2020-09-04 14:47:29 +02:00
migrating.txt docs/manual/migrating.txt: add section with general migrating tips 2021-08-05 22:01:41 +02:00
package-make-target.txt
patch-policy.txt
prerequisite.txt support/download: Add SFTP support 2022-01-06 09:34:05 +01:00
quickstart.txt
rebuilding-packages.txt
release-engineering.txt docs/manual: new chapter on release engineering 2020-05-25 21:59:21 +02:00
resources.txt docs/manual/resources.txt: change pastebin site URL 2021-07-29 23:01:31 +02:00
selinux-support.txt docs/manual: add a section about SELinux 2020-09-04 14:47:29 +02:00
using-buildroot-debugger.txt docs/manual/using-buildroot-debugger: suggest '-ix' iso '-x' when loading gdbinit 2021-09-21 22:43:03 +02:00
using-buildroot-development.txt
using-buildroot-toolchain.txt package/environment-setup: fix spelling of the script file in the manual. 2021-01-07 23:09:47 +01:00
writing-rules.txt docs/manual: drop python2 references 2022-02-09 22:16:28 +01:00