summaryrefslogtreecommitdiffstats
path: root/Doc/tools
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-05-02 20:42:30 (GMT)
committerFred Drake <fdrake@acm.org>2002-05-02 20:42:30 (GMT)
commitfe3db7d6f055ec432d43f417cdf8d93897386aa4 (patch)
tree02570236e238cc485b8ebddd69c6fb5f043acce1 /Doc/tools
parentb9132a2a15431f3ddf20c83e43beb85eb713f63c (diff)
downloadcpython-fe3db7d6f055ec432d43f417cdf8d93897386aa4.zip
cpython-fe3db7d6f055ec432d43f417cdf8d93897386aa4.tar.gz
cpython-fe3db7d6f055ec432d43f417cdf8d93897386aa4.tar.bz2
Work around limitation of Cygwin Perl: To avoid a permission denial, we need
to do the inplace-edit with a backup file. A quick test leads me to believe this is sufficient to allow building the documentation on Cygwin; a full test is in progress.
Diffstat (limited to 'Doc/tools')
-rwxr-xr-xDoc/tools/node2label.pl11
1 files changed, 10 insertions, 1 deletions
diff --git a/Doc/tools/node2label.pl b/Doc/tools/node2label.pl
index 90f0c18..a3c6c84 100755
--- a/Doc/tools/node2label.pl
+++ b/Doc/tools/node2label.pl
@@ -1,7 +1,12 @@
#! /usr/bin/env perl
+# On Cygwin, we actually have to generate a temporary file when doing
+# the inplace edit, or we'll get permission errors. Not sure who's
+# bug this is, except that it isn't ours. To deal with this, we
+# generate backups during the edit phase and remove them at the end.
+#
use English;
-$INPLACE_EDIT = '';
+$INPLACE_EDIT = '.bak';
# read the labels, then reverse the mappings
require "labels.pl";
@@ -60,3 +65,7 @@ while (<>) {
foreach $oldname (keys %newnames) {
rename($oldname, $newnames{$oldname});
}
+
+foreach $filename (glob('*.bak')) {
+ unlink($filename);
+}