mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Separate CFLAGS and CPPFLAGS. CFLAGS should not contain preprocessor
directives, which is the role of CPPFLAGS. Closes SF patch #414991.
This commit is contained in:
parent
f4b33f61fb
commit
89e90d67aa
7 changed files with 19 additions and 12 deletions
|
@ -424,7 +424,8 @@ def main():
|
|||
outfp.close()
|
||||
infp.close()
|
||||
|
||||
cflags = defines + includes + ['$(OPT)']
|
||||
cflags = ['$(OPT)']
|
||||
cppflags = defines + includes
|
||||
libs = [os.path.join(binlib, 'libpython$(VERSION).a')]
|
||||
|
||||
somevars = {}
|
||||
|
@ -434,6 +435,7 @@ def main():
|
|||
somevars[key] = makevars[key]
|
||||
|
||||
somevars['CFLAGS'] = string.join(cflags) # override
|
||||
somevars['CPPFLAGS'] = string.join(cppflags) # override
|
||||
files = ['$(OPT)', '$(LDFLAGS)', base_config_c, base_frozen_c] + \
|
||||
files + supp_sources + addfiles + libs + \
|
||||
['$(MODLIBS)', '$(LIBS)', '$(SYSLIBS)']
|
||||
|
|
|
@ -19,7 +19,7 @@ def makemakefile(outfp, makevars, files, target):
|
|||
base = os.path.basename(file)
|
||||
dest = base[:-2] + '.o'
|
||||
outfp.write("%s: %s\n" % (dest, file))
|
||||
outfp.write("\t$(CC) $(CFLAGS) -c %s\n" % file)
|
||||
outfp.write("\t$(CC) $(CFLAGS) $(CPPFLAGS) -c %s\n" % file)
|
||||
files[i] = dest
|
||||
deps.append(dest)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue