• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/doc-asciidoc.mk
Yann E. MORINYann E. MORIN committed 3c695928f5917 Jul 2016
Raw file
Source viewDiff to previous
 
1
# we can't use suitable-host-package here because that's not available in
2
# the context of 'make release'
3
asciidoc-check-dependencies:
4
    $(Q)if [ -z "$(shell support/dependencies/check-host-asciidoc.sh)" ]; then \
5
        echo "You need a sufficiently recent asciidoc on your host" \
6
            "to generate documents"; \
7
        exit 1; \
8
    fi
9
    $(Q)if [ -z "`which w3m 2>/dev/null`" ]; then \
10
        echo "You need w3m on your host to generate documents"; \
11
        exit 1; \
12
    fi
13
​
14
asciidoc-check-dependencies-pdf:
15
    $(Q)if [ -z "`which dblatex 2>/dev/null`" ]; then \
16
        echo "You need dblatex on your host to generate PDF documents"; \
17
        exit 1; \
18
    fi
19
​
20
# PDF generation is broken because of a bug in xsltproc program provided
21
# by libxslt <=1.1.28, which does not honor an option we need to set.
22
# Fortunately, this bug is already fixed upstream:
23
#   https://gitorious.org/libxslt/libxslt/commit/5af7ad745323004984287e48b42712e7305de35c
24
#
25
# So, bail out when trying to build a PDF using a buggy version of the
26
# xsltproc program.
27
#
28
# So, to overcome this issue and being able to build a PDF, you can
29
# build xsltproc from its source repository, then run:
30
#   $ PATH=/path/to/custom-xsltproc/bin:${PATH} make manual
31
GENDOC_XSLTPROC_IS_BROKEN = \
32
    $(shell xsltproc --maxvars 0 >/dev/null 2>/dev/null || echo y)
33
​
34
# Apply this configuration to all documents
35
BR_ASCIIDOC_CONF = docs/conf/asciidoc.conf
36
​
37
################################################################################
38
# ASCIIDOC_INNER -- generates the make targets needed to build a specific type of
39
#                   asciidoc documentation.
40
#
41
#  argument 1 is the name of the document and the top-level asciidoc file must
42
#             have the same name
43
#  argument 2 is the uppercase name of the document
44
#  argument 3 is the directory containing the document
45
#  argument 4 is the type of document to generate (-f argument of a2x)
46
#  argument 5 is the document type as used in the make target
47
#  argument 6 is the output file extension for the document type
48
#  argument 7 is the human text for the document type
49
#  argument 8 (optional) are extra arguments for a2x
50
#
51
# The variable <DOCUMENT_NAME>_SOURCES defines the dependencies.
52
#
53
# Since this function will be called from within an $(eval ...)
54
# all variable references except the arguments must be $$-quoted.
55
################################################################################
56
define ASCIIDOC_INNER
57
$(1): $(1)-$(5)
58
.PHONY: $(1)-$(5)
59
$(1)-$(5): $$(O)/docs/$(1)/$(1).$(6)
60
​
61
# Single line, because splitting a foreach is not easy...
62
asciidoc-check-dependencies-$(5):
63
$(1)-check-dependencies-$(5): asciidoc-check-dependencies-$(5)
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.