From 898872699d8c95475fd66c03f0e13f8a3c181ce7 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Sat, 7 Apr 2012 10:54:40 +0200 Subject: [PATCH] removed the macro DLL_EXPORT for gcc/g++ on windows and cleaned up a few TODO entries --- ChangeLog | 1 + waflib/Build.py | 9 ++++----- waflib/Node.py | 6 ++---- waflib/Task.py | 2 +- waflib/Tools/compiler_d.py | 1 - waflib/Tools/d.py | 3 +-- waflib/Tools/fc_scan.py | 5 ----- waflib/Tools/gcc.py | 2 -- waflib/Tools/gxx.py | 2 -- 9 files changed, 9 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index d7a0833b..1a26e556 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ NEW IN WAF 1.7.0 * Added header prefixing (autoconf-like) #1117 * Removed the warnings on "waf install" #1120 * Extended bld.subst() to perform simple copies to the build directory +* Removed the default DLL_EXPORT define on gcc/g++ shared libraries NEW IN WAF 1.6.11 ----------------- diff --git a/waflib/Build.py b/waflib/Build.py index cd342bc5..6a3f6565 100644 --- a/waflib/Build.py +++ b/waflib/Build.py @@ -729,11 +729,10 @@ class BuildContext(Context.Context): """ tasks = [] for tg in self.groups[idx]: - # TODO a try-except might be more efficient - if isinstance(tg, Task.TaskBase): - tasks.append(tg) - else: + try: tasks.extend(tg.tasks) + except AttributeError: # not a task generator, can be the case for installation tasks + tasks.append(tg) return tasks def get_build_iterator(self): @@ -1171,7 +1170,7 @@ class CleanContext(BuildContext): self.store() def clean(self): - """clean the data and some files in the build dir .. well, TODO""" + """Remove files from the build directory if possible, and reset the caches""" Logs.debug('build: clean called') if self.bldnode != self.srcnode: diff --git a/waflib/Node.py b/waflib/Node.py index 6d468b31..e4154d64 100644 --- a/waflib/Node.py +++ b/waflib/Node.py @@ -58,8 +58,6 @@ Ant patterns for files and folders to exclude while doing the recursive traversal in :py:meth:`waflib.Node.Node.ant_glob` """ -# TODO optimize split_path by performing a replacement when unpacking? - def split_path(path): """ Split a path by os.sep (This is not os.path.split) @@ -760,8 +758,8 @@ class Node(object): def nice_path(self, env=None): """ - Return the path seen from the launch directory. It is often used for printing nodes in the console to open - files easily. + Return the path seen from the launch directory. + Can be used for opening files easily (copy-paste in the console). """ return self.path_from(self.ctx.launch_node()) diff --git a/waflib/Task.py b/waflib/Task.py index dafddfd3..9a25ed2b 100644 --- a/waflib/Task.py +++ b/waflib/Task.py @@ -494,11 +494,11 @@ class Task(TaskBase): def set_run_after(self, task): """ Run this task only after *task*. Affect :py:meth:`waflib.Task.runnable_status` + You probably want to use tsk.run_after.add(task) directly :param task: task :type task: :py:class:`waflib.Task.Task` """ - # TODO: handle lists too? assert isinstance(task, TaskBase) self.run_after.add(task) diff --git a/waflib/Tools/compiler_d.py b/waflib/Tools/compiler_d.py index 2ace4717..9b1a0354 100644 --- a/waflib/Tools/compiler_d.py +++ b/waflib/Tools/compiler_d.py @@ -39,7 +39,6 @@ def configure(conf): if conf.env.D: conf.end_msg(conf.env.get_flat('D')) conf.env['COMPILER_D'] = compiler - conf.env.D_COMPILER = conf.env.D # TODO remove this, left for compatibility break conf.end_msg(False) else: diff --git a/waflib/Tools/d.py b/waflib/Tools/d.py index 6c9fef93..f9f299cf 100644 --- a/waflib/Tools/d.py +++ b/waflib/Tools/d.py @@ -63,7 +63,7 @@ def d_hook(self, node): return tsk @taskgen_method -def generate_header(self, filename, install_path=None): +def generate_header(self, filename): """ See feature request #104:: @@ -75,7 +75,6 @@ def generate_header(self, filename, install_path=None): :param filename: header to create :type filename: string - :param install_path: unused (TODO) """ try: self.header_lst.append([filename, install_path]) diff --git a/waflib/Tools/fc_scan.py b/waflib/Tools/fc_scan.py index cbe77d36..73c437a3 100644 --- a/waflib/Tools/fc_scan.py +++ b/waflib/Tools/fc_scan.py @@ -13,11 +13,6 @@ INC_REGEX = """(?:^|['">]\s*;)\s*INCLUDE\s+(?:\w+_)?[<"'](.+?)(?=["'>])""" USE_REGEX = """(?:^|;)\s*USE(?:\s+|(?:(?:\s*,\s*(?:NON_)?INTRINSIC)?\s*::))\s*(\w+)""" MOD_REGEX = """(?:^|;)\s*MODULE(?!\s*PROCEDURE)(?:\s+|(?:(?:\s*,\s*(?:NON_)?INTRINSIC)?\s*::))\s*(\w+)""" -# TODO (DC) -# - handle pre-processed files (FORTRANPPCOM in scons) -# - handle multiple dialects -# TODO (ita) understand what the above is supposed to mean ^^ - re_inc = re.compile(INC_REGEX, re.I) re_use = re.compile(USE_REGEX, re.I) re_mod = re.compile(MOD_REGEX, re.I) diff --git a/waflib/Tools/gcc.py b/waflib/Tools/gcc.py index 1b95d87c..367e097b 100644 --- a/waflib/Tools/gcc.py +++ b/waflib/Tools/gcc.py @@ -80,8 +80,6 @@ def gcc_modifier_win32(conf): v['CFLAGS_cshlib'] = [] - v.append_value('CFLAGS_cshlib', ['-DDLL_EXPORT']) # TODO adding nonstandard defines like this DLL_EXPORT is not a good idea - # Auto-import is enabled by default even without this option, # but enabling it explicitly has the nice effect of suppressing the rather boring, debug-level messages # that the linker emits otherwise. diff --git a/waflib/Tools/gxx.py b/waflib/Tools/gxx.py index 4ab486b0..f3b3aca8 100644 --- a/waflib/Tools/gxx.py +++ b/waflib/Tools/gxx.py @@ -80,8 +80,6 @@ def gxx_modifier_win32(conf): v['CXXFLAGS_cxxshlib'] = [] - v.append_value('CXXFLAGS_cxxshlib', ['-DDLL_EXPORT']) # TODO adding nonstandard defines like this DLL_EXPORT is not a good idea - # Auto-import is enabled by default even without this option, # but enabling it explicitly has the nice effect of suppressing the rather boring, debug-level messages # that the linker emits otherwise.