2016-02-16 09:53:44 +00:00
|
|
|
# Copyright (c) 2014-2016 The Khronos Group Inc.
|
|
|
|
# Copyright notice at https://www.khronos.org/registry/speccopyright.html
|
|
|
|
|
|
|
|
# Vulkan Specification makefile
|
|
|
|
#
|
|
|
|
# Default targets:
|
|
|
|
# - XHTML, XHTML chunked, and PDF specs ('allspecs')
|
|
|
|
# - HTML single-document reference pages ('manhtml' and 'manpdf')
|
|
|
|
# - HTML and nroff separate reference pages ('manpages' and 'manhtmlpages')
|
|
|
|
# - Validator scripts ('allchecks')
|
|
|
|
#
|
|
|
|
# The 'html' target is deprecated but still supported, for now. It uses
|
|
|
|
# a different toolchain than XHTML/PDF outputs, isn't quite compatible,
|
|
|
|
# and will not be published, but is faster to generate for quick tests.
|
|
|
|
|
|
|
|
all: alldocs allchecks
|
|
|
|
|
|
|
|
alldocs: allspecs allman
|
|
|
|
|
|
|
|
allspecs: xhtml chunked pdf
|
|
|
|
|
|
|
|
allman: manhtml manpdf manpages manhtmlpages
|
|
|
|
|
|
|
|
allchecks: checkinc checklinks
|
|
|
|
|
|
|
|
# Note that the := assignments below are immediate, not deferred, and
|
|
|
|
# are therefore order-dependent in the Makefile
|
|
|
|
|
|
|
|
QUIET?=@
|
|
|
|
ASCIIDOC ?= asciidoc.py
|
|
|
|
A2X ?= a2x.py
|
|
|
|
DBLATEX ?= dblatex
|
2016-04-21 08:08:38 +00:00
|
|
|
# DBLATEXPREFIX can be overriden by setting it as an environment variable,
|
|
|
|
# if not installed in the standard location on your distribution
|
2016-02-16 09:53:44 +00:00
|
|
|
DBLATEXPREFIX ?= /etc/asciidoc/dblatex
|
|
|
|
RM=rm -f
|
|
|
|
RMRF=rm -rf
|
|
|
|
MKDIR=mkdir -p
|
|
|
|
CP=cp
|
|
|
|
ECHO:=echo
|
|
|
|
# Target directories for output files
|
|
|
|
# HTMLDIR - 'html' target
|
|
|
|
# XHTMLDIR - 'xhtml' target
|
|
|
|
# PDFDIR - 'pdf' target
|
|
|
|
# CHECKDIR - 'allchecks' target
|
Change log for May 13, 2016 Vulkan 1.0.13 spec update:
* Bump API patch number and header version number to 13 for this
update.
Github Issues:
* Improve the description of ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR in the
VK_KHR_surface extension (public issue 174).
* Clarify use of etext:*_SIMULTANEOUS_USE_BIT for secondary command
buffers (public issue 182).
* Fix typos in VK_KHR_wayland_surface extension where code:wl_device was
used instead of code:wl_display (public issue 193).
* Replaced {apiname} with ``Vulkan'' in XML validity statements (public
issue 199).
* Fix dead links for WSI handle types (public issue 200).
*** N.b. this needs to be done in WSI branches as well ***
* Use "signaled" instead of "signalled" spelling everywhere (public issue
201).
*** N.b. this needs to be done in WSI branches as well ***
* Move readme.pdf target directory for XML schema documentation into the
target generation directory, instead of leaving it checked into the spec
source tree (public issue 203).
*** N.b. need to add generated PDF to registry index/1.0 page
* Fix duplicate 'which which' typo in description of
elink:VkCommandPoolResetFlagBits (public issue 204).
* Move the <<Programmable Primitive Shading>> section up one level, out of
the <<drawing-primitive-topologies,Primitive Topologies>> section
(public issue 209).
Internal Issues:
* Clarify in the <<pipelines-cache,Pipeline Cache>> section that
implementations should not manage the size of pipeline cache (internal
issue 192).
* Deprecate the concept of device layers and associated commands (internal
issue 255).
* Remove ename:VK_INCOMPLETE from the list of possible result codes of
flink:vkGetPhysicalDeviceSurfaceCapabilitiesKHR (internal issue 314).
* Add missing std140/std430 rule: the base alignment of a member following
a structure is a multiple of the structure's base alignment (internal
issue 321).
* Fixes naming of the single elink:VkColorSpaceKHR enum from
ename:VK_COLORSPACE_SRGB_NONLINEAR_KHR to
ename:VK_COLOR_SPACE_SRGB_NONLINEAR_KHR in XML/header and the
VK_KHR_swapchain and VK_KHR_surface extensions to match the style of the
typename (space and color are two words, not one) (internal issue 322).
* Make it clear that code:LocalInvocationID should only be applied to an
input variable and normalize the language describing
code:LocalInvocationID to the language for other compute shader
variables in the <<interfaces-builtin-variables,Built-in Variables>>
section, and add normative language (internal issue 323).
* Clarify in the <<fundamentals-returncodes,Return Codes>> section that
the result pointer may be modified for specific commands, even if a
runtime error is returned (internal issue 324).
2016-05-14 00:01:59 +00:00
|
|
|
OUTDIR := ../../../out/1.0
|
2016-02-16 09:53:44 +00:00
|
|
|
HTMLDIR := $(OUTDIR)/html
|
|
|
|
XHTMLDIR := $(OUTDIR)/xhtml
|
|
|
|
PDFDIR := $(OUTDIR)/pdf
|
|
|
|
CHECKDIR := $(OUTDIR)/checks
|
|
|
|
# Images used in the API spec
|
|
|
|
IMAGEPATH :=images
|
|
|
|
ICONPATH :=$(IMAGEPATH)/icons
|
|
|
|
PDFXSL :=config/vkspec-dblatex.xsl
|
|
|
|
PDFSTY :=config/vkspec-dblatex.sty
|
|
|
|
PYTHON ?= python3
|
|
|
|
|
Change log for March 10, 2016 Vulkan 1.0.6 spec update:
* Bump API patch number and header version number to 6 for this
update.
Github Issues:
* Define 'invocation group' for compute and graphics shaders. Cleanup
definition and use of 'workgroup', and add glossary entries (public
issue 1).
* Various minor editorial fixes (public issue 33).
* Clarify locations for block members in the
<<interfaces-iointerfaces-locations,Location Assignment>>
section (public issue 45).
* Editorial fixes for <<commandbuffer-allocation,Command Buffer
Allocation>> section (public issues 54, 59).
* Clarify behavior of depth test in the <<fragops-depth,Depth
Test>> section (public issues 80, 81).
* Remove discussion of return codes from
flink:vkGetPhysicalDeviceSparseImageFormatProperties and
flink:vkGetImageSparseMemoryRequirements, which don't return values
(public issue 82).
* Allow flink:vkCmdDrawIndirect and flink:vkCmdDrawIndexedIndirect
pname:drawCount of 0, as well as 1, when the multiDrawIndirect
feature is not supported (public issue 88).
* Remove confusing wording in the <<features-limits,Limits>>
section describing the slink:VkPhysicalDeviceLimits
pname:minTexelBufferOffsetAlignment,
pname:minUniformBufferOffsetAlignment, and
pname:minStorageBufferOffsetAlignment members as both minimums and
maximums (public issue 91).
* Clarified that only the RGB components should be affected in places
where sRGB is referred to in the spec, such as ASTC formats. Minor
re-wording to avoid "color space" when actively incorrect, now that
we refer to the Data Format Spec which actually makes a distinction
between color space and transfer function (public issue 94).
* Treat pname:pPropertyCount == 0 consistently in
flink:vkEnumerateInstanceLayerProperties and
flink:vkEnumerateDeviceLayerProperties (public issue 99)
* Cleanup minor editorial issues in chapters 14-17 (public issue 100).
* Clarify definition of flink:vkEnumerateInstanceExtensionProperties
and flink:vkEnumerateDeviceExtensionProperties (public issue 101).
* Define the flink:vkEnumerateInstanceExtensionProperties and
flink:vkEnumerateDeviceExtensionProperties pname:pLayerName
parameter to be a pointer to a null-terminated UTF-8 string (public
issue 101).
* Rearrange "Missing information" references in mandatory format
tables (public issue 101).
* Clarify that the enumerated extensions returned by
flink:vkEnumerateInstanceExtensionProperties and
flink:vkEnumerateDeviceExtensionProperties will only include
extensions provided by the platform or extensions implemented in
implicitly enabled layers (public issue 101).
* Miscellaneous editorial fixes. Include the Vulkan spec patch number
in the PDF title. Fix label on <<fig-non-strict-lines,Non
strict lines>> diagram. Use more easily distinguished symbols in
tables in the <<features-required-format-support,Required
Format Support>> section. Don't require FQDNs used as layer names be
encoded in lower case if not possible, in the
<<extensions-naming-conventions, Extension and Layer Naming
Conventions>> section (public issues 101, 119, 121).
Internal Issues:
* Fixed excessive spacing in tables in XHTML (internal issue 18).
* Clarify that ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT
applies to secondary command buffers. Previously spec only referred
to the members of pname:pCommandBuffers being affected by this bit.
Added a separate slink:VkSubmitInfo Valid Usage restriction
specifying that ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT
also applies to any secondary command buffers that are recorded into
the primary command buffers in pname:pCommandBuffers (internal issue
106).
* Clarify that slink:VkDeviceCreateInfo::pname:pEnabledFeatures can be
NULL (internal issue 117).
* Remove "the value of" where it is redundant (e.g. speaking of an API
parameter, struct member, or SPIR-V variable, but not when speaking
of color components) (internal issue 175).
* Forced patch version to always be 0 in the header. Add a
"VK_API_VERSION_<major>_<minor>" macro for people to use to do the
right thing. Add a VK_HEADER_VERSION which captures the header
release number independent of the spec patch number (internal issue
176).
* Correct description of
slink:VkPipelineShaderStageCreateInfo::pname:pName to "a pointer to
a null-terminated UTF-8 string" (internal issue #197).
Other Commits:
* Updated DataFormat spec reference to the new date for revision 5 of
that spec.
* Fixed KEEP option (to retain LaTeX intermediate files) in the
Makefile to be included when edited there, as well as set on the
command line.
* Reserve and add "VK_IMG_filter_cubic" to the registry, and implement
script functionality to add and remove validity from existing
functions. Includes schema and readme changes.
* Update GL_KHR_vulkan_glsl so push_constants do not have descriptor
sets.
2016-03-11 01:33:02 +00:00
|
|
|
# Set VERBOSE to -v to see what asciidoc is doing.
|
|
|
|
# Set KEEP to -d to retain intermediate dblatex files
|
|
|
|
VERBOSE =
|
|
|
|
KEEP =
|
|
|
|
|
2016-02-16 09:53:44 +00:00
|
|
|
# asciidoc / a2x attributes to set.
|
|
|
|
# XMLLINT normally unset - to detect problems with intermediate files
|
|
|
|
# NOTEOPTS sets options controlling which NOTEs are generated
|
Change log for April 29, 2016 Vulkan 1.0.12 spec update:
* Bump API patch number and header version number to 12 for this
update.
Github Issues:
* Change valid usage statements intended to be "sub-points" to
be actual sub-points (public issue 66).
* Replace double negation in description of
slink:VkRenderPassBeginInfo::pname:pClearValues (based on public
merge 142).
* Cleanup minor typos in spec, ref pages and XML, including those
proposed in public pull requests 144, 150, 151, 167, 168, 181, and
186.
* Use *strict subset* in describing the partial order of memory
property types for slink:VkMemoryType, and update the style guide
accordingly (public issue 190).
* Fix various "a image" -> "an image" typos (public issue 191).
* Note in the <<fundamentals-validusage,Valid Usage>> and
<<extensions-interactions,Extension Interactions>> sections that
structures defined by extensions which may be passed in structure
chains using the ptext:pNext member must: include initial
ptext:sType and ptext:pNext members (public issue 192).
Internal Issues:
* Remove duplicate language from the description of the pname:fence
parameter to flink:vkQueueSubmit and improve validity language
(internal issue 91).
* Added documentation for "optional" attribute to XML readme.tex/pdf
(internal issue 149).
* Clarify the host-side data validity rules and behavior of
flink:vkFlushMappedMemoryRanges and
flink:vkInvalidateMappedMemoryRanges (internal issue 266).
Other Commits:
* Added clarification to flink:vkCmdFillBuffer regarding the use of
ename:VK_WHOLE_SIZE.
* Fixed and documented implementation of "validextensionstructs"
attribute. in XML processing scripts and readme.tex/pdf.
* Add missing validity statements to flink:vkResetEvent and
flink:vkCmdResetEvent.
* Fix validity for the
ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag.
Correct all the draw/dispatch commands to mention optimally tiled
images as well as linear tiled images, and say image VIEWS instead
of images. Add validity statement to flink:vkCmdBlitImage
* Replace the {apiname} macro with hardcoded "Vulkan", now that we've
committed to that name.
* Add the VK_AMD_rasterization_order extension to vk.xml.
2016-04-29 12:53:46 +00:00
|
|
|
# ATTRIBOPTS sets the api revision and enables MathJax generation
|
2016-02-16 09:53:44 +00:00
|
|
|
# VKCONF contains Vulkan-specific Asciidoc macros
|
|
|
|
# ADOCOPTS options for asciidoc->HTML output
|
|
|
|
# ADOCPDFOPTS options for asciidoc->PDF output via dblatex (not using a2x)
|
|
|
|
# A2XOPTS options for a2x->{HTML,PDF} output
|
|
|
|
XMLLINT = --no-xmllint
|
|
|
|
NOTEOPTS = -a editing-notes -a implementation-guide
|
Change log for April 29, 2016 Vulkan 1.0.12 spec update:
* Bump API patch number and header version number to 12 for this
update.
Github Issues:
* Change valid usage statements intended to be "sub-points" to
be actual sub-points (public issue 66).
* Replace double negation in description of
slink:VkRenderPassBeginInfo::pname:pClearValues (based on public
merge 142).
* Cleanup minor typos in spec, ref pages and XML, including those
proposed in public pull requests 144, 150, 151, 167, 168, 181, and
186.
* Use *strict subset* in describing the partial order of memory
property types for slink:VkMemoryType, and update the style guide
accordingly (public issue 190).
* Fix various "a image" -> "an image" typos (public issue 191).
* Note in the <<fundamentals-validusage,Valid Usage>> and
<<extensions-interactions,Extension Interactions>> sections that
structures defined by extensions which may be passed in structure
chains using the ptext:pNext member must: include initial
ptext:sType and ptext:pNext members (public issue 192).
Internal Issues:
* Remove duplicate language from the description of the pname:fence
parameter to flink:vkQueueSubmit and improve validity language
(internal issue 91).
* Added documentation for "optional" attribute to XML readme.tex/pdf
(internal issue 149).
* Clarify the host-side data validity rules and behavior of
flink:vkFlushMappedMemoryRanges and
flink:vkInvalidateMappedMemoryRanges (internal issue 266).
Other Commits:
* Added clarification to flink:vkCmdFillBuffer regarding the use of
ename:VK_WHOLE_SIZE.
* Fixed and documented implementation of "validextensionstructs"
attribute. in XML processing scripts and readme.tex/pdf.
* Add missing validity statements to flink:vkResetEvent and
flink:vkCmdResetEvent.
* Fix validity for the
ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag.
Correct all the draw/dispatch commands to mention optimally tiled
images as well as linear tiled images, and say image VIEWS instead
of images. Add validity statement to flink:vkCmdBlitImage
* Replace the {apiname} macro with hardcoded "Vulkan", now that we've
committed to that name.
* Add the VK_AMD_rasterization_order extension to vk.xml.
2016-04-29 12:53:46 +00:00
|
|
|
ATTRIBOPTS = -a apirevision="$(SPECREVISION)" -a mathjax
|
2016-02-16 09:53:44 +00:00
|
|
|
VKCONF = config/vkspec.conf
|
|
|
|
ADOCOPTS = $(ATTRIBOPTS) $(NOTEOPTS) -f config/mathjax-asciidoc.conf \
|
|
|
|
-f $(VKCONF) $(VERBOSE)
|
|
|
|
ADOCPDFOPTS= $(ATTRIBOPTS) $(NOTEOPTS) -f config/mathjax-docbook.conf \
|
|
|
|
-f $(VKCONF) $(VERBOSE)
|
|
|
|
A2XOPTS = $(ATTRIBOPTS) $(NOTEOPTS) \
|
|
|
|
--asciidoc-opts="-f config/mathjax-docbook.conf -f $(VKCONF)" \
|
|
|
|
--xsltproc-opts="--param generate.consistent.ids 1" \
|
|
|
|
$(XMLLINT) $(VERBOSE) --icons
|
|
|
|
|
|
|
|
# XSL customizing Asciibook XSL to pass through equations and add
|
|
|
|
# MathJax. This varies depending on target type.
|
|
|
|
XHTMLXSL = config/docbook-xsl/xhtml.xsl
|
|
|
|
CHUNKEDXSL = config/docbook-xsl/chunked.xsl
|
|
|
|
|
|
|
|
# dblatex options passed two ways, directly to dblatex and via a2x.
|
|
|
|
DBLATEXOPTS := $(KEEP) -V -T db2latex -I. -I images -I images/icons -s $(DBLATEXPREFIX)/asciidoc-dblatex.sty
|
|
|
|
A2XDBLATEXOPTS := --dblatex-opts='$(DBLATEXOPTS)'
|
|
|
|
|
|
|
|
# Misc. files to clean up (see 'checkinc' target below)
|
|
|
|
DIRT :=
|
|
|
|
|
|
|
|
.PHONY: directories
|
|
|
|
|
|
|
|
ICONFILES := \
|
|
|
|
$(ICONPATH)/caution.png \
|
|
|
|
$(ICONPATH)/example.png \
|
|
|
|
$(ICONPATH)/home.png \
|
|
|
|
$(ICONPATH)/important.png \
|
|
|
|
$(ICONPATH)/next.png \
|
|
|
|
$(ICONPATH)/note.png \
|
|
|
|
$(ICONPATH)/prev.png \
|
|
|
|
$(ICONPATH)/tip.png \
|
|
|
|
$(ICONPATH)/up.png \
|
|
|
|
$(ICONPATH)/warning.png
|
|
|
|
PNGFILES := $(ICONFILES) $(wildcard $(IMAGEPATH)/*.png)
|
|
|
|
# This is a horrible hack to avoid pulling in vulkantexture0.svg
|
|
|
|
SVGFILES := $(wildcard $(IMAGEPATH)/[A-Za-uw-z]*.svg)
|
|
|
|
PDFFILES := $(SVGFILES:.svg=.pdf)
|
|
|
|
# Some random directories and files that need to be copied into spec
|
|
|
|
# output directory
|
|
|
|
WEBIMAGES := $(SVGFILES:%=$(HTMLDIR)/%) $(PNGFILES:%=$(HTMLDIR)/%)
|
|
|
|
# File suffix for image targets for HTML and PDF Builds - Asciidoc {svgtype} attribute
|
|
|
|
SVGTYPEHTML := svg
|
|
|
|
SVGTYPEPDF := pdf
|
|
|
|
# Main (root) asciidoc spec source file
|
|
|
|
TOPDOC := vkspec.txt
|
|
|
|
# Included chapters of the API spec
|
|
|
|
CHAPTERS := $(wildcard chapters/[A-Za-z]*.txt appendices/[A-Za-z]*.txt)
|
|
|
|
INCLUDES := $(wildcard protos/*.txt structs/*.txt flags/*.txt enums/*.txt funcpointers/*.txt validity/structs/*.txt validity/protos/*.txt)
|
|
|
|
# All non-format-specific dependencies
|
|
|
|
COMMONDOCS := $(CHAPTERS) $(INCLUDES)
|
Change log for March 10, 2016 Vulkan 1.0.6 spec update:
* Bump API patch number and header version number to 6 for this
update.
Github Issues:
* Define 'invocation group' for compute and graphics shaders. Cleanup
definition and use of 'workgroup', and add glossary entries (public
issue 1).
* Various minor editorial fixes (public issue 33).
* Clarify locations for block members in the
<<interfaces-iointerfaces-locations,Location Assignment>>
section (public issue 45).
* Editorial fixes for <<commandbuffer-allocation,Command Buffer
Allocation>> section (public issues 54, 59).
* Clarify behavior of depth test in the <<fragops-depth,Depth
Test>> section (public issues 80, 81).
* Remove discussion of return codes from
flink:vkGetPhysicalDeviceSparseImageFormatProperties and
flink:vkGetImageSparseMemoryRequirements, which don't return values
(public issue 82).
* Allow flink:vkCmdDrawIndirect and flink:vkCmdDrawIndexedIndirect
pname:drawCount of 0, as well as 1, when the multiDrawIndirect
feature is not supported (public issue 88).
* Remove confusing wording in the <<features-limits,Limits>>
section describing the slink:VkPhysicalDeviceLimits
pname:minTexelBufferOffsetAlignment,
pname:minUniformBufferOffsetAlignment, and
pname:minStorageBufferOffsetAlignment members as both minimums and
maximums (public issue 91).
* Clarified that only the RGB components should be affected in places
where sRGB is referred to in the spec, such as ASTC formats. Minor
re-wording to avoid "color space" when actively incorrect, now that
we refer to the Data Format Spec which actually makes a distinction
between color space and transfer function (public issue 94).
* Treat pname:pPropertyCount == 0 consistently in
flink:vkEnumerateInstanceLayerProperties and
flink:vkEnumerateDeviceLayerProperties (public issue 99)
* Cleanup minor editorial issues in chapters 14-17 (public issue 100).
* Clarify definition of flink:vkEnumerateInstanceExtensionProperties
and flink:vkEnumerateDeviceExtensionProperties (public issue 101).
* Define the flink:vkEnumerateInstanceExtensionProperties and
flink:vkEnumerateDeviceExtensionProperties pname:pLayerName
parameter to be a pointer to a null-terminated UTF-8 string (public
issue 101).
* Rearrange "Missing information" references in mandatory format
tables (public issue 101).
* Clarify that the enumerated extensions returned by
flink:vkEnumerateInstanceExtensionProperties and
flink:vkEnumerateDeviceExtensionProperties will only include
extensions provided by the platform or extensions implemented in
implicitly enabled layers (public issue 101).
* Miscellaneous editorial fixes. Include the Vulkan spec patch number
in the PDF title. Fix label on <<fig-non-strict-lines,Non
strict lines>> diagram. Use more easily distinguished symbols in
tables in the <<features-required-format-support,Required
Format Support>> section. Don't require FQDNs used as layer names be
encoded in lower case if not possible, in the
<<extensions-naming-conventions, Extension and Layer Naming
Conventions>> section (public issues 101, 119, 121).
Internal Issues:
* Fixed excessive spacing in tables in XHTML (internal issue 18).
* Clarify that ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT
applies to secondary command buffers. Previously spec only referred
to the members of pname:pCommandBuffers being affected by this bit.
Added a separate slink:VkSubmitInfo Valid Usage restriction
specifying that ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT
also applies to any secondary command buffers that are recorded into
the primary command buffers in pname:pCommandBuffers (internal issue
106).
* Clarify that slink:VkDeviceCreateInfo::pname:pEnabledFeatures can be
NULL (internal issue 117).
* Remove "the value of" where it is redundant (e.g. speaking of an API
parameter, struct member, or SPIR-V variable, but not when speaking
of color components) (internal issue 175).
* Forced patch version to always be 0 in the header. Add a
"VK_API_VERSION_<major>_<minor>" macro for people to use to do the
right thing. Add a VK_HEADER_VERSION which captures the header
release number independent of the spec patch number (internal issue
176).
* Correct description of
slink:VkPipelineShaderStageCreateInfo::pname:pName to "a pointer to
a null-terminated UTF-8 string" (internal issue #197).
Other Commits:
* Updated DataFormat spec reference to the new date for revision 5 of
that spec.
* Fixed KEEP option (to retain LaTeX intermediate files) in the
Makefile to be included when edited there, as well as set on the
command line.
* Reserve and add "VK_IMG_filter_cubic" to the registry, and implement
script functionality to add and remove validity from existing
functions. Includes schema and readme changes.
* Update GL_KHR_vulkan_glsl so push_constants do not have descriptor
sets.
2016-03-11 01:33:02 +00:00
|
|
|
# A generated included file with the spec version, date, and git commit
|
2016-02-16 09:53:44 +00:00
|
|
|
SPECVERSION = specversion.txt
|
2016-05-27 10:37:56 +00:00
|
|
|
SPECREVISION = 1.0.15
|
2016-02-16 09:53:44 +00:00
|
|
|
SPECREMARK =
|
|
|
|
|
|
|
|
# Spec targets
|
|
|
|
# There is some complexity to try and avoid short virtual targets like 'html'
|
|
|
|
# causing specs to *always* be regenerated.
|
|
|
|
|
|
|
|
html: $(HTMLDIR)/vkspec.html $(TOPDOC) $(COMMONDOCS) $(WEBIMAGES)
|
|
|
|
|
|
|
|
$(HTMLDIR)/vkspec.html: $(VKCONF) $(SPECVERSION) $(TOPDOC) $(COMMONDOCS) $(WEBIMAGES)
|
|
|
|
$(QUIET)if test ! -d $(HTMLDIR) ; then $(MKDIR) $(HTMLDIR) ; fi
|
|
|
|
$(QUIET)$(ASCIIDOC) -b html5 $(ADOCOPTS) -o $(HTMLDIR)/vkspec.html -a svgpdf=$(SVGTYPEHTML) $(TOPDOC)
|
|
|
|
|
|
|
|
xhtml: $(XHTMLDIR)/vkspec.html $(TOPDOC) $(COMMONDOCS)
|
|
|
|
|
|
|
|
$(XHTMLDIR)/vkspec.html: $(VKCONF) $(SPECVERSION) $(TOPDOC) $(COMMONDOCS)
|
|
|
|
$(QUIET)if test ! -d $(XHTMLDIR) ; then $(MKDIR) $(XHTMLDIR) ; fi
|
|
|
|
$(QUIET)$(A2X) $(A2XOPTS) -f xhtml $(TOPDOC) \
|
|
|
|
--xsl-file=$(XHTMLXSL) \
|
|
|
|
-a toc2 -a toclevels=2 --destination-dir=$(XHTMLDIR) \
|
|
|
|
-a svgpdf=$(SVGTYPEHTML)
|
|
|
|
|
|
|
|
chunked: $(OUTDIR)/vkspec.chunked/index.html $(TOPDOC) $(COMMONDOCS)
|
|
|
|
|
|
|
|
$(OUTDIR)/vkspec.chunked/index.html: $(VKCONF) $(SPECVERSION) $(TOPDOC) $(COMMONDOCS)
|
|
|
|
$(QUIET)if test ! -d $(OUTDIR)/chunked ; then $(MKDIR) $(OUTDIR) ; fi
|
|
|
|
$(QUIET)$(A2X) $(A2XOPTS) -f chunked $(TOPDOC) \
|
|
|
|
--xsl-file=$(CHUNKEDXSL) \
|
|
|
|
-a toc2 -a toclevels=2 --destination-dir=$(OUTDIR) \
|
|
|
|
-a svgpdf=$(SVGTYPEHTML)
|
|
|
|
|
|
|
|
pdf: $(PDFDIR)/vkspec.pdf
|
|
|
|
|
|
|
|
$(PDFDIR)/vkspec.pdf: $(PDFXSL) $(PDFSTY) $(PDFDIR)/vkspec.xml
|
|
|
|
$(QUIET)$(DBLATEX) -b pdftex $(DBLATEXOPTS) \
|
|
|
|
-p "$(DBLATEXPREFIX)/asciidoc-dblatex.xsl" \
|
|
|
|
-p $(PDFXSL) -s $(PDFSTY) \
|
|
|
|
$(PDFDIR)/vkspec.xml -O $(PDFDIR)
|
|
|
|
|
|
|
|
$(PDFDIR)/vkspec.xml: $(VKCONF) $(SPECVERSION) $(TOPDOC) $(COMMONDOCS) $(PDFDIR) $(PDFFILES)
|
|
|
|
$(QUIET)$(ASCIIDOC) --backend docbook $(ADOCPDFOPTS) \
|
|
|
|
-a a2x-format=pdf -a svgpdf=pdf \
|
|
|
|
--out-file $(PDFDIR)/vkspec.xml $(TOPDOC)
|
|
|
|
|
|
|
|
$(PDFDIR):
|
|
|
|
$(QUIET)if test ! -d $(PDFDIR) ; then $(MKDIR) $(PDFDIR) ; fi
|
|
|
|
|
|
|
|
# Generate Asciidoc attributes for spec version / date
|
|
|
|
# Could use `git log -1 --format="%cd"` to get branch commit date
|
|
|
|
# This used to be a dependency in the spec html/chunked/pdf targets,
|
|
|
|
# but that's likely to lead to merge conflicts. Just regenerate
|
|
|
|
# when pushing a new spec for review to the sandbox.
|
|
|
|
# The dependency on HEAD is per the suggestion in
|
|
|
|
# http://neugierig.org/software/blog/2014/11/binary-revisions.html
|
|
|
|
GITHEAD := ../../../.git/logs/HEAD
|
|
|
|
$(SPECVERSION): $(GITHEAD)
|
|
|
|
$(QUIET)echo ":revnumber: $(SPECREVISION)" > $@
|
|
|
|
$(QUIET)echo ":revdate: " `date` >> $@
|
|
|
|
$(QUIET)echo ":revremark: $(SPECREMARK) from git branch:" \
|
|
|
|
`git symbolic-ref --short HEAD` \
|
|
|
|
"commit:" `git log -1 --format="%H"` >> $@
|
|
|
|
|
|
|
|
styleguide: $(OUTDIR)/styleguide.html
|
|
|
|
|
|
|
|
STYLESRC = style/styleguide.txt
|
|
|
|
$(OUTDIR)/styleguide.html: $(VKCONF) $(SPECVERSION) $(STYLESRC)
|
|
|
|
$(QUIET)$(ASCIIDOC) -b html5 $(ADOCOPTS) \
|
|
|
|
-o $(OUTDIR)/styleguide.html -a svgpdf=$(SVGTYPEHTML) \
|
|
|
|
$(STYLESRC)
|
|
|
|
|
|
|
|
clean: clean_html clean_pdf clean_chunked clean_checks clean_dirt
|
|
|
|
|
|
|
|
clean_html:
|
|
|
|
$(QUIET)$(RMRF) $(HTMLDIR) $(XHTMLDIR)
|
|
|
|
$(QUIET)$(RM) $(OUTDIR)/apispec.html
|
|
|
|
|
|
|
|
clean_pdf:
|
|
|
|
$(QUIET)$(RM) $(PDFDIR)/vkspec.pdf $(PDFDIR)/vkspec.xml $(OUTDIR)/apispec.pdf
|
|
|
|
|
|
|
|
clean_chunked:
|
|
|
|
$(QUIET)$(RMRF) $(OUTDIR)/vkspec.chunked
|
|
|
|
|
|
|
|
clean_checks:
|
|
|
|
$(QUIET)$(RMRF) $(CHECKDIR)
|
|
|
|
|
|
|
|
clean_dirt:
|
|
|
|
$(QUIET)$(RM) $(DIRT)
|
|
|
|
|
|
|
|
# Man page targets for individual pages
|
|
|
|
MANDIR:=man
|
|
|
|
-include man/manpages.mak
|
|
|
|
|
|
|
|
# Man page targets for HTML and PDF single-file documents
|
|
|
|
|
|
|
|
manpdf: $(OUTDIR)/apispec.pdf
|
|
|
|
|
|
|
|
manhtml: $(OUTDIR)/apispec.html
|
|
|
|
|
|
|
|
$(OUTDIR)/apispec.pdf: $(CONFFILE) man/apispec.txt $(MANSOURCES) $(PDFXSL)
|
|
|
|
$(QUIET)if test ! -d $(OUTDIR) ; then $(MKDIR) $(OUTDIR) ; fi
|
|
|
|
$(QUIET)$(A2X) -f pdf $(A2XDBLATEXOPTS) $(A2XOPTS) --icons man/apispec.txt --destination-dir=$(OUTDIR)
|
|
|
|
|
|
|
|
$(OUTDIR)/apispec.html: $(CONFFILE) man/apispec.txt $(MANSOURCES) $(SVGFILES)
|
|
|
|
$(QUIET)if test ! -d $(OUTDIR) ; then $(MKDIR) $(OUTDIR) ; fi
|
|
|
|
$(QUIET)$(ASCIIDOC) $(ADOCOPTS) -d book -b html --out-file=$(OUTDIR)/apispec.html man/apispec.txt
|
|
|
|
|
|
|
|
$(HTMLDIR)/images/%: images/%
|
|
|
|
$(QUIET)$(MKDIR) $(@D)
|
|
|
|
$(QUIET)$(CP) $< $@
|
|
|
|
|
|
|
|
# Automated (though heuristic) checks of consistency in the spec and
|
|
|
|
# ref page sources
|
|
|
|
|
|
|
|
# Validate includes in spec source vs. includes actually in the tree
|
|
|
|
# Generates file in $(CHECKDIR)
|
|
|
|
# $(NOTINSPEC) notInSpec.txt - include files only found in XML, not in spec
|
|
|
|
# Intermediate files removed after the run
|
|
|
|
# $(ACTUAL) - include files generated from vk.xml
|
|
|
|
# $(INSPEC) - include files referenced from the spec (not ref page) source
|
|
|
|
# Other files which could be generated but are basically useless
|
|
|
|
# include files only found in the spec source - comm -13 $(ACTUAL) $(INSPEC)
|
|
|
|
# include files both existing and referenced by the spec - comm -12 $(ACTUAL) $(INSPEC)
|
|
|
|
INCFILES = $(CHECKDIR)/incfiles
|
|
|
|
ACTUAL = $(CHECKDIR)/actual
|
|
|
|
INSPEC = $(CHECKDIR)/inspec
|
|
|
|
NOTINSPEC = $(CHECKDIR)/notInSpec.txt
|
|
|
|
checkinc:
|
|
|
|
$(QUIET)if test ! -d $(CHECKDIR) ; then $(MKDIR) $(CHECKDIR) ; fi
|
|
|
|
$(QUIET)ls $(INCLUDES) | sort > $(ACTUAL)
|
|
|
|
$(QUIET)cat $(CHAPTERS) | \
|
|
|
|
egrep '^include::\.\./' | tr -d '[]' | \
|
|
|
|
sed -e 's#^include::\.\./##g' | sort > $(INCFILES)
|
|
|
|
$(QUIET)echo "List of API include files repeatedly included in the API specification" > $(NOTINSPEC)
|
|
|
|
$(QUIET)echo "----------------------------------------------------------------------" >> $(NOTINSPEC)
|
|
|
|
$(QUIET)uniq -d $(INCFILES) >> $(NOTINSPEC)
|
|
|
|
$(QUIET)(echo ; echo "List of API include files not referenced in the API specification") >> $(NOTINSPEC)
|
|
|
|
$(QUIET)echo "-----------------------------------------------------------------" >> $(NOTINSPEC)
|
|
|
|
$(QUIET)comm -23 $(ACTUAL) $(INCFILES) >> $(NOTINSPEC)
|
|
|
|
$(QUIET)echo "Include files not found in the spec source are in $(CHECKDIR)/notInSpec.txt"
|
|
|
|
$(QUIET)$(RM) $(INCFILES) $(ACTUAL) $(INSPEC)
|
|
|
|
|
|
|
|
# Validate link tags in spec and ref page sources against vk.xml
|
|
|
|
# (represented in vkapi.py, which is autogenerated along with the
|
|
|
|
# headers and ref page includes).
|
|
|
|
# Generates files in $(CHECKDIR):
|
|
|
|
# specErrs.txt - errors & warnings in API spec
|
|
|
|
# manErrs.txt - errors & warnings in man pages
|
|
|
|
checklinks:
|
|
|
|
$(QUIET)if test ! -d $(CHECKDIR) ; then $(MKDIR) $(CHECKDIR) ; fi
|
|
|
|
$(QUIET)echo "Generating link checks for spec (specErrs.txt) and man pages (manErrs.txt)"
|
|
|
|
$(QUIET)$(PYTHON) checkLinks.py -follow man/[Vv][Kk]*.txt > $(CHECKDIR)/manErrs.txt
|
|
|
|
$(QUIET)$(PYTHON) checkLinks.py -follow $(CHAPTERS) > $(CHECKDIR)/specErrs.txt
|
|
|
|
|
|
|
|
# README file with build instructions
|
|
|
|
README.html: README.txt
|
|
|
|
$(ASCIIDOC) -b html5 README.txt
|