aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Rename the document element from "guide" to "devbook"Ulrich Müller2024-11-091-2/+2
| | | | | | | | | 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>
* Makefile: Secondary expansion is not neededUlrich Müller2024-11-031-8/+3
| | | | | | | | | | | | | | 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>
* Makefile: Remove the separate "build" targetUlrich Müller2024-11-011-8/+9
| | | | | | | | | | | | 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>
* Makefile: Don't warn about missing eclass doc when in ebuild contextUlrich Müller2024-10-311-4/+6
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Makefile: More specific prerequisites for install targetUlrich Müller2024-10-311-1/+1
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Makefile: Add distclean targetUlrich Müller2024-10-271-2/+6
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Makefile: Check if /guide/@self agrees with the document pathUlrich Müller2024-06-111-0/+7
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Makefile: Drop obsolete test for xmllint --quietUlrich Müller2024-01-281-3/+1
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* depend.xsl: Canonicalise output pathsUlrich Müller2023-11-021-1/+1
| | | | | | | Convert to absolute paths in XSLT, so postprocessing with sed is no longer needed. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* general-concepts/copyright-policy: Reformat the General guideline sectionUlrich Müller2023-10-221-0/+3
| | | | | | | | | | | 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>
* Makefile: Dependencies for todo-listUlrich Müller2022-06-241-0/+2
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* devbook.rnc: Change from DTD to RELAX NG compact schemaUlrich Müller2022-01-241-2/+8
| | | | | | | | | | | | | | | | | | | 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>
* Makefile: Simplify recipes for validate and tidy targetsUlrich Müller2022-01-161-3/+3
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Makefile: Suppress warning about missing eclass-reference/text.xmlUlrich Müller2021-10-111-1/+1
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Makefile: Add "check" targetUlrich Müller2021-10-101-1/+3
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* devbook.xsl: td doesn't have a nowrap attribute in HTML 5Ulrich Müller2021-10-101-1/+1
| | | | | | Problem seen with tidy from app-text/htmltidy-5.8.0-r1. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Makefile: Suppress spurious tidy warningsUlrich Müller2021-02-271-1/+2
| | | | | | | 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>
* Makefile: Output a warning if eclass documentation is not foundUlrich Müller2021-02-061-1/+5
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Makefile: Add eclass-reference/text.xml targetUlrich Müller2021-01-251-0/+3
| | | | | | | | 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>
* Makefile: Add dist targetUlrich Müller2021-01-181-1/+8
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Makefile: Call build_search_documents.py with python3 explicitlyUlrich Müller2021-01-171-1/+1
| | | | | Bug: https://bugs.gentoo.org/765826 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Makefile, depend.xsl: Use XSLT to generate the list of dependencies.Ulrich Müller2020-03-011-8/+13
| | | | | | | | | | | | | | | 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>
* Makefile: Quieten the documents.js recipe.Ulrich Müller2020-02-261-1/+1
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Makefile: Remove quirks necessary for installing in-place.Ulrich Müller2020-02-111-11/+3
| | | | | | | | 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>
* Makefile: Add install target.Ulrich Müller2020-02-071-1/+20
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Makefile: Recipe lines must begin with a TAB.Ulrich Müller2020-02-071-1/+1
| | | | | Fixes: 3c2491a9e3018d1fc98feaf5d3b91c4ad2e7013a Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Makefile: Drop "delete-old" from all prerequisites.Ulrich Müller2020-02-071-3/+3
| | | | | | | | | 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>
* Makefile: New target "delete-old".Ulrich Müller2020-02-061-10/+17
| | | | | | | | | | | | | | 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>
* Support offline browsing.Ulrich Müller2020-02-031-1/+4
| | | | | | | | | | | 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>
* Makefile: Add separate "build" target.Ulrich Müller2020-01-271-2/+4
| | | | | | | 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>
* Makefile: use rsvg-convert to generate PNGs from SVGs.Michael Orlitzky2020-01-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Makefile: add prereq check for the Open Sans font.Michael Orlitzky2020-01-271-0/+3
| | | | | | | | | | | | | 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>
* Makefile: Run tidy also on html files generated from eclass manpages.Ulrich Müller2020-01-121-2/+3
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Makefile: Output a message if tidy succeeded.Ulrich Müller2020-01-021-1/+3
| | | | | | | Explicitly initialise status, in order to be independent of the environment. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Makefile: add new app-text/tidy-html5 sanity check.Michael Orlitzky2020-01-021-1/+11
| | | | | | | | | | | | 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>
* Makefile: make build_search_documents.py a prerequisite for documents.jsGöktürk Yüksek2019-12-211-5/+6
| | | | | Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Makefile: add 'documents.js' to 'all'Göktürk Yüksek2019-12-191-1/+1
| | | | | Closes: https://github.com/gentoo/devmanual/pull/120 Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
* rename search_index.py to build_search_documents.py, and move it to bin/Göktürk Yüksek2019-12-191-1/+1
| | | | | | | | | | 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>
* Makefile: do not blindly overwrite documents.jsGöktürk Yüksek2019-12-191-2/+3
| | | | | | | | 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>
* Make text.xml files a dependency for documents.js, update search_index.pyMichael Orlitzky2019-12-191-2/+5
| | | | | | | | | | 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>
* Ensure Python is enabled for dev-libs/libxsltLucas Ramage2019-12-191-1/+1
| | | | | | Required to build the Lunr search index Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
* Fix make all URL relative to root directoryAlice Ferrazzi2019-12-191-2/+1
| | | | | Signed-off-by: Alice Ferrazzi <alicef@gentoo.org> Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
* Implement search functionality via lunr.jsLucas Ramage2019-12-191-1/+5
| | | | | | 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>
* Makefile: Add "validate" rule.Ulrich Müller2019-12-101-6/+13
| | | | | | | | | | 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>
* Makefile: simplify generated rules.Michael Orlitzky2019-11-251-30/+30
| | | | | | | | | | | | | | | | | | | | | | | 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>
* icons: Remove unused icons.Ulrich Müller2019-11-121-1/+1
| | | | | | | 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>
* Makefile: remove BASH-specific "type -p" and "&>" idioms.Michael Orlitzky2019-03-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Makefile: construct the full dependency tree instead of pattern matchingGöktürk Yüksek2016-04-021-8/+25
| | | | | | | | | | | | | | | | | | 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>
* Makefile: Add missing dependency on XSL stylesheet.Ulrich Müller2015-06-011-2/+2
|
* Clarify dependencies for building the manual.Dirkjan Ochtman2013-05-151-1/+1
|