#!/usr/bin/python3 # # Copyright (c) 2016-2018 The Khronos Group Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Ensure config/extDependency.py is up-to-date before we import it. # If it is up to date, 'make' will print a useless warning without '-s'. import subprocess,sys subprocess.check_call(['make', '-s', 'config/extDependency.py']) # Alter sys.path to import config/extDependency.py. sys.path = sys.path + [ 'config' ] from genspec import * from extDependency import allExts, khrExts # Eventually, these may be defined by extDependency.py allVersions = [ 'VK_VERSION_1_0', 'VK_VERSION_1_1' ] Version1_0 = [ 'VK_VERSION_1_0' ] publicRelease = True if publicRelease: # For public release repoDir = '/home/tree/git/Vulkan-Docs' outDir = '/home/tree/git/registry/vulkan/specs' else: # For internal build & pseudo-release repoDir = '/home/tree/git/vulkan' #outDir = '/home/tree/git/vulkan/doc/specs/vulkan/reg' outDir = '/home/tree/git/registry/vulkan/specs' print('echo Building release from', repoDir, 'to', outDir) print('') # Spec targets to build - html, pdf, or both. # pdf is very slow, but needed for public releases. specTargets = 'html pdf' print('echo Info: not build spec PDF targets') # Vulkan 1.1 specs # Build validusage target only for 1.1 + all extensions buildBranch('1.1-extensions', versions = allVersions, extensions = allExts, apititle = '(with all registered Vulkan extensions)', xmlTargets = 'clobber install', specTargets = specTargets + ' validusage', repoDir = repoDir, outDir = outDir) buildBranch('1.1-khr-extensions', versions = allVersions, extensions = khrExts, apititle = '(with KHR extensions)', xmlTargets = 'clobber install', specTargets = specTargets, repoDir = repoDir, outDir = outDir) # Build ref pages, style guide, and registry documentation targets only for # 1.1 + no extensions. # Ref page build isn't quite working yet. Once it is, replace argument # specTargets with: # specTargets = specTargets + ' styleguide registry manhtml manhtmlpages manpdf', buildBranch('1.1', versions = allVersions, extensions = None, apititle = None, xmlTargets = 'clobber install', specTargets = specTargets + ' styleguide registry', repoDir = repoDir, outDir = outDir, needRefSources = True) print('echo Info: Not building 1.1 reference pages yet') # Vulkan 1.0 specs (TBD, doesn't quite work right yet) if False: buildBranch('1.0-extensions', versions = Version1_0, extensions = allExts, apititle = '(with all registered Vulkan extensions)', xmlTargets = 'clobber install', specTargets = specTargets, repoDir = repoDir, outDir = outDir) buildBranch('1.0-wsi_extensions', versions = Version1_0, extensions = khrExts, apititle = '(with KHR extensions)', xmlTargets = 'clobber install', specTargets = specTargets, repoDir = repoDir, outDir = outDir) buildBranch('1.0', versions = Version1_0, extensions = None, apititle = None, xmlTargets = 'clobber install', specTargets = specTargets, repoDir = repoDir, outDir = outDir) else: print('echo Info: Not building 1.0 specs yet') print('echo Info: post-generation cleanup') createTags(releaseNum(), buildOnFriday())