4 # Copyright (C) 2018 Karl Linden <karl.j.linden@gmail.com>
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 Get the compatibility module subirectories.
27 The compat modules are found dynamically so that this script does
28 not have to be modified if more modules are added.
30 :param ctx: the waf context
31 :type ctx: waflib.Context.Context
32 :returns: list of str -- the subdirectories
35 for entry in ctx.path.listdir():
36 path = os.path.join(ctx.path.abspath(), entry)
37 if os.path.isdir(path) and not entry.startswith('.'):
42 def recurse_into_subdirs(ctx):
44 Recurse into compatibility module subdirectories.
46 :param ctx: the waf context
47 :type ctx: waflib.Context.Context
49 for x in get_subdirs(ctx):
54 recurse_into_subdirs(opt)
58 recurse_into_subdirs(conf)
62 recurse_into_subdirs(bld)