1#!/bin/bash 2# Copyright 2014-2023 The Khronos Group Inc. 3# SPDX-License-Identifier: Apache-2.0 4 5# setup_vulkan - configure Vulkan spec antora tree with generated files 6 7vkspec=/home/tree/git/vulkan 8 9cd $vkspec 10 11# Branch selection may come later. For now, use the current branch 12# git checkout antora 13 14set -x 15 16if true ; then 17 # Generate intermediate files (for rewriting) and HTML target (for 18 #scanning anchors) 19 makeSpec QUIET=@ -clean -spec all \ 20 -genpath gen \ 21 generated jsapi html 22 23 # Generate the map (anchor name -> [ chapter anchor, anchor title ] 24 # (xrefMap.py / xrefMap.cjs) from spec HTML 25 scripts/map_html_anchors.py gen/out/html/vkspec.html -pyfile antora/xrefMap.py -jsfile antora/xrefMap.cjs 26fi 27 28# Rewrite spec sources and images into module directory 29 30# Module directory 31dir=modules 32 33# ROOT component - Vulkan spec 34# Page headers are added to pull in required attributes 35# Also creates pageMap.cjs for use by the Antora version of the spec macros 36component=$vkspec/antora/${dir}/ROOT 37scripts/antora-prep.py \ 38 -root . \ 39 -component $component \ 40 -xrefpath antora \ 41 -pageHeaders antora/pageHeaders-spec.adoc \ 42 -pagemappath antora/modules/ROOT/partials/gen/pageMap.cjs \ 43 ./config/attribs.adoc \ 44 ./config/copyright-ccby.adoc \ 45 ./config/copyright-spec.adoc \ 46 ./images/*.svg \ 47 `find ./gen ./chapters ./appendices -name '[A-Za-z]*.adoc'` \ 48 ./gen/apimap.cjs 49 50# proposals component - Vulkan extension proposals 51# No pageHeaders required. 52component=$vkspec/antora/${dir}/proposals 53scripts/antora-prep.py \ 54 -root . \ 55 -component $component \ 56 -xrefpath antora \ 57 `find ./proposals -name '[A-Za-z]*.adoc'` 58