From 9643f46cc8bab8ab4bea353088a60823bd94fbbc Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Thu, 28 Aug 2008 02:57:12 +0200 Subject: [PATCH] Scons-Wiki: Improvements until 2008 This code was taken from the Wiki and incorporated into the Lumiera.org build system in August 2008 --- __init__.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/__init__.py b/__init__.py index fd51393e7..630fb9f92 100644 --- a/__init__.py +++ b/__init__.py @@ -116,8 +116,17 @@ def DoxySourceScan(node, env, path): file_patterns = data.get("FILE_PATTERNS", default_file_patterns) exclude_patterns = data.get("EXCLUDE_PATTERNS", default_exclude_patterns) + + # + # We're running in the top-level directory, but the doxygen + # configuration file is in the same directory as node; this means + # that relative pathnames in node must be adjusted before they can + # go onto the sources list + conf_dir = os.path.dirname(str(node)) for node in data.get("INPUT", []): + if not os.path.isabs(node): + node = os.path.join(conf_dir, node) if os.path.isfile(node): sources.append(node) elif os.path.isdir(node): @@ -150,7 +159,7 @@ def DoxyEmitter(source, target, env): "HTML": ("YES", "html"), "LATEX": ("YES", "latex"), "RTF": ("NO", "rtf"), - "MAN": ("YES", "man"), + "MAN": ("NO", "man"), "XML": ("NO", "xml"), } @@ -185,13 +194,12 @@ def generate(env): scan_check = DoxySourceScanCheck, ) - doxyfile_builder = env.Builder( - action = env.Action("cd ${SOURCE.dir} && ${DOXYGEN} ${SOURCE.file}"), + import SCons.Builder + doxyfile_builder = SCons.Builder.Builder( + action = "cd ${SOURCE.dir} && ${DOXYGEN} ${SOURCE.file}", emitter = DoxyEmitter, target_factory = env.fs.Entry, single_source = True, - - source_scanner = doxyfile_scanner, )