Page MenuHomec4science

SConscript
No OneTemporary

File Metadata

Created
Fri, Nov 29, 18:06

SConscript

# -*- mode:python; coding: utf-8 -*-
# vim: set ft=python:
# @file
# @section LICENSE
#
# Copyright (©) 2016-19 EPFL (École Polytechnique Fédérale de Lausanne),
# Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from os.path import join, exists
from subprocess import call
Import('main_env')
doxygen_tool = str(Dir('#site_scons/site_tools/doxygen'))
if not exists(doxygen_tool):
print("Cloning scons doxygen builder")
# Checking if Mercurial is installed
env = Environment()
conf = Configure(env)
if not conf.CheckProg('hg'):
print("Could not find Mercurial needed to clone the doxygen tool")
Exit(1)
try:
call(['hg', 'clone', 'https://bitbucket.org/russel/scons_doxygen', doxygen_tool])
except:
print("Error while running Mercurial to clone the doxygen tool")
Exit(1)
env_doxygen = main_env.Clone(
tools = ['default', 'doxygen']
)
src_dir = "#/doc/doxygen"
file = "Doxyfile"
build_dir = 'build-' + main_env['build_type'] + '/doc/doxygen'
Command(join("doxygen", file), join(src_dir, file), [
Mkdir(build_dir),
Copy("$TARGET", "$SOURCE")
]
)
env_doxygen.Doxygen("doxygen/Doxyfile")

Event Timeline