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