aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>2001-06-02 06:16:02 +0000
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>2001-06-02 06:16:02 +0000
commit89e90d67aa73163b368f0dc42ed78310bda00ac5 (patch)
treebb7ad7331037051274914dabd6d4231ff396f8f2 /Tools/freeze
parentdict_popitem(): Repaired last-second 2.1 comment, which misidentified the (diff)
downloadcpython-89e90d67aa73163b368f0dc42ed78310bda00ac5.tar.gz
cpython-89e90d67aa73163b368f0dc42ed78310bda00ac5.tar.bz2
cpython-89e90d67aa73163b368f0dc42ed78310bda00ac5.zip
Separate CFLAGS and CPPFLAGS. CFLAGS should not contain preprocessor
directives, which is the role of CPPFLAGS. Closes SF patch #414991.
Diffstat (limited to 'Tools/freeze')
-rwxr-xr-xTools/freeze/freeze.py4
-rw-r--r--Tools/freeze/makemakefile.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/Tools/freeze/freeze.py b/Tools/freeze/freeze.py
index dfd0369627d..b534098b22c 100755
--- a/Tools/freeze/freeze.py
+++ b/Tools/freeze/freeze.py
@@ -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)']
diff --git a/Tools/freeze/makemakefile.py b/Tools/freeze/makemakefile.py
index 4d9913ee7c2..b1bad2b46da 100644
--- a/Tools/freeze/makemakefile.py
+++ b/Tools/freeze/makemakefile.py
@@ -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)