diff options
author | Guido van Rossum <guido@python.org> | 1998-03-05 05:22:36 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-03-05 05:22:36 (GMT) |
commit | 541e783664b910c3a08d16ac9774df9f85d3dade (patch) | |
tree | 20d108f0fd472dd2bf3ac4667c423c145497d1b2 /Tools/freeze | |
parent | 3c51cf2b6995995fc02771eceb41683fb194c932 (diff) | |
download | cpython-541e783664b910c3a08d16ac9774df9f85d3dade.zip cpython-541e783664b910c3a08d16ac9774df9f85d3dade.tar.gz cpython-541e783664b910c3a08d16ac9774df9f85d3dade.tar.bz2 |
Reindented, removed tabs.
Also added simple "clean" target (removes *.o and executable).
Diffstat (limited to 'Tools/freeze')
-rw-r--r-- | Tools/freeze/makemakefile.py | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/Tools/freeze/makemakefile.py b/Tools/freeze/makemakefile.py index 5418f93..df10a46 100644 --- a/Tools/freeze/makemakefile.py +++ b/Tools/freeze/makemakefile.py @@ -4,24 +4,30 @@ import os import string def makemakefile(outfp, makevars, files, target): - outfp.write("# Makefile generated by freeze.py script\n\n") + outfp.write("# Makefile generated by freeze.py script\n\n") - keys = makevars.keys() - keys.sort() - for key in keys: - outfp.write("%s=%s\n" % (key, makevars[key])) - outfp.write("\nall: %s\n" % target) + keys = makevars.keys() + keys.sort() + for key in keys: + outfp.write("%s=%s\n" % (key, makevars[key])) + outfp.write("\nall: %s\n\n" % target) - deps = [] - for i in range(len(files)): - file = files[i] - if file[-2:] == '.c': - 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) - files[i] = dest - deps.append(dest) + deps = [] + for i in range(len(files)): + file = files[i] + if file[-2:] == '.c': + 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) + files[i] = dest + deps.append(dest) - outfp.write("\n%s: %s\n" % (target, string.join(deps))) - outfp.write("\t$(CC) %s -o %s\n" % (string.join(files), target)) + outfp.write("\n%s: %s\n" % (target, string.join(deps))) + outfp.write("\t$(CC) %s -o %s\n" % (string.join(files), target)) + + outfp.write("\nclean:\n\t-rm -f *.o %s\n" % target) + +# Local Variables: +# indent-tabs-mode: nil +# End: |