| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
The "guide" document element is ambiguous with the previously used
GuideXML format. Now that DevBook XML has a schema, this confuses
Emacs nXML mode (which uses the document element to locate a schema),
e.g. when visiting old GuideXML documentation files.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop .SECONDEXPANSION and use a static pattern rule instead.
The problem addressed by secondary expansion was that % in a "normal"
pattern rule doesn't match the empty string, therefore %index.html
won't match the top-level index.html target. By contract, % in a
static pattern rule matches any part of the target name.
Using a pattern rule like "ind%x.html: t%xt.xml ..." would also be
possible but seems a little hackish.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This had been added in commit aa6e1e365fff48b6e1e5470791f499a0589d39c3,
so that app-doc/devmanual[offline] could call "emake build" without
building documents.js. This is no longer needed; the offline condition
can be tested by the Makefile itself.
Drop validate as prerequisite of all because it required libxml2 as
additional build dependency.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
| |
Convert to absolute paths in XSLT, so postprocessing with sed is
no longer needed.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Use nested ordered lists instead of one description list. Hopefully,
this will make the logic better understandable.
Add a diagram with a flowchart. Also commit the SVG output, so we
don't need Graphviz as build dependency for a single file that isn't
expected to change very often.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The currently used DTD format has several limitations. It does not
support data types, and it is not expressive enough for some element
syntax used in the devmanual. For example, it cannot accurately
describe the uri element which comes in two alternative forms
(namely, with the link in its body text or as an attribute).
RELAX NG is chosen because it has a variant with a compact and very
readable non-XML syntax, and it is well supported both as an input and
as an output format by conversion tools like app-text/trang. Also, we
need RNC for app-emacs/nxml-gentoo-schemas anyway.
devbook.rnc is the source file, but the generated devbook.rng is also
committed to the repository, in order to avoid an additional
dependency on trang or rnc2rng.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
| |
Problem seen with tidy from app-text/htmltidy-5.8.0-r1.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
| |
tidy-html5 complains about empty URI references in href which are
perfectly valid HTML: https://tools.ietf.org/html/std66#section-4.4
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
| |
For the time being, this is only intended as a fallback. It doesn't
have any prerequisites on purpose, so it will be a no-op if the target
file exists.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/765826
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each HTML file must depend on its XML file with all its descendants
(for the contents tree), all its ancestors (for breadcrumbs), and the
previous and next documents (for backward and forward links).
Trying to generate the list of dependencies with make seems hopeless
(especially, how would one determine the previous and next documents?).
OTOH, the necessary templates already exist in devbook.xsl. Therefore,
add a simple depend.xsl on top of it, which outputs a dependency list
as plain text.
Closes: https://bugs.gentoo.org/710918
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
| |
Now that infra installs into a separate target directory, we no longer
need atomicity during the build. Remove the delete-old rule as well,
which was intended for the same purpose.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
| |
Fixes: 3c2491a9e3018d1fc98feaf5d3b91c4ad2e7013a
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
By popular demand.
Also drop "prereq" as prerequisite of "validate", because it is
already listed with "all".
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will delete any orphaned html and image files that could be
left over after the corresponding source file was moved or removed.
Such files are also not covered by "clean", so add the new target as
prerequisite.
Run a single "find" pass to get a list of all files in ALL_FILES and
subsequently extract the necessary subsets from it. The list of all
files is needed anyway for deletion of orphans, which are not included
in HTMLS or IMAGES.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Pass an "offline" flag to devbook.xsl, which disables loading of
external assets and loads a simple CSS instead. This will replace
the fragile patching in the app-doc/devmanual ebuild.
offline.css was originally contributed (as fallback.css)
by Lucas Ramage in bug 617724.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
| |
This is for the app-doc/devmanual[fallback] offline package, where we
don't have lunr.js and don't want to build documents.js.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our Makefile currently uses inkscape (via imagemagick's "convert"
wrapper) to turn SVGs into PNGs. This has a few downsides:
* media-gfx/inkscape is a huge dependency,
* inkscape is slow to perform the conversion,
* installing imagemagick[svg] doesn't ensure that "convert" can
convert an SVG to a PNG if inkscape is missing (bug 684686).
The good news is that there is another SVG -> PNG conversion tool
called rsvg-convert that is installed by gnome-base/librsvg. Compared
to inkscape, librsvg is a light dependency and rsvg-convert is
lightning-fast. Moreover, installing gnome-base/librsvg guarantees
that the latter will exist and can actually perform the conversion.
Inkscape is supposedly more powerful, but so far in the devmanual
we're only using SVG to put words in boxes. The simpler tool is
sufficient for that, and therefore preferable.
This commit updates the Makefile to use rsvg-convert.
Bug: https://bugs.gentoo.org/684686
Closes: https://bugs.gentoo.org/700904
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fc-list command from media-libs/fontconfig can tell us what fonts
are available to rsvg-convert, so this commit asks it if any font
matching the pattern "Open Sans" is installed. You could make this
check a bit more bullet-proof by checking the exact string (to avoid
matching e.g. Not Open Sans), but only at the expense of making a
simple command more complicated.
Bug: https://bugs.gentoo.org/700904
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
| |
Explicitly initialise status, in order to be independent of the
environment.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This new PHONY "make tidy" target runs the tidy-html5 program, using a
new .tidyrc file, to ensure that the HTML we have generated is free
from certain problems. In particular, it should complain if bug 626032
ever resurfaces and there are duplicate identifiers in some document.
Closes: https://bugs.gentoo.org/626032
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
[Command line options instead of .tidyrc file. Don't fail on first error.]
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
| |
Closes: https://github.com/gentoo/devmanual/pull/120
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Executables go to bin/
Also, the name is misleading. The script does not build the search
index, it builds the documents for the search engine to create the
index.
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
|
|
|
|
|
|
|
|
| |
In case search_index.py fails, it will truncate documents.js. Create
documents in a separate file and atomically move it upon completion.
Suggested-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Updates to any text.xml should trigger a rebuild of documents.js. The
Makefile is updated to reflect that. And the updated search_index.py
that takes a list of files as arguments.
(This commit message is written by the committer, not the author.)
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
|
|
|
|
|
|
| |
Required to build the Lunr search index
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Alice Ferrazzi <alicef@gentoo.org>
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
|
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/674378
Signed-off-by: Lucas Ramage <ramage.lucas@protonmail.com>
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Make XMLS list available separately from HTMLS. Same for SVGS and
IMAGES, for consistency.
Require xmllint as prerequisite. (This doesn't add any new dependencies,
because dev-libs/libxml2 is already pulled in by libxslt.)
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our Makefile is GNU-specific, thanks to heavy use of call/eval to
automatically generate rules. In this commit, those generated rules
have been replaced by slightly less (in terms of code volume)
GNU-specific magic. The new magic uses a secondary expansion rule that
allows us to access the target name inside its own prerequisites. The
single resulting SECONDEXPANSION rule seems to be able to replace all
of the generated rules.
The variables and "clean" targets were also simplified using the full
power of the GNU extensions, which we are assuming anyway. Finally,
two other minor improvements were made:
1. The "clean" target was moved to the end of the file.
2. The "prereq" rule was split into two separate commands, and
wrapped to a reasonable line length.
Closes: https://bugs.gentoo.org/684688
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
|
|
|
|
|
|
|
| |
These are no longer used since the change to the new layout in 2014,
commit 6115f4707e2c7b07d418ae2dd3e2673f326c25e5.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Makefile uses two "type -p" commands to determine if the "convert"
and "xsltproc" commands are present. The "type" command itself is
defined in POSIX,
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/type.html
but the additional "-p" flag is BASH-specific. This can lead to
unexpected behavior when the /bin/sh symlink that the Makefile uses by
default points to a non-BASH shell:
$ dash
$ type -p convert
-p: not found
convert is /usr/bin/convert
By chance, this is ultimately not fatal, but does cause the default
target to output some confusing messages. And in fact the output from
the "type -p" command is never used, which means that "type" itself
should suffice, in any shell. Thus this commit drops the two "-p"
arguments to "type".
The same two "type" commands attempt to redirect both stdout and
stderr to /dev/null using the BASH "&>" shortcut. This commit replaces
it with the standard, but more verbose incantation ">/dev/null 2>&1"
that is portable to other shells.
Closes: https://bugs.gentoo.org/680932
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Signed-off-by: Brian Evans <grknight@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the Makefile assumes that each document can be
independently transformed and thus exposes a flat dependency
hierarchy. This is incorrect because of the way table of contents
(TOC) is generated. When a page is added or removed, its immediate
parent and all of the parent's parents, all the way up to the root
node, need to be recompiled in a bottom-up fashion to regenerate the
TOC in each page.
Use black magic to automatically generate build rules with proper
prerequisites during runtime. The idea is to mirror the hierarchy in the
document: every section has a dependency to its subsections. The rules
are generated by iterating through each directory in the entire file
system tree.
Signed-off-by: Göktürk Yüksek <gokturk@binghamton.edu>
|
| |
|
| |
|