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.
24 Get the compatibility module subirectories.
26 The compat modules are found dynamically so that this script does
27 not have to be modified if more modules are added.
29 :param ctx: the waf context
30 :type ctx: waflib.Context.Context
31 :returns: list of str -- the subdirectories
34 for entry in ctx.path.listdir():
35 path = os.path.join(ctx.path.abspath(), entry)
36 if os.path.isdir(path) and not entry.startswith('.'):
40 def recurse_into_subdirs(ctx):
42 Recurse into compatibility module subdirectories.
44 :param ctx: the waf context
45 :type ctx: waflib.Context.Context
47 for x in get_subdirs(ctx):
51 recurse_into_subdirs(opt)
54 recurse_into_subdirs(conf)
57 recurse_into_subdirs(bld)