2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 18:07:12 +01:00

Issue 1117

This commit is contained in:
Thomas Nagy 2012-04-16 19:54:19 +02:00
parent 7a38aa315a
commit d5c9b8f258

View File

@ -907,6 +907,8 @@ def write_config_header(self, configfile='', guard='', top=False, env=None, defi
:type defines: bool :type defines: bool
:param headers: add #include in the file :param headers: add #include in the file
:type headers: bool :type headers: bool
:type define_prefix: string
:param define_prefix: prefix all the defines in the file with a particular prefix
:param remove: remove the defines after they are added (yes by default) :param remove: remove the defines after they are added (yes by default)
:type remove: bool :type remove: bool
""" """
@ -944,6 +946,8 @@ def get_config_header(self, defines=True, headers=False, define_prefix=''):
:type defines: bool :type defines: bool
:param headers: write the headers :param headers: write the headers
:type headers: bool :type headers: bool
:type define_prefix: string
:param define_prefix: prefix all the defines with a particular prefix
:return: the contents of a ``config.h`` file :return: the contents of a ``config.h`` file
:rtype: string :rtype: string
""" """
@ -958,7 +962,7 @@ def get_config_header(self, defines=True, headers=False, define_prefix=''):
val = self.get_define(x) val = self.get_define(x)
lst.append('#define %s %s' % (define_prefix + x, val)) lst.append('#define %s %s' % (define_prefix + x, val))
else: else:
lst.append('/* #undef %s */' % x) lst.append('/* #undef %s */' % (define_prefix + x))
return "\n".join(lst) return "\n".join(lst)
@conf @conf