Lines Matching refs:macro

94         # 'macros': a list of macro definitions (or undefinitions).  A
95 # macro definition is a 2-tuple (name, value), where the value is
96 # either a string or None (no explicit value). A macro
168 """Ensures that every element of 'definitions' is a valid macro
177 raise TypeError(("invalid macro definition '%s': " % defn) + \
185 """Define a preprocessor macro for all compilations driven by this
187 string; if it is not supplied, then the macro will be defined
191 # Delete from the list of macro definitions/undefinitions if
200 """Undefine a preprocessor macro for all compilations driven by
201 this compiler object. If the same macro is defined by
204 undefinitions). If the macro is redefined/undefined on a
208 # Delete from the list of macro definitions/undefinitions if
502 'output_file' not supplied. 'macros' is a list of macro
531 'macros', if given, must be a list of macro definitions. A macro
533 The former defines a macro; if the value is None, the macro is
535 macro. Later definitions/redefinitions/ undefinitions take
1039 means undefine (-U) macro 'name', and (name,value) means define (-D)
1040 macro 'name' to 'value'. 'include_dirs' is just a list of directory
1048 # latest mention of a particular macro winds up on the command
1051 # mention of a macro on their command line. Similar situation for
1057 for macro in macros:
1058 if not (isinstance(macro, tuple) and 1 <= len(macro) <= 2):
1060 "bad macro definition '%s': "
1062 % macro)
1064 if len(macro) == 1: # undefine this macro
1065 pp_opts.append("-U%s" % macro[0])
1066 elif len(macro) == 2:
1067 if macro[1] is None: # define with no explicit value
1068 pp_opts.append("-D%s" % macro[0])
1071 # macro value here, because we're going to avoid the
1073 pp_opts.append("-D%s=%s" % macro)