Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
6d67b607
Commit
6d67b607
authored
Apr 05, 1995
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backup Makefile too
parent
9a707e8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
Tools/freeze/freeze.py
Tools/freeze/freeze.py
+13
-1
No files found.
Tools/freeze/freeze.py
View file @
6d67b607
...
...
@@ -19,7 +19,7 @@ usage: freeze [-p prefix] [-e extension] ... script [module] ...
-p prefix: This is the prefix used when you ran
'Make inclinstall libainstall' in the Python build directory.
(If you never ran this, freeze won't work.)
The default is /usr/local.
The default is /usr/local.
-e extension: A directory containing additional .o files that
may be used to resolve modules. This directory
...
...
@@ -227,11 +227,23 @@ def main():
addfiles
+
libs
+
\
[
'$(MODLIBS)'
,
'$(LIBS)'
,
'$(SYSLIBS)'
]
backup
=
makefile
+
'~'
try
:
os
.
rename
(
makefile
,
backup
)
except
os
.
error
:
backup
=
None
outfp
=
open
(
makefile
,
'w'
)
try
:
makemakefile
.
makemakefile
(
outfp
,
somevars
,
files
,
target
)
finally
:
outfp
.
close
()
if
backup
:
if
not
cmp
.
cmp
(
backup
,
makefile
):
print
'previous Makefile saved as'
,
backup
else
:
sys
.
stderr
.
write
(
'%s not changed, not written
\
n
'
%
makefile
)
os
.
rename
(
backup
,
makefile
)
# Done!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment