def makefile_builders(build_info): m = MakefileBuilder() for (output, source, command, theme, base) in build_info: m.section_break(command) m.target(source, base + 'dirhtml') m.job('$(MAKE) -C ' + command + ' ' + SPHINX_TYPE) m.msg('[institute]: building ' + SPHINX_TYPE + 'build taks in ' + command) m.target(base + 'dirhtml') m.job('$(MAKE) -C ' + command + ' dirhtml') m.msg('[dirhtml]: building in ' + command) if theme == "": pass else: m.target(output, source) m.job('mkdir -p $@') m.msg('[build]: created $@') m.job('cp -R $</* $@') m.msg('[build]: migrated $< to $@') m.job('touch ' + command + '/source/index.txt') m.msg('[build]: touching /source/index.txt to ensure a clean build') m.comment('theme building instructions') m.target(theme[0], theme[1]) m.job('mkdir -p $@') m.msg('[theme]: created $@') m.job('cp -R $</* $@') m.msg('[theme]: migrated $< to $@') m.comment('keeping the sphinx build system unified for ' + theme[0], block='second') m.target(command + "/makefile.docs", PROJECTS_DIR + "/institute/makefile.docs", block='second') m.job('cp $< $@', block='second') m.msg('[buildsysystem]: migrated $< to $@', block='second') return m.makefile
#!/usr/bin/python import sys from makefile_builder import MakefileBuilder from builder_data import install_guides m = MakefileBuilder() def build_all_install_guides(install_guides): m.comment( 'to render the install guides properly, we have to bake in the version number.', block='header') m.newline(block='header') for build in install_guides: makefile_inst(build[0], build[1]) m.comment('integration target for the installation guides:', block='meta') m.target( target='.PHONY', dependency= 'installation-guides $(installation-sources) $(installation-guides)', block='meta') m.newline(block='meta') m.target(target='installation-sources', dependency='$(installation-sources)', block='meta') m.job('git update-index --assume-unchanged $(installation-sources)',
def makefile_builders(build_info): m = MakefileBuilder() for (output, source, command, theme, base) in build_info: m.section_break(command) m.target(source, base + 'dirhtml') m.job('$(MAKE) -C ' + command + ' ' + SPHINX_TYPE) m.msg('[institute]: building ' + SPHINX_TYPE + 'build taks in ' + command) m.target(base + 'dirhtml') m.job('$(MAKE) -C ' + command + ' dirhtml') m.msg('[dirhtml]: building in ' + command) if theme == "": pass else: m.target(output, source) m.job('mkdir -p $@') m.msg('[build]: created $@') m.job('cp -R $</* $@') m.msg('[build]: migrated $< to $@') m.job('touch ' + command + '/source/index.txt') m.msg( '[build]: touching /source/index.txt to ensure a clean build') m.comment('theme building instructions') m.target(theme[0], theme[1]) m.job('mkdir -p $@') m.msg('[theme]: created $@') m.job('cp -R $</* $@') m.msg('[theme]: migrated $< to $@') m.comment('keeping the sphinx build system unified for ' + theme[0], block='second') m.target(command + "/makefile.docs", PROJECTS_DIR + "/institute/makefile.docs", block='second') m.job('cp $< $@', block='second') m.msg('[buildsysystem]: migrated $< to $@', block='second') return m.makefile